]> git.pld-linux.org Git - packages/frox.git/blob - frox.spec
- initial release (need check :)
[packages/frox.git] / frox.spec
1 # $Revision: 1.1 $
2 Summary:        Transparent FTP proxy
3 Name:           frox
4 Version:        0.6.4
5 Release:        1
6 License:        GPL
7 Group:          Networking/Daemons
8 Group(de):      Netzwerkwesen/Server
9 Group(pl):      Sieciowe/Serwery
10 Source0:        ftp://ftp.sourceforge.net/pub/sourceforge/frox/%{name}-%{version}.tar.gz
11 Source1:        %{name}.init
12 Source2:        %{name}.conf
13 Prereq:         rc-scripts
14 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15
16 %description
17
18 %prep
19 %setup -q
20 %build
21 %configure \
22         --enable-http-cache \
23         --enable-local-cache \
24         --enable-libiptc \
25         --enable-transparent-data \
26         --enable-configfile=%{_sysconfdir}/frox.conf
27 %{__make}
28
29 %install
30 rm -rf $RPM_BUILD_ROOT
31
32 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/rc.d/init.d,%{_mandir}/man8}
33 install -d $RPM_BUILD_ROOT/var/cache/frox/0{1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f}
34
35 %{__make} install DESTDIR=$RPM_BUILD_ROOT
36
37 install doc/frox.man    $RPM_BUILD_ROOT%{_mandir}/man8/frox.8
38 install %{SOURCE1}      $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/frox
39 install %{SOURCE2}      $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf
40
41 gzip -9nf doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
42
43 %pre
44 if [ ! -n "`getgid frox`" ]; then
45         /usr/sbin/groupadd -g 97 -r -f frox 1>&2 || :
46 fi
47
48 if [ ! -n "`id -u frox 2>/dev/null`" ]; then
49         /usr/sbin/useradd -M -o -r -u 97 -s /bin/false \
50                 -g squid -c "FROX ftp caching daemon" -d /var/cache/frox frox 1>&2 || :
51 fi              
52
53 %post
54 /sbin/chkconfig --add frox
55 if [ -f /var/lock/subsys/frox ]; then
56         /etc/rc.d/init.d/frox restart >&2
57 else
58         echo "Run \"/etc/rc.d/init.d/frox start\" to start frox daemons."
59 fi
60
61 %postun
62 # If package is being erased for the last time.
63 if [ "$1" = "0" ]; then
64         /usr/sbin/userdel frox 2> /dev/null
65         /usr/sbin/groupdel frox 2> /dev/null
66 fi              
67
68 %preun
69 if [ "$1" = "0" ]; then
70         if [ -f /var/lock/subsys/frox ]; then
71                 /etc/rc.d/init.d/frox stop >&2
72         fi
73         /sbin/chkconfig --del frox
74 fi
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %files
80 %defattr(644,root,root,755)
81 %doc doc/*.gz
82 %attr(754,root,root) /etc/rc.d/init.d/frox
83 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
84 %attr(755,root,root) %{_sbindir}/frox
85 %attr(750,frox,frox) %dir /var/cache/frox
86 %{_mandir}/man*/*
This page took 0.078282 seconds and 4 git commands to generate.