1 %define idmetaversion %(. ./IDMETA; echo $VERSION)
3 %define namev idzebra-2.0
4 Version: %{idmetaversion}
7 Vendor: Index Data ApS <info@indexdata.dk>
8 Source: idzebra-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/idzebra-%{version}-root
10 Packager: Adam Dickmeiss <adam@indexdata.dk>
11 URL: http://www.indexdata.com/zebra
12 BuildRequires: libyaz5-devel >= 5.0.0
13 BuildRequires: expat-devel, bzip2-devel, tcl, zlib-devel
14 Summary: High-performance, structured text indexing and retrival engine.
15 Group: Applications/Databases
17 Zebra is a high-performance, general-purpose structured text indexing
18 and retrieval engine. It reads structured records in a variety of input
19 formats (eg. email, XML, MARC) and allows access to them through exact
20 boolean search expressions and relevance-ranked free-text queries.
23 Summary: High-performance, structured text indexing and retrival engine.
24 Group: Applications/Databases
25 Requires: lib%{namev}-modules = %{version}
26 %description -n %{namev}
27 Zebra is a high-performance, general-purpose structured text indexing
28 and retrieval engine. It reads structured records in a variety of input
29 formats (eg. email, XML, MARC) and allows access to them through exact
30 boolean search expressions and relevance-ranked free-text queries.
33 %package -n lib%{namev}
34 Summary: Zebra libraries
36 Requires: libyaz5 bzip2-libs
37 %description -n lib%{namev}
38 Libraries for the Zebra search engine.
40 %package -n lib%{namev}-modules
41 Summary: Zebra modules
43 Requires: lib%{namev} = %{version} expat tcl
44 %description -n lib%{namev}-modules
45 Modules for the Zebra search engine.
47 %package -n lib%{namev}-devel
48 Summary: Zebra development libraries
49 Group: Development/Libraries
50 Requires: lib%{namev} = %{version} libyaz5-devel bzip2-devel
51 %description -n lib%{namev}-devel
52 Development libraries for the Zebra search engine.
59 CFLAGS="$RPM_OPT_FLAGS" \
60 ./configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir}\
61 --enable-shared --with-yaz=/usr/bin
62 make CFLAGS="$RPM_OPT_FLAGS"
65 rm -fr ${RPM_BUILD_ROOT}
66 make install DESTDIR=${RPM_BUILD_ROOT}
67 rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
68 rm ${RPM_BUILD_ROOT}/%{_bindir}/zebraidx
69 rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/zebraidx.*
70 rm ${RPM_BUILD_ROOT}/%{_bindir}/zebrasrv
71 rm ${RPM_BUILD_ROOT}/%{_mandir}/man8/zebrasrv.*
72 rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/idzebra-config.*
73 mkdir -p ${RPM_BUILD_ROOT}/etc/idzebra
74 mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d
75 install -m755 rpm/zebrasrv.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/zebrasrv
76 mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
77 install -m644 rpm/zebrasrv.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/zebrasrv
80 rm -fr ${RPM_BUILD_ROOT}
84 %doc README LICENSE.zebra NEWS
85 %config /usr/share/idzebra-2.0/tab
88 %{_bindir}/idzebra-abs2dom*
89 /usr/share/doc/idzebra-2.0
90 %{_mandir}/*/zebraidx-*
91 %{_mandir}/*/zebrasrv-*
92 %{_mandir}/*/idzebra-abs2dom*
93 /usr/share/idzebra-2.0-examples
94 %dir %{_sysconfdir}/idzebra
95 %config %{_sysconfdir}/rc.d/init.d/zebrasrv
96 %config(noreplace) /etc/logrotate.d/zebrasrv
101 %files -n lib%{namev}-modules
102 %{_libdir}/idzebra-2.0/modules/*
104 %files -n lib%{namev}-devel
105 %{_bindir}/idzebra-config-*
106 %{_includedir}/idzebra-2.0
109 %{_mandir}/*/idzebra-config-*
110 /usr/share/aclocal/*.m4
114 %postun -n lib%{namev}
118 /sbin/chkconfig --add zebrasrv
119 /sbin/service zebrasrv start > /dev/null 2>&1
121 /sbin/service zebrasrv restart > /dev/null 2>&1
125 /sbin/service zebrasrv stop > /dev/null 2>&1
126 /sbin/chkconfig --del zebrasrv