]>
Commit | Line | Data |
---|---|---|
eed9da4b | 1 | # Conditional build: |
2840918e | 2 | %bcond_without libiptc # doesn't build with 2.2 kernel |
eed9da4b | 3 | # |
a5ed2771 | 4 | Summary: Transparent FTP proxy |
301f6c59 | 5 | Summary(pl.UTF-8): Przezroczyste proxy FTP |
a5ed2771 | 6 | Name: frox |
8955bdf6 | 7 | Version: 0.7.18 |
2c6353d8 | 8 | Release: 3 |
a5ed2771 | 9 | License: GPL |
10 | Group: Networking/Daemons | |
6abb7011 | 11 | Source0: http://frox.sourceforge.net/download/%{name}-%{version}.tar.bz2 |
8955bdf6 | 12 | # Source0-md5: d30c35b9820d706ff2f9a6ab3b501247 |
a5ed2771 | 13 | Source1: %{name}.init |
99ab78a8 JK |
14 | Source2: %{name}.sysconfig |
15 | Patch0: %{name}-config.patch | |
7a7fc3b4 | 16 | URL: http://frox.sourceforge.net/ |
23363bc5 | 17 | BuildRequires: autoconf |
18 | BuildRequires: automake | |
2840918e | 19 | BuildRequires: linux-libc-headers >= 7:2.6.12.0-12 |
af9e677f ER |
20 | BuildRequires: rpmbuild(macros) >= 1.268 |
21 | Requires(post,preun): /sbin/chkconfig | |
22 | Requires(postun): /usr/sbin/groupdel | |
23 | Requires(postun): /usr/sbin/userdel | |
a17adda6 | 24 | Requires(pre): /bin/id |
4e6a99fb | 25 | Requires(pre): /usr/bin/getgid |
a17adda6 | 26 | Requires(pre): /usr/sbin/groupadd |
4e6a99fb | 27 | Requires(pre): /usr/sbin/groupmod |
a17adda6 | 28 | Requires(pre): /usr/sbin/useradd |
4e6a99fb | 29 | Requires(pre): /usr/sbin/usermod |
af9e677f | 30 | Requires: rc-scripts |
4e6a99fb | 31 | Provides: group(frox) |
32 | Provides: user(frox) | |
a5ed2771 | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
328e9005 | 36 | Frox is transparent FTP proxy. It also has support for non-transparent |
7a7fc3b4 | 37 | connections, caching of anonymous ftp, and active --> passive |
38 | conversion of data connections. | |
39 | ||
f450bb37 JR |
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. | |
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 | |
61 | rm -rf $RPM_BUILD_ROOT | |
76e521d2 | 62 | install -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 | 69 | install src/frox.conf $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf |
a5ed2771 | 70 | install doc/frox.man $RPM_BUILD_ROOT%{_mandir}/man8/frox.8 |
99ab78a8 | 71 | install doc/frox.conf.man $RPM_BUILD_ROOT%{_mandir}/man5/frox.5 |
23760fd8 | 72 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/frox |
73 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/frox | |
76e521d2 AA |
74 | |
75 | cat >$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 | } | |
80 | EOF | |
a5ed2771 | 81 | |
1f56559b JB |
82 | %clean |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
7840e153 | 85 | %pre |
e085e62c ER |
86 | if [ "`/usr/bin/getgid frox`" = 97 ]; then |
87 | /usr/sbin/groupmod -g 103 frox | |
7840e153 | 88 | fi |
2e45d37d | 89 | %groupadd -g 103 frox |
e085e62c | 90 | |
2e45d37d | 91 | if [ -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 | 95 | fi |
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 | 103 | if [ "$1" = "0" ]; then |
af9e677f | 104 | %service frox stop |
d5209eb1 | 105 | /sbin/chkconfig --del frox |
106 | fi | |
a5ed2771 | 107 | |
7840e153 | 108 | %postun |
109 | if [ "$1" = "0" ]; then | |
4e6a99fb | 110 | %userremove frox |
111 | %groupremove frox | |
7840e153 | 112 | fi |
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*/* |