]> git.pld-linux.org Git - packages/ffsearch.git/blob - ffsearch.spec
- change directory to /usr/lib/ffsearch
[packages/ffsearch.git] / ffsearch.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        Fast File Search
3 Summary(pl):    Szybka wyszukiwarka plików
4 Name:           ffsearch
5 Version:        1.1.2
6 Release:        0.2
7 License:        GPL v2
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
14 Requires:       webserver
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _phpdir         /home/services/httpd/html/ffsearch
19
20 %description
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').
26
27 %description -l pl
28 todo
29
30 %prep
31 %setup -q
32
33 %install
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{%{_phpdir},%{_sysconfdir},%{_libdir}/%{name}/bin,/var/{log/{,archiv/}%{name},lock/%{name}}}
36
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}
41
42 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %pre
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
51                 exit 1
52         fi
53 else
54         /usr/sbin/groupadd -g 118 -r -f ffsearch 1>&2 || :
55 fi
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
59                 exit 1
60         fi
61 else
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 || :
64 fi
65
66 %postun
67 if [ "$1" = "0" ]; then
68         /usr/sbin/userdel ffsearch
69         /usr/sbin/groupdel ffsearch
70 fi
71
72 %files
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}
This page took 0.076588 seconds and 3 git commands to generate.