X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=idzebra.spec;h=e99268e1fb80cdbec745d4351e6818b947a414b3;hp=343baeadbe26d8971905bc5de083eaf0f08b0297;hb=1d5d4f08cb84516d75fcb5e6ed4199b6454cccd6;hpb=90d4902e0921f68842031a4aa1e743d5df06047f diff --git a/idzebra.spec b/idzebra.spec index 343baea..e99268e 100644 --- a/idzebra.spec +++ b/idzebra.spec @@ -2,13 +2,13 @@ Name: idzebra %define namev idzebra-2.0 Version: %{idmetaversion} -Release: 1indexdata +Release: 2indexdata License: GPL Vendor: Index Data ApS Source: idzebra-%{version}.tar.gz BuildRoot: %{_tmppath}/idzebra-%{version}-root Packager: Adam Dickmeiss -URL: http://www.indexdata.dk/zebra/ +URL: http://www.indexdata.com/zebra BuildRequires: libyaz4-devel >= 4.2.0 BuildRequires: expat-devel, bzip2-devel, tcl, zlib-devel Summary: High-performance, structured text indexing and retrival engine. @@ -36,8 +36,6 @@ Group: Libraries Requires: libyaz4 bzip2-libs %description -n lib%{namev} Libraries for the Zebra search engine. -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig %package -n lib%{namev}-modules Summary: Zebra modules @@ -73,6 +71,11 @@ rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/zebraidx.* rm ${RPM_BUILD_ROOT}/%{_bindir}/zebrasrv rm ${RPM_BUILD_ROOT}/%{_mandir}/man8/zebrasrv.* rm ${RPM_BUILD_ROOT}/%{_mandir}/man1/idzebra-config.* +mkdir -p ${RPM_BUILD_ROOT}/etc/idzebra +mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d +install -m755 rpm/zebrasrv.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/zebrasrv +mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d +install -m644 rpm/zebrasrv.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/zebrasrv %clean rm -fr ${RPM_BUILD_ROOT} @@ -89,6 +92,9 @@ rm -fr ${RPM_BUILD_ROOT} %{_mandir}/*/zebrasrv-* %{_mandir}/*/idzebra-abs2dom* /usr/share/idzebra-2.0-examples +%dir %{_sysconfdir}/idzebra +%config %{_sysconfdir}/rc.d/init.d/zebrasrv +%config(noreplace) /etc/logrotate.d/zebrasrv %files -n lib%{namev} %{_libdir}/*.so.* @@ -104,3 +110,20 @@ rm -fr ${RPM_BUILD_ROOT} %{_mandir}/*/idzebra-config-* /usr/share/aclocal/*.m4 +%post -n lib%{namev} +/sbin/ldconfig +%postun -n lib%{namev} +/sbin/ldconfig +%post -n %{namev} +if [ $1 = 1 ]; then + /sbin/chkconfig --add zebrasrv + /sbin/service zebrasrv start > /dev/null 2>&1 +else + /sbin/service zebrasrv restart > /dev/null 2>&1 +fi +%preun -n %{namev} +if [ $1 = 0 ]; then + /sbin/service zebrasrv stop > /dev/null 2>&1 + /sbin/chkconfig --del zebrasrv +fi +