]> git.pld-linux.org Git - packages/frox.git/blob - frox.spec
- reverting last change: removing new macros from %p{re,ost}{,un}
[packages/frox.git] / frox.spec
1 Summary:        Transparent FTP proxy
2 Name:           frox
3 Version:        0.6.4
4 Release:        1
5 License:        GPL
6 Group:          Networking/Daemons
7 Group(de):      Netzwerkwesen/Server
8 Group(pl):      Sieciowe/Serwery
9 Source0:        ftp://ftp.sourceforge.net/pub/sourceforge/frox/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Source2:        %{name}.conf
12 URL:            http://frox.sourceforge.net/
13 BuildRequires:  kernel-headers >= 2.4.0
14 Prereq:         rc-scripts
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %description
18 Frox is transparent FTP proxy. It also has support for non-transparent
19 connections, caching of anonymous ftp, and active --> passive
20 conversion of data connections.
21
22 %description -l pl
23 Frox to prze¼roczyste proxy FTP, posiada równie¿ wsparcie do
24 nie-transparentnych po³aczen, buforowania anonimowego ftp, i konwersji
25 aktywne-pasywne polaczenia.
26
27 %prep
28 %setup -q
29 %build
30 %configure \
31         --enable-http-cache \
32         --enable-local-cache \
33         --enable-libiptc \
34         --enable-transparent-data \
35         --enable-configfile=%{_sysconfdir}/frox.conf
36 %{__make}
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_mandir}/man8} \
41         $RPM_BUILD_ROOT/var/cache/frox/0{1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f}
42
43 %{__make} install DESTDIR=$RPM_BUILD_ROOT
44
45 install doc/frox.man    $RPM_BUILD_ROOT%{_mandir}/man8/frox.8
46 install %{SOURCE1}      $RPM_BUILD_ROOT/etc/rc.d/init.d/frox
47 install %{SOURCE2}      $RPM_BUILD_ROOT%{_sysconfdir}/frox.conf
48
49 gzip -9nf doc/{FAQ,README.transdata,RELEASE,SECURITY,TODO}
50
51 %pre
52 if [ ! -n "`getgid frox`" ]; then
53         /usr/sbin/groupadd -g 97 -r -f frox 1>&2 || :
54 fi
55
56 if [ ! -n "`id -u frox 2>/dev/null`" ]; then
57         /usr/sbin/useradd -M -o -r -u 97 -s /bin/false \
58                 -g squid -c "FROX ftp caching daemon" -d /var/cache/frox frox 1>&2 || :
59 fi              
60
61 %post
62 /sbin/chkconfig --add frox
63 if [ -f /var/lock/subsys/frox ]; then
64         /etc/rc.d/init.d/frox restart >&2
65 else
66         echo "Run \"/etc/rc.d/init.d/frox start\" to start frox daemons."
67 fi
68
69 %postun
70 # If package is being erased for the last time.
71 if [ "$1" = "0" ]; then
72         /usr/sbin/userdel frox 2> /dev/null
73         /usr/sbin/groupdel frox 2> /dev/null
74 fi              
75
76 %preun
77 if [ "$1" = "0" ]; then
78         if [ -f /var/lock/subsys/frox ]; then
79                 /etc/rc.d/init.d/frox stop >&2
80         fi
81         /sbin/chkconfig --del frox
82 fi
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(644,root,root,755)
89 %doc doc/*.gz
90 %attr(754,root,root) /etc/rc.d/init.d/frox
91 %attr(640,root,frox) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/frox.conf
92 %attr(755,root,root) %{_sbindir}/frox
93 %attr(750,frox,frox) %dir /var/cache/frox
94 %{_mandir}/man*/*
This page took 0.105093 seconds and 4 git commands to generate.