]> git.pld-linux.org Git - packages/frox.git/blob - frox.spec
- more s|/var/log/archiv|/var/log/archive|g
[packages/frox.git] / frox.spec
1 # Conditional build:
2 %bcond_without  libiptc         # doesn't build with 2.2 kernel
3 #
4 Summary:        Transparent FTP proxy
5 Summary(pl.UTF-8):      Przezroczyste proxy FTP
6 Name:           frox
7 Version:        0.7.18
8 Release:        3
9 License:        GPL
10 Group:          Networking/Daemons
11 Source0:        http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2
12 # Source0-md5:  d30c35b9820d706ff2f9a6ab3b501247
13 Source1:        %{name}.init
14 Source2:        %{name}.sysconfig
15 Patch0:         %{name}-config.patch
16 URL:            http://frox.sourceforge.net/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  linux-libc-headers >= 7:2.6.12.0-12
20 BuildRequires:  rpmbuild(macros) >= 1.268
21 Requires(post,preun):   /sbin/chkconfig
22 Requires(postun):       /usr/sbin/groupdel
23 Requires(postun):       /usr/sbin/userdel
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/bin/getgid
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(pre):  /usr/sbin/groupmod
28 Requires(pre):  /usr/sbin/useradd
29 Requires(pre):  /usr/sbin/usermod
30 Requires:       rc-scripts
31 Provides:       group(frox)
32 Provides:       user(frox)
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Frox is transparent FTP proxy. It also has support for non-transparent
37 connections, caching of anonymous ftp, and active --> passive
38 conversion of data connections.
39
40 %description -l pl.UTF-8
41 Frox to przezroczyste proxy FTP, posiada również wsparcie do
42 nieprzezroczystych połączeń, buforowania anonimowego ftp, i konwersji
43 połączeń z aktywnych na pasywne.
44
45 %prep
46 %setup -q
47 %patch0 -p1
48
49 %build
50 %{__aclocal}
51 %{__autoconf}
52 %configure \
53         --enable-http-cache \
54         --enable-local-cache \
55         --%{!?with_iptc:dis}%{?with_iptc:en}able-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/etc/{logrotate.d,sysconfig,rc.d/init.d} \
64         $RPM_BUILD_ROOT/var/{log/{archive/frox,frox},cache/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/etc/rc.d/init.d/frox
73 install %{SOURCE2}      $RPM_BUILD_ROOT/etc/sysconfig/frox
74
75 cat >$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/frox << EOF
76 /var/log/frox/frox-log {
77         olddir /var/log/archive/frox
78         nocreate
79 }
80 EOF
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %pre
86 if [ "`/usr/bin/getgid frox`" = 97 ]; then
87         /usr/sbin/groupmod -g 103 frox
88 fi
89 %groupadd -g 103 frox
90
91 if [ -n "`id -u frox 2>/dev/null`" ] && [ "`/bin/id -u frox`" = 97 ]; then
92         /usr/sbin/usermod -u 103 frox
93         chown -R frox:frox /var/cache/frox ||:
94         chown -R root:frox /var/log/frox /var/log/archive/frox ||:
95 fi
96 %useradd -u 103 -s /bin/false -g frox -c "FROX ftp caching daemon" -d /var/cache/frox frox
97
98 %post
99 /sbin/chkconfig --add frox
100 %service frox restart "frox daemons"
101
102 %preun
103 if [ "$1" = "0" ]; then
104         %service frox stop
105         /sbin/chkconfig --del frox
106 fi
107
108 %postun
109 if [ "$1" = "0" ]; then
110         %userremove frox
111         %groupremove frox
112 fi
113
114 %files
115 %defattr(644,root,root,755)
116 %doc doc/{ChangeLog,FAQ,README.transdata,RELEASE,SECURITY,TODO}
117 %attr(754,root,root) /etc/rc.d/init.d/frox
118 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/frox
119 %attr(640,root,frox) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frox.conf
120 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/frox
121 %attr(755,root,root) %{_sbindir}/frox
122 %attr(770,root,frox) /var/lib/frox
123 %attr(770,root,frox) /var/log/frox
124 %attr(770,root,frox) /var/log/archive/frox
125 %attr(770,frox,frox) /var/cache/frox
126 %{_mandir}/man*/*
This page took 0.074302 seconds and 3 git commands to generate.