]> git.pld-linux.org Git - packages/frox.git/blob - frox.spec
- updated to 0.7.6,
[packages/frox.git] / frox.spec
1
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 $?)
4 %if %{_kernel24}
5 %define         _kernel_series  2.4
6 %else
7 %define         _kernel_series  2.2
8 %endif
9
10 Summary:        Transparent FTP proxy
11 Summary(pl):    Prze¼roczyste proxy FTP
12 Name:           frox
13 Version:        0.7.6
14 Release:        1@%{_kernel_series}
15 License:        GPL
16 Group:          Networking/Daemons
17 Source0:        http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2
18 Source1:        %{name}.init
19 Source2:        %{name}.sysconfig
20 Patch0:         %{name}-config.patch
21 URL:            http://frox.sourceforge.net/
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 PreReq:         rc-scripts
25 Requires(pre):  /usr/bin/getgid
26 Requires(pre):  /bin/id
27 Requires(pre):  /usr/sbin/groupadd
28 Requires(pre):  /usr/sbin/useradd
29 Requires(post,preun):   /sbin/chkconfig
30 Requires(postun):       /usr/sbin/userdel
31 Requires(postun):       /usr/sbin/groupdel
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Frox is transparent FTP proxy. It also has support for non-transparent
36 connections, caching of anonymous ftp, and active --> passive
37 conversion of data connections.
38
39 %description -l pl
40 Frox to prze¼roczyste proxy FTP, posiada równie¿ wsparcie do
41 nie-transparentnych po³aczen, buforowania anonimowego ftp, i konwersji
42 aktywne-pasywne polaczenia.
43
44 %prep
45 %setup -q
46 %patch0 -p1
47
48 %build
49 %{__aclocal}
50 %{__autoconf}
51 %configure \
52         --enable-http-cache \
53         --enable-local-cache \
54         %{?_kernel24:--enable-libiptc} \
55         %{?!_kernel24:--disable-libiptc} \
56         --enable-transparent-data \
57         --enable-configfile=%{_sysconfdir}/frox.conf
58 %{__make}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_mandir}/man{5,8}} \
63         $RPM_BUILD_ROOT/var/lib/frox
64
65 %{__make} install DESTDIR=$RPM_BUILD_ROOT
66 install src/frox.conf   $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf
67
68 install doc/frox.man    $RPM_BUILD_ROOT%{_mandir}/man8/frox.8
69 install doc/frox.conf.man       $RPM_BUILD_ROOT%{_mandir}/man5/frox.5
70 install %{SOURCE1}      $RPM_BUILD_ROOT/etc/rc.d/init.d/frox
71 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/sysconfig/frox
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %pre
77 if [ ! -n "`getgid frox`" ]; then
78         /usr/sbin/groupadd -g 97 -r -f frox 1>&2 || :
79 fi
80
81 if [ ! -n "`id -u frox 2>/dev/null`" ]; then
82         /usr/sbin/useradd -M -o -r -u 97 -s /bin/false \
83                 -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox 1>&2 || :
84 fi
85
86 %post
87 /sbin/chkconfig --add frox
88 if [ -f /var/lock/subsys/frox ]; then
89         /etc/rc.d/init.d/frox restart >&2
90 else
91         echo "Run \"/etc/rc.d/init.d/frox start\" to start frox daemons."
92 fi
93
94 %preun
95 if [ "$1" = "0" ]; then
96         if [ -f /var/lock/subsys/frox ]; then
97                 /etc/rc.d/init.d/frox stop >&2
98         fi
99         /sbin/chkconfig --del frox
100 fi
101
102 %postun
103 if [ "$1" = "0" ]; then
104         /usr/sbin/userdel frox 2> /dev/null
105         /usr/sbin/groupdel frox 2> /dev/null
106 fi
107
108 %files
109 %defattr(644,root,root,755)
110 %doc doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
111 %attr(754,root,root) /etc/rc.d/init.d/frox
112 %attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/frox
113 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
114 %attr(755,root,root) %{_sbindir}/frox
115 %attr(770,root,frox) /var/lib/frox
116 %{_mandir}/man*/*
This page took 0.163818 seconds and 4 git commands to generate.