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