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
19 Source2: %{name}.sysconfig
20 Patch0: %{name}-config.patch
21 URL: http://frox.sourceforge.net/
22 BuildRequires: autoconf
23 BuildRequires: automake
25 Requires(pre): user-frox
26 Requires(post,preun): /sbin/chkconfig
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Frox is transparent FTP proxy. It also has support for non-transparent
31 connections, caching of anonymous ftp, and active --> passive
32 conversion of data connections.
35 Frox to prze¼roczyste proxy FTP, posiada równie¿ wsparcie do
36 nie-transparentnych po³aczen, buforowania anonimowego ftp, i konwersji
37 aktywne-pasywne polaczenia.
48 --enable-local-cache \
49 %{?_kernel24:--enable-libiptc} \
50 %{?!_kernel24:--disable-libiptc} \
51 --enable-transparent-data \
52 --enable-configfile=%{_sysconfdir}/frox.conf
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_mandir}/man{5,8}} \
58 $RPM_BUILD_ROOT/var/lib/frox
60 %{__make} install DESTDIR=$RPM_BUILD_ROOT
61 install src/frox.conf $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf
63 install doc/frox.man $RPM_BUILD_ROOT%{_mandir}/man8/frox.8
64 install doc/frox.conf.man $RPM_BUILD_ROOT%{_mandir}/man5/frox.5
65 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/frox
66 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/frox
69 rm -rf $RPM_BUILD_ROOT
72 /sbin/chkconfig --add frox
73 if [ -f /var/lock/subsys/frox ]; then
74 /etc/rc.d/init.d/frox restart >&2
76 echo "Run \"/etc/rc.d/init.d/frox start\" to start frox daemons."
80 if [ "$1" = "0" ]; then
81 if [ -f /var/lock/subsys/frox ]; then
82 /etc/rc.d/init.d/frox stop >&2
84 /sbin/chkconfig --del frox
88 %defattr(644,root,root,755)
89 %doc doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
90 %attr(754,root,root) /etc/rc.d/init.d/frox
91 %attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/frox
92 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
93 %attr(755,root,root) %{_sbindir}/frox
94 %attr(770,root,frox) /var/lib/frox