2 %bcond_without libiptc # doesn't build with 2.2 kernel
4 Summary: Transparent FTP proxy
5 Summary(pl.UTF-8): Przezroczyste proxy FTP
10 Group: Networking/Daemons
11 Source0: http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2
12 # Source0-md5: d30c35b9820d706ff2f9a6ab3b501247
14 Source2: %{name}.sysconfig
15 Patch0: %{name}-config.patch
16 URL: http://frox.sourceforge.net/
17 BuildRequires: autoconf
18 BuildRequires: automake
19 BuildRequires: linux-libc-headers >= 7:2.6.12.0-12
20 BuildRequires: rpmbuild(macros) >= 1.268
21 Requires(post,preun): /sbin/chkconfig
22 Requires(postun): /usr/sbin/groupdel
23 Requires(postun): /usr/sbin/userdel
24 Requires(pre): /bin/id
25 Requires(pre): /usr/bin/getgid
26 Requires(pre): /usr/sbin/groupadd
27 Requires(pre): /usr/sbin/groupmod
28 Requires(pre): /usr/sbin/useradd
29 Requires(pre): /usr/sbin/usermod
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.
40 %description -l pl.UTF-8
41 Frox to przezroczyste proxy FTP, posiada również wsparcie do
42 nieprzezroczystych połączeń, buforowania anonimowego ftp, i konwersji
43 połączeń z aktywnych na pasywne.
54 --enable-local-cache \
55 --%{!?with_iptc:dis}%{?with_iptc:en}able-libiptc \
56 --enable-transparent-data \
57 --enable-configfile=%{_sysconfdir}/frox.conf
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{/var/lib/frox,%{_mandir}/man{5,8}} \
63 $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig,rc.d/init.d} \
64 $RPM_BUILD_ROOT/var/{log/{archive/frox,frox},cache/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
75 cat >$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/frox << EOF
76 /var/log/frox/frox-log {
77 olddir /var/log/archive/frox
83 rm -rf $RPM_BUILD_ROOT
86 if [ "`/usr/bin/getgid frox`" = 97 ]; then
87 /usr/sbin/groupmod -g 103 frox
91 if [ -n "`id -u frox 2>/dev/null`" ] && [ "`/bin/id -u frox`" = 97 ]; then
92 /usr/sbin/usermod -u 103 frox
93 chown -R frox:frox /var/cache/frox ||:
94 chown -R root:frox /var/log/frox /var/log/archive/frox ||:
96 %useradd -u 103 -s /bin/false -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox
99 /sbin/chkconfig --add frox
100 %service frox restart "frox daemons"
103 if [ "$1" = "0" ]; then
105 /sbin/chkconfig --del frox
109 if [ "$1" = "0" ]; then
115 %defattr(644,root,root,755)
116 %doc doc/{ChangeLog,FAQ,README.transdata,RELEASE,SECURITY,TODO}
117 %attr(754,root,root) /etc/rc.d/init.d/frox
118 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/frox
119 %attr(640,root,frox) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frox.conf
120 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/frox
121 %attr(755,root,root) %{_sbindir}/frox
122 %attr(770,root,frox) /var/lib/frox
123 %attr(770,root,frox) /var/log/frox
124 %attr(770,root,frox) /var/log/archive/frox
125 %attr(770,frox,frox) /var/cache/frox