]> git.pld-linux.org Git - packages/ffsearch.git/blobdiff - ffsearch.spec
- adapterized
[packages/ffsearch.git] / ffsearch.spec
index fdfc87201f7a33be2a98339cb94cf50265a387da..3c9b8f0a1713c31a615a20c6b4056dbc14d99c02 100644 (file)
@@ -3,7 +3,7 @@ Summary:        Fast File Search
 Summary(pl):   Szybka wyszukiwarka plików
 Name:          ffsearch
 Version:       1.1.11
-Release:       1
+Release:       3
 License:       GPL v2
 Group:         Applications/WWW
 Source0:       http://dl.sourceforge.net/ffsearch/%{name}-%{version}.tar.bz2
@@ -12,8 +12,9 @@ Source1:      %{name}.crond
 Patch0:                %{name}-config.patch
 URL:           http://ffsearch.sf.net/
 BuildRequires: rpm-perlprov >= 4.1-13
-Requires(pre): /usr/bin/getgid
+BuildRequires: rpmbuild(macros) >= 1.202
 Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
 Requires(postun):      /usr/sbin/groupdel
@@ -21,6 +22,8 @@ Requires(postun):     /usr/sbin/userdel
 Requires:      php >= 4.0.3
 Requires:      webserver
 Requires:      perl-DBD-mysql
+Provides:      group(ffsearch)
+Provides:      user(ffsearch)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -46,12 +49,12 @@ pocz
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_phpdir},%{_sysconfdir},%{_libdir}/%{name}/bin,/var/{log/{,archiv/}%{name},lock/%{name}}}
+install -d $RPM_BUILD_ROOT{%{_phpdir},%{_sysconfdir},%{_datadir}/%{name}/bin,/var/{log/{,archiv/}%{name},lock/%{name}}}
 rm -rf {bin,flag,lang,htdocs/ffsearch/{,flag,lang},doc}/CVS
 
 cp -r htdocs/ffsearch/*                $RPM_BUILD_ROOT%{_phpdir}
-install bin/*                  $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
-install makedb.pl              $RPM_BUILD_ROOT%{_libdir}/%{name}
+install bin/*                  $RPM_BUILD_ROOT%{_datadir}/%{name}/bin
+install makedb.pl              $RPM_BUILD_ROOT%{_datadir}/%{name}
 install %{name}.conf           $RPM_BUILD_ROOT%{_sysconfdir}
 
 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
@@ -60,39 +63,24 @@ install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`getgid ffsearch`" ]; then
-       if [ "`getgid ffsearch`" != "118" ]; then
-               echo "Error: group ffsearch doesn't have gid=118. Correct this before installing ffsearch." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/groupadd -g 118 -r -f ffsearch 1>&2
-fi
-if [ -n "`id -u ffsearch 2>/dev/null`" ]; then
-       if [ "`id -u ffsearch`" != "118" ]; then
-               echo "Error: user ffsearch doesn't have uid=118. Correct this before installing ffsearch." 1>&2
-               exit 1
-       fi
-else
-       /usr/sbin/useradd -M -o -r -u 118 -s /bin/false \
-               -g ffsearch -c "Fast File Search user" -d %{_libdir}/%{name} ffsearch 1>&2
-fi
+%groupadd -g 118 ffsearch
+%useradd -u 118 -s /bin/false -g ffsearch -c "Fast File Search user" -d %{_datadir}/ffsearch ffsearch
 
 %postun
 if [ "$1" = "0" ]; then
-       /usr/sbin/userdel ffsearch
-       /usr/sbin/groupdel ffsearch
+       %userremove ffsearch
+       %groupremove ffsearch
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc INSTALL README MAINTAINERS UPGRADE AUTHORS ChangeLog doc/*
-%attr(750,root,ffsearch) %dir %{_libdir}/%{name}
-%attr(750,root,ffsearch) %dir %{_libdir}/%{name}/bin
-%attr(750,root,ffsearch) %{_libdir}/%{name}/bin/*.pl
-%attr(750,root,ffsearch) %{_libdir}/%{name}/*.pl
-%attr(640,ffsearch,ffsearch) %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/%{name}.conf
-%attr(640,ffsearch,http) %verify(not md5 size mtime) %config(noreplace) %{_phpdir}/config.php
+%attr(750,root,ffsearch) %dir %{_datadir}/%{name}
+%attr(750,root,ffsearch) %dir %{_datadir}/%{name}/bin
+%attr(750,root,ffsearch) %{_datadir}/%{name}/bin/*.pl
+%attr(750,root,ffsearch) %{_datadir}/%{name}/*.pl
+%attr(640,ffsearch,ffsearch) %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}.conf
+%attr(640,ffsearch,http) %verify(not md5 mtime size) %config(noreplace) %{_phpdir}/config.php
 %attr(750,root,http) %dir %{_phpdir}
 %attr(640,root,http) %{_phpdir}/a*.php
 %attr(640,root,http) %{_phpdir}/body.php
This page took 0.104675 seconds and 4 git commands to generate.