]> git.pld-linux.org Git - packages/frox.git/blobdiff - frox.spec
- spaces -> tabs
[packages/frox.git] / frox.spec
index 5bebda9aa8c64cf12c6d2dffa85098cd2f8c87c0..2b83bbc71192f28d40f4a32b3f87df03bd405c8d 100644 (file)
--- a/frox.spec
+++ b/frox.spec
@@ -1,20 +1,34 @@
+#
+# Conditional build:
+%bcond_with    kernel22
+#
 Summary:       Transparent FTP proxy
-Summary(pl):   Prze¼roczyste proxy FTP
+Summary(pl):   Przezroczyste proxy FTP
 Name:          frox
-Version:       0.6.5
-Release:       2
+Version:       0.7.14
+%if %{with kernel22}
+Release:       1@2.2
+%else
+Release:       1
+%endif
 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: 95ef94973e94ba2cfb33f1004c74190e
 Source1:       %{name}.init
-Source2:       %{name}.conf
+Source2:       %{name}.sysconfig
+Patch0:                %{name}-config.patch
 URL:           http://frox.sourceforge.net/
 BuildRequires: autoconf
 BuildRequires: automake
-Prereq:                rc-scripts
-Prereq:                /sbin/chkconfig
+PreReq:                rc-scripts
+Requires(pre): /usr/bin/getgid
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires(postun):      /usr/sbin/userdel
+Requires(postun):      /usr/sbin/groupdel
+Requires(post,preun):  /sbin/chkconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -23,36 +37,39 @@ connections, caching of anonymous ftp, and active --> passive
 conversion of data connections.
 
 %description -l pl
-Frox to prze¼roczyste proxy FTP, posiada równie¿ wsparcie do
-nie-transparentnych po³aczen, buforowania anonimowego ftp, i konwersji
-aktywne-pasywne polaczenia.
+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
+%{__aclocal}
+%{__autoconf}
 %configure \
        --enable-http-cache \
        --enable-local-cache \
-       --enable-libiptc \
+       %{?!with_kernel22:--enable-libiptc} \
+       %{?with_kernel22:--disable-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{/etc/rc.d/init.d,/etc/sysconfig,%{_mandir}/man{5,8}} \
+       $RPM_BUILD_ROOT/var/lib/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
-
-gzip -9nf doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
+install %{SOURCE2}     $RPM_BUILD_ROOT/etc/sysconfig/frox
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -64,8 +81,8 @@ fi
 
 if [ ! -n "`id -u frox 2>/dev/null`" ]; then
        /usr/sbin/useradd -M -o -r -u 97 -s /bin/false \
-               -g squid -c "FROX ftp caching daemon" -d /var/cache/frox frox 1>&2 || :
-fi             
+               -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox 1>&2 || :
+fi
 
 %post
 /sbin/chkconfig --add frox
@@ -84,17 +101,17 @@ if [ "$1" = "0" ]; then
 fi
 
 %postun
-# If package is being erased for the last time.
 if [ "$1" = "0" ]; then
        /usr/sbin/userdel frox 2> /dev/null
        /usr/sbin/groupdel frox 2> /dev/null
-fi             
+fi
 
 %files
 %defattr(644,root,root,755)
-%doc doc/*.gz
+%doc doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
 %attr(754,root,root) /etc/rc.d/init.d/frox
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/frox
 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
 %attr(755,root,root) %{_sbindir}/frox
-%attr(750,frox,frox) %dir /var/cache/frox
+%attr(770,root,frox) /var/lib/frox
 %{_mandir}/man*/*
This page took 0.082424 seconds and 4 git commands to generate.