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