2 %define _kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2)
3 %define _kernel24 %(echo %{_kernel_ver} | grep -q '2\.[012]\.' ; echo $?)
5 %define _kernel_series 2.4
7 %define _kernel_series 2.2
10 Summary: Transparent FTP proxy
11 Summary(pl): Prze¼roczyste proxy FTP
14 Release: 1@%{_kernel_series}
16 Group: Networking/Daemons
17 Source0: http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2
18 # Source0-md5: 1df290dbb766f5ce661eb52d5ddf7ca5
20 Source2: %{name}.sysconfig
21 Patch0: %{name}-config.patch
22 URL: http://frox.sourceforge.net/
23 BuildRequires: autoconf
24 BuildRequires: automake
26 Requires(pre): /usr/bin/getgid
27 Requires(pre): /bin/id
28 Requires(pre): /usr/sbin/groupadd
29 Requires(pre): /usr/sbin/useradd
30 Requires(postun): /usr/sbin/userdel
31 Requires(postun): /usr/sbin/groupdel
32 Requires(post,preun): /sbin/chkconfig
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Frox is transparent FTP proxy. It also has support for non-transparent
37 connections, caching of anonymous ftp, and active --> passive
38 conversion of data connections.
41 Frox to prze¼roczyste proxy FTP, posiada równie¿ wsparcie do
42 nie-transparentnych po³aczen, buforowania anonimowego ftp, i konwersji
43 aktywne-pasywne polaczenia.
54 --enable-local-cache \
55 %{?_kernel24:--enable-libiptc} \
56 %{?!_kernel24:--disable-libiptc} \
57 --enable-transparent-data \
58 --enable-configfile=%{_sysconfdir}/frox.conf
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_mandir}/man{5,8}} \
64 $RPM_BUILD_ROOT/var/lib/frox
67 DESTDIR=$RPM_BUILD_ROOT
69 install src/frox.conf $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf
70 install doc/frox.man $RPM_BUILD_ROOT%{_mandir}/man8/frox.8
71 install doc/frox.conf.man $RPM_BUILD_ROOT%{_mandir}/man5/frox.5
72 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/frox
73 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/frox
76 rm -rf $RPM_BUILD_ROOT
79 if [ ! -n "`getgid frox`" ]; then
80 /usr/sbin/groupadd -g 97 -r -f frox 1>&2 || :
83 if [ ! -n "`id -u frox 2>/dev/null`" ]; then
84 /usr/sbin/useradd -M -o -r -u 97 -s /bin/false \
85 -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox 1>&2 || :
89 /sbin/chkconfig --add frox
90 if [ -f /var/lock/subsys/frox ]; then
91 /etc/rc.d/init.d/frox restart >&2
93 echo "Run \"/etc/rc.d/init.d/frox start\" to start frox daemons."
97 if [ "$1" = "0" ]; then
98 if [ -f /var/lock/subsys/frox ]; then
99 /etc/rc.d/init.d/frox stop >&2
101 /sbin/chkconfig --del frox
105 if [ "$1" = "0" ]; then
106 /usr/sbin/userdel frox 2> /dev/null
107 /usr/sbin/groupdel frox 2> /dev/null
111 %defattr(644,root,root,755)
112 %doc doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
113 %attr(754,root,root) /etc/rc.d/init.d/frox
114 %attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/frox
115 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
116 %attr(755,root,root) %{_sbindir}/frox
117 %attr(770,root,frox) /var/lib/frox