5 Summary: Transparent FTP proxy
6 Summary(pl): Przezroczyste proxy FTP
15 Group: Networking/Daemons
16 Source0: http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2
17 # Source0-md5: fae2d10d6ac742f298dc5fb47a0e306f
19 Source2: %{name}.sysconfig
20 Patch0: %{name}-config.patch
21 URL: http://frox.sourceforge.net/
22 BuildRequires: autoconf
23 BuildRequires: automake
24 BuildRequires: rpmbuild(macros) >= 1.202
26 Requires(pre): /bin/id
27 Requires(pre): /usr/bin/getgid
28 Requires(pre): /usr/sbin/groupadd
29 Requires(pre): /usr/sbin/groupmod
30 Requires(pre): /usr/sbin/useradd
31 Requires(pre): /usr/sbin/usermod
32 Requires(postun): /usr/sbin/groupdel
33 Requires(postun): /usr/sbin/userdel
34 Requires(post,preun): /sbin/chkconfig
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Frox is transparent FTP proxy. It also has support for non-transparent
41 connections, caching of anonymous ftp, and active --> passive
42 conversion of data connections.
45 Frox to przezroczyste proxy FTP, posiada równie¿ wsparcie do
46 nieprzezroczystych po³±czeñ, buforowania anonimowego ftp, i konwersji
47 po³±czeñ z aktywnych na pasywne.
58 --enable-local-cache \
59 %{?!with_kernel22:--enable-libiptc} \
60 %{?with_kernel22:--disable-libiptc} \
61 --enable-transparent-data \
62 --enable-configfile=%{_sysconfdir}/frox.conf
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT{/var/lib/frox,%{_mandir}/man{5,8}} \
68 $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,sysconfig,rc.d/init.d} \
69 $RPM_BUILD_ROOT/var/log/{archiv/frox,frox}
72 DESTDIR=$RPM_BUILD_ROOT
74 install src/frox.conf $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf
75 install doc/frox.man $RPM_BUILD_ROOT%{_mandir}/man8/frox.8
76 install doc/frox.conf.man $RPM_BUILD_ROOT%{_mandir}/man5/frox.5
77 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/frox
78 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/frox
80 cat >$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/frox << EOF
81 /var/log/frox/frox-log {
82 olddir /var/log/archiv/frox
88 rm -rf $RPM_BUILD_ROOT
92 # TODO: should be in trigger
93 if [ "`/usr/bin/getgid frox`" = 97 ]; then
94 /usr/sbin/groupmod -g 103 frox
97 %useradd -u 103 -s /bin/false -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox
98 # FIXME: should be in trigger
99 if [ "`/bin/id -u frox`" = 97 ]; then
100 /usr/sbin/usermod -u 103 frox
101 chown -R frox:frox /var/cache/frox ||:
102 chown -R root:frox /var/log/frox /var/log/archiv/frox ||:
106 /sbin/chkconfig --add frox
107 if [ -f /var/lock/subsys/frox ]; then
108 /etc/rc.d/init.d/frox restart >&2
110 echo "Run \"/etc/rc.d/init.d/frox start\" to start frox daemons."
114 if [ "$1" = "0" ]; then
115 if [ -f /var/lock/subsys/frox ]; then
116 /etc/rc.d/init.d/frox stop >&2
118 /sbin/chkconfig --del frox
122 if [ "$1" = "0" ]; then
128 %defattr(644,root,root,755)
129 %doc doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
130 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/frox
131 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/frox
132 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
133 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/logrotate.d/frox
134 %attr(755,root,root) %{_sbindir}/frox
135 %attr(770,root,frox) /var/lib/frox
136 %attr(770,root,frox) /var/log/frox
137 %attr(770,root,frox) /var/log/archiv/frox
138 %attr(770,frox,frox) /var/cache/frox