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