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