1 %include /usr/lib/rpm/macros.perl
2 Summary: Fast File Search
3 Summary(pl): Szybka wyszukiwarka plików
8 Group: Applications/WWW
9 Source0: http://dl.sourceforge.net/ffsearch/%{name}-%{version}.tar.bz2
10 # Source0-md5: 27296436414f8daf8453b4deee142a29
11 Source1: %{name}.crond
12 URL: http://www.phpbb.com/
13 Requires: php >= 4.0.3
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _phpdir /home/services/httpd/html/ffsearch
21 Fast File Search is a crawler for FTP servers and SMB shares that can be found
22 on Windows or UNIX systems running Samba. It provides a web interface for
23 searching files. It is optimized for searching files by a wildcard when there
24 are some normal (not '*' or '?') chars specified in the beginning or in the end
25 of the mask (for example '*.iso').
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{_phpdir},%{_sysconfdir},%{_libdir}/%{name}/bin,/var/{log/{,archiv/}%{name},lock/%{name}}}
37 cp -r htdocs/ffsearch/* $RPM_BUILD_ROOT%{_phpdir}
38 install bin/* $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
39 install makedb.pl $RPM_BUILD_ROOT%{_libdir}/%{name}
40 install %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}
42 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
45 rm -rf $RPM_BUILD_ROOT
48 if [ -n "`getgid ffsearch`" ]; then
49 if [ "`getgid ffsearch`" != "118" ]; then
50 echo "Error: group ffsearch doesn't have gid=118. Correct this before installing ffsearch." 1>&2
54 /usr/sbin/groupadd -g 118 -r -f ffsearch 1>&2 || :
56 if [ -n "`id -u ffsearch 2>/dev/null`" ]; then
57 if [ "`id -u ffsearch`" != "118" ]; then
58 echo "Error: user ffsearch doesn't have uid=118. Correct this before installing ffsearch." 1>&2
62 /usr/sbin/useradd -M -o -r -u 118 -s /bin/false \
63 -g ffsearch -c "Fast File Search user" -d %{_libdir}/%{name} ffsearch 1>&2 || :
67 if [ "$1" = "0" ]; then
68 /usr/sbin/userdel ffsearch
69 /usr/sbin/groupdel ffsearch
73 %defattr(644,root,root,755)
74 %doc INSTALL README MAINTAINERS UPGRADE
75 %attr(750,root,ffsearch) %dir %{_libdir}/%{name}
76 %attr(750,root,ffsearch) %dir %{_libdir}/%{name}/bin
77 %attr(750,root,ffsearch) %{_libdir}/%{name}/bin/*.pl
78 %attr(750,root,ffsearch) %{_libdir}/%{name}/*.pl
79 %attr(640,ffsearch,ffsearch) %config(noreplace) %{_sysconfdir}/%{name}.conf
80 %attr(750,root,http) %dir %{_phpdir}
81 %attr(640,root,http) %{_phpdir}/*.php
82 %attr(640,root,http) %{_phpdir}/*.css
83 %attr(640,root,http) %{_phpdir}/*.gif
84 %attr(640,root,http) %{_phpdir}/*.png
85 %attr(750,root,http) %{_phpdir}/flag
86 %attr(750,root,http) %{_phpdir}/lang
87 %attr(640,root,root) /etc/cron.d/%{name}
88 %attr(750,ffsearch,ffsearch) %dir /var/lock/%{name}
89 %attr(750,ffsearch,ffsearch) %dir /var/log/%{name}
90 %attr(750,ffsearch,ffsearch) %dir /var/log/archiv/%{name}