]> git.pld-linux.org Git - packages/frox.git/blob - frox.spec
- updated to 0.7.15
[packages/frox.git] / frox.spec
1 #
2 # Conditional build:
3 %bcond_with     kernel22
4 #
5 Summary:        Transparent FTP proxy
6 Summary(pl):    Przezroczyste proxy FTP
7 Name:           frox
8 Version:        0.7.15
9 %if %{with kernel22}
10 Release:        1@2.2
11 %else
12 Release:        1
13 %endif
14 License:        GPL
15 Group:          Networking/Daemons
16 Source0:        http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2
17 # Source0-md5:  fae2d10d6ac742f298dc5fb47a0e306f
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(postun):       /usr/sbin/userdel
30 Requires(postun):       /usr/sbin/groupdel
31 Requires(post,preun):   /sbin/chkconfig
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 przezroczyste proxy FTP, posiada równie¿ wsparcie do
41 nieprzezroczystych po³±czeñ, buforowania anonimowego ftp, i konwersji
42 po³±czeñ z aktywnych na pasywne.
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         %{?!with_kernel22:--enable-libiptc} \
55         %{?with_kernel22:--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{/var/lib/frox,%{_mandir}/man{5,8}} \
63         $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,sysconfig,rc.d/init.d} \
64         $RPM_BUILD_ROOT/var/log/{archiv/frox,frox}
65
66 %{__make} install \
67         DESTDIR=$RPM_BUILD_ROOT
68
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%{_sysconfdir}/rc.d/init.d/frox
73 install %{SOURCE2}      $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/frox
74
75 cat >$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/frox << EOF
76 /var/log/frox/frox-log {
77         olddir /var/log/archiv/frox
78         nocreate
79 }
80 EOF
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %pre
86 if [ ! -n "`getgid frox`" ]; then
87         /usr/sbin/groupadd -g 97 -r -f frox 1>&2 || :
88 fi
89
90 if [ ! -n "`id -u frox 2>/dev/null`" ]; then
91         /usr/sbin/useradd -M -o -r -u 97 -s /bin/false \
92                 -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox 1>&2 || :
93 fi
94
95 %post
96 /sbin/chkconfig --add frox
97 if [ -f /var/lock/subsys/frox ]; then
98         /etc/rc.d/init.d/frox restart >&2
99 else
100         echo "Run \"/etc/rc.d/init.d/frox start\" to start frox daemons."
101 fi
102
103 %preun
104 if [ "$1" = "0" ]; then
105         if [ -f /var/lock/subsys/frox ]; then
106                 /etc/rc.d/init.d/frox stop >&2
107         fi
108         /sbin/chkconfig --del frox
109 fi
110
111 %postun
112 if [ "$1" = "0" ]; then
113         /usr/sbin/userdel frox 2> /dev/null
114         /usr/sbin/groupdel frox 2> /dev/null
115 fi
116
117 %files
118 %defattr(644,root,root,755)
119 %doc doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
120 %attr(754,root,root) %{_sysconfdir}/rc.d/init.d/frox
121 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/frox
122 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
123 %{_sysconfdir}/logrotate.d/frox
124 %attr(755,root,root) %{_sbindir}/frox
125 %attr(770,root,frox) /var/lib/frox
126 %attr(770,root,frox) /var/log/frox
127 %attr(770,root,frox) /var/log/archiv/frox
128 %{_mandir}/man*/*
This page took 0.430908 seconds and 4 git commands to generate.