]> git.pld-linux.org Git - packages/ffsearch.git/blob - ffsearch.spec
- update to 1.1.11
[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.11
6 Release:        1
7 License:        GPL v2
8 Group:          Applications/WWW
9 Source0:        http://dl.sourceforge.net/ffsearch/%{name}-%{version}.tar.bz2
10 # Source0-md5:  8e7da919971aed48f09cd5169e7f1286
11 Source1:        %{name}.crond
12 Patch0:         %{name}-config.patch
13 URL:            http://ffsearch.sf.net/
14 BuildRequires:  rpm-perlprov >= 4.1-13
15 Requires(pre):  /usr/bin/getgid
16 Requires(pre):  /bin/id
17 Requires(pre):  /usr/sbin/groupadd
18 Requires(pre):  /usr/sbin/useradd
19 Requires(postun):       /usr/sbin/groupdel
20 Requires(postun):       /usr/sbin/userdel
21 Requires:       php >= 4.0.3
22 Requires:       webserver
23 Requires:       perl-DBD-mysql
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _phpdir         /home/services/httpd/html/ffsearch
28
29 %description
30 Fast File Search is a crawler for FTP servers and SMB shares that can
31 be found on Windows or UNIX systems running Samba. It provides a web
32 interface for searching files. It is optimized for searching files by
33 a wildcard when there are some normal (not '*' or '?') chars specified
34 in the beginning or in the end of the mask (for example '*.iso').
35
36 %description -l pl
37 Fast File Search (szybka wyszukiwarka plików) jest skryptem
38 zbieraj±cym informacje o udostêpnianych zasobach FTP i SMB. Udostêpnia
39 przyjemny interfejs WWW do wyszukiwania plików. Jest zoptymalizowana
40 do wyszukiwania plików przez podanie masek plików ze sta³± czê¶ci± na
41 pocz±tku lub koñcu nazwy (na przyk³ad *.iso).
42
43 %prep
44 %setup -q
45 %patch0 -p1
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{_phpdir},%{_sysconfdir},%{_libdir}/%{name}/bin,/var/{log/{,archiv/}%{name},lock/%{name}}}
50 rm -rf {bin,flag,lang,htdocs/ffsearch/{,flag,lang},doc}/CVS
51
52 cp -r htdocs/ffsearch/*         $RPM_BUILD_ROOT%{_phpdir}
53 install bin/*                   $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
54 install makedb.pl               $RPM_BUILD_ROOT%{_libdir}/%{name}
55 install %{name}.conf            $RPM_BUILD_ROOT%{_sysconfdir}
56
57 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %pre
63 if [ -n "`getgid ffsearch`" ]; then
64         if [ "`getgid ffsearch`" != "118" ]; then
65                 echo "Error: group ffsearch doesn't have gid=118. Correct this before installing ffsearch." 1>&2
66                 exit 1
67         fi
68 else
69         /usr/sbin/groupadd -g 118 -r -f ffsearch 1>&2
70 fi
71 if [ -n "`id -u ffsearch 2>/dev/null`" ]; then
72         if [ "`id -u ffsearch`" != "118" ]; then
73                 echo "Error: user ffsearch doesn't have uid=118. Correct this before installing ffsearch." 1>&2
74                 exit 1
75         fi
76 else
77         /usr/sbin/useradd -M -o -r -u 118 -s /bin/false \
78                 -g ffsearch -c "Fast File Search user" -d %{_libdir}/%{name} ffsearch 1>&2
79 fi
80
81 %postun
82 if [ "$1" = "0" ]; then
83         /usr/sbin/userdel ffsearch
84         /usr/sbin/groupdel ffsearch
85 fi
86
87 %files
88 %defattr(644,root,root,755)
89 %doc INSTALL README MAINTAINERS UPGRADE AUTHORS ChangeLog doc/*
90 %attr(750,root,ffsearch) %dir %{_libdir}/%{name}
91 %attr(750,root,ffsearch) %dir %{_libdir}/%{name}/bin
92 %attr(750,root,ffsearch) %{_libdir}/%{name}/bin/*.pl
93 %attr(750,root,ffsearch) %{_libdir}/%{name}/*.pl
94 %attr(640,ffsearch,ffsearch) %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/%{name}.conf
95 %attr(640,ffsearch,http) %verify(not md5 size mtime) %config(noreplace) %{_phpdir}/config.php
96 %attr(750,root,http) %dir %{_phpdir}
97 %attr(640,root,http) %{_phpdir}/a*.php
98 %attr(640,root,http) %{_phpdir}/body.php
99 %attr(640,root,http) %{_phpdir}/browse.php
100 %attr(640,root,http) %{_phpdir}/colors.php
101 %attr(640,root,http) %{_phpdir}/comment*.php
102 %attr(640,root,http) %{_phpdir}/db.php
103 %attr(640,root,http) %{_phpdir}/f*.php
104 %attr(640,root,http) %{_phpdir}/h*.php
105 %attr(640,root,http) %{_phpdir}/index.php
106 %attr(640,root,http) %{_phpdir}/lang.php
107 %attr(640,root,http) %{_phpdir}/menu*.php
108 %attr(640,root,http) %{_phpdir}/s*.php
109 %attr(640,root,http) %{_phpdir}/t*.php
110 %attr(640,root,http) %{_phpdir}/vars.php
111 %attr(640,root,http) %{_phpdir}/*.css
112 %attr(640,root,http) %{_phpdir}/*.gif
113 %attr(640,root,http) %{_phpdir}/*.png
114 %attr(750,root,http) %{_phpdir}/flag
115 %attr(750,root,http) %{_phpdir}/lang
116 %attr(640,root,root) /etc/cron.d/%{name}
117 %attr(750,ffsearch,ffsearch) %dir /var/lock/%{name}
118 %attr(750,ffsearch,ffsearch) %dir /var/log/%{name}
119 %attr(750,ffsearch,ffsearch) %dir /var/log/archiv/%{name}
This page took 0.052265 seconds and 3 git commands to generate.