X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;ds=sidebyside;f=frox.spec;h=9e2746a31527a8aab91776e77263bd51e0693f00;hb=HEAD;hp=99dbd7e6423a02d698c8a8808e9413552438e7c6;hpb=e1e1f4d1d1b9af3981d57d80dc5bf7287688a06c;p=packages%2Ffrox.git diff --git a/frox.spec b/frox.spec index 99dbd7e..9e2746a 100644 --- a/frox.spec +++ b/frox.spec @@ -1,77 +1,126 @@ -# $Revision: 1.5 $ +# Conditional build: +%bcond_without libiptc # doesn't build with 2.2 kernel +# Summary: Transparent FTP proxy +Summary(pl.UTF-8): Przezroczyste proxy FTP Name: frox -Version: 0.6.4 -Release: 1 +Version: 0.7.18 +Release: 3 License: GPL Group: Networking/Daemons -Group(de): Netzwerkwesen/Server -Group(pl): Sieciowe/Serwery -Source0: ftp://ftp.sourceforge.net/pub/sourceforge/frox/%{name}-%{version}.tar.gz +Source0: http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2 +# Source0-md5: d30c35b9820d706ff2f9a6ab3b501247 Source1: %{name}.init -Source2: %{name}.conf +Source2: %{name}.sysconfig +Patch0: %{name}-config.patch URL: http://frox.sourceforge.net/ -BuildRequires: kernel-headers >= 2.4.0 -Prereq: rc-scripts +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: linux-libc-headers >= 7:2.6.12.0-12 +BuildRequires: rpmbuild(macros) >= 1.268 +Requires(post,preun): /sbin/chkconfig +Requires(postun): /usr/sbin/groupdel +Requires(postun): /usr/sbin/userdel +Requires(pre): /bin/id +Requires(pre): /usr/bin/getgid +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/groupmod +Requires(pre): /usr/sbin/useradd +Requires(pre): /usr/sbin/usermod +Requires: rc-scripts +Provides: group(frox) +Provides: user(frox) BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -frox is transparent FTP proxy. It also has support for non-transparent +Frox is transparent FTP proxy. It also has support for non-transparent connections, caching of anonymous ftp, and active --> passive conversion of data connections. -%description -l pl -frox to prze¼roczyste FTP-proxy, posiada równie¿ wsparcie do -nie-transparentnych po³aczen, buforowania anonimowego ftp, i konwersji -aktywne-pasywne polaczenia. +%description -l pl.UTF-8 +Frox to przezroczyste proxy FTP, posiada również wsparcie do +nieprzezroczystych połączeń, buforowania anonimowego ftp, i konwersji +połączeń z aktywnych na pasywne. %prep %setup -q +%patch0 -p1 + %build +%{__aclocal} +%{__autoconf} %configure \ --enable-http-cache \ --enable-local-cache \ - --enable-libiptc \ + --%{!?with_iptc:dis}%{?with_iptc:en}able-libiptc \ --enable-transparent-data \ --enable-configfile=%{_sysconfdir}/frox.conf %{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_mandir}/man8} \ - $RPM_BUILD_ROOT/var/cache/frox/0{1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f} +install -d $RPM_BUILD_ROOT{/var/lib/frox,%{_mandir}/man{5,8}} \ + $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig,rc.d/init.d} \ + $RPM_BUILD_ROOT/var/{log/{archive/frox,frox},cache/frox} -%{__make} install DESTDIR=$RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT +install src/frox.conf $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf install doc/frox.man $RPM_BUILD_ROOT%{_mandir}/man8/frox.8 +install doc/frox.conf.man $RPM_BUILD_ROOT%{_mandir}/man5/frox.5 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/frox -install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf +install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/frox -gzip -9nf doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO} +cat >$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/frox << EOF +/var/log/frox/frox-log { + olddir /var/log/archive/frox + nocreate +} +EOF + +%clean +rm -rf $RPM_BUILD_ROOT %pre -GID=97; %groupadd -UID=97; GROUP=squid; COMMENT="FROX ftp caching daemon" -HOMEDIR=/var/cache/from; %useradd +if [ "`/usr/bin/getgid frox`" = 97 ]; then + /usr/sbin/groupmod -g 103 frox +fi +%groupadd -g 103 frox -%post -DESC="frox daemons"; %chkconfig_add +if [ -n "`id -u frox 2>/dev/null`" ] && [ "`/bin/id -u frox`" = 97 ]; then + /usr/sbin/usermod -u 103 frox + chown -R frox:frox /var/cache/frox ||: + chown -R root:frox /var/log/frox /var/log/archive/frox ||: +fi +%useradd -u 103 -s /bin/false -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox -%postun -%userdel -%groupdel +%post +/sbin/chkconfig --add frox +%service frox restart "frox daemons" %preun -%chkconfig_del +if [ "$1" = "0" ]; then + %service frox stop + /sbin/chkconfig --del frox +fi -%clean -rm -rf $RPM_BUILD_ROOT +%postun +if [ "$1" = "0" ]; then + %userremove frox + %groupremove frox +fi %files %defattr(644,root,root,755) -%doc doc/*.gz +%doc doc/{ChangeLog,FAQ,README.transdata,RELEASE,SECURITY,TODO} %attr(754,root,root) /etc/rc.d/init.d/frox -%attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/frox +%attr(640,root,frox) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frox.conf +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/frox %attr(755,root,root) %{_sbindir}/frox -%attr(750,frox,frox) %dir /var/cache/frox +%attr(770,root,frox) /var/lib/frox +%attr(770,root,frox) /var/log/frox +%attr(770,root,frox) /var/log/archive/frox +%attr(770,frox,frox) /var/cache/frox %{_mandir}/man*/*