Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / pptpd / pptpd.spec
blobb23145820b41af7de4705d0a0e94f7aef2227cef
1 %{!?__id_u: %define __id_u %([ -x /bin/id ]&&echo /bin/id||([ -x /usr/bin/id ]&&echo /usr/bin/id|| echo /bin/true)) -u}
3 # Available rpmbuild options:
5 # --without libwrap
6 # --with bsdppp
7 # --with slirp
8 # --with ipalloc
9 # --without bcrelay
12 Summary: PoPToP Point to Point Tunneling Server
13 Name: pptpd
14 Version: 1.3.4
15 Release: 1%{?dist}
16 License: GPL
17 Group: Applications/Internet
18 URL: http://poptop.sourceforge.net/
19 Source0: http://dl.sf.net/poptop/pptpd-%{version}.tar.gz
20 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
21 Requires: ppp >= 2.4.3
23 %if %{?_without_libwrap:0}%{!?_without_libwrap:1}
24 BuildRequires: tcp_wrappers
25 %endif
27 Requires(post): /sbin/chkconfig
28 Requires(preun): /sbin/chkconfig, /sbin/service
29 Requires(postun): /sbin/service
31 %description
32 This implements a Virtual Private Networking Server (VPN) that is
33 compatible with Microsoft VPN clients. It allows windows users to
34 connect to an internal firewalled network using their dialup.
36 %prep
37 %setup -q
39 # Fix permissions for debuginfo package
40 %{__chmod} 644 *.[ch]
42 # Fix for distros with %{_libdir} = /usr/lib64
43 %{__perl} -pi -e 's,/usr/lib/pptpd,%{_libdir}/pptpd,;' pptpctrl.c
45 %build
46 %configure \
47 %{!?_without_libwrap:--with-libwrap} \
48 %{?_without_libwrap:--without-libwrap} \
49 %{!?_with_bsdppp:--without-bsdppp} \
50 %{?_with_bsdppp:--with-bsdppp} \
51 %{!?_with_slirp:--without-slirp} \
52 %{?_with_slirp:--with-slirp} \
53 %{!?_with_ipalloc:--without-pppd-ip-alloc} \
54 %{?_with_ipalloc:--with-pppd-ip-alloc} \
55 %{!?_without_bcrelay:--with-bcrelay} \
56 %{?_without_bcrelay:--without-bcrelay}
57 (echo '#undef VERSION'; echo '#define VERSION "2.4.3"') >> plugins/patchlevel.h
58 %{__make} CFLAGS='-fno-builtin -fPIC -DSBINDIR=\"%{_sbindir}\" %{optflags}'
60 %install
61 %{__rm} -rf %{buildroot}
62 %{__mkdir_p} %{buildroot}/etc/rc.d/init.d
63 %{__mkdir_p} %{buildroot}/etc/ppp
64 %{__mkdir_p} %{buildroot}%{_bindir}
65 %{__mkdir_p} %{buildroot}%{_mandir}/man{5,8}
66 %{__make} \
67 DESTDIR=%{buildroot} \
68 INSTALL=%{__install} \
69 LIBDIR=%{buildroot}%{_libdir}/pptpd \
70 install
71 %{__install} -m 0755 pptpd.init %{buildroot}/etc/rc.d/init.d/pptpd
72 %{__install} -m 0644 samples/pptpd.conf %{buildroot}/etc/pptpd.conf
73 %{__install} -m 0644 samples/options.pptpd %{buildroot}/etc/ppp/options.pptpd
74 %{__install} -m 0755 tools/vpnuser %{buildroot}%{_bindir}/vpnuser
75 %{__install} -m 0755 tools/vpnstats.pl %{buildroot}%{_bindir}/vpnstats.pl
76 %{__install} -m 0755 tools/pptp-portslave %{buildroot}%{_sbindir}/pptp-portslave
77 %{__install} -m 0644 pptpd.conf.5 %{buildroot}%{_mandir}/man5/pptpd.conf.5
78 %{__install} -m 0644 pptpd.8 %{buildroot}%{_mandir}/man8/pptpd.8
79 %{__install} -m 0644 pptpctrl.8 %{buildroot}%{_mandir}/man8/pptpctrl.8
81 %post
82 /sbin/chkconfig --add pptpd || :
83 OUTD="" ; for i in d manager ctrl ; do
84 test -x /sbin/pptp$i && OUTD="$OUTD /sbin/pptp$i" ;
85 done
86 test -z "$OUTD" || \
87 { echo "possible outdated executable detected; we now use %{_sbindir}/pptp*, perhaps you should run the following command:"; echo "rm -i $OUTD" ;}
89 %postun
90 [ $1 -gt 0 ] && /sbin/service pptpd condrestart &> /dev/null || :
92 %preun
93 if [ "$1" -lt 1 ]; then
94 /sbin/service pptpd stop &> /dev/null || :
95 /sbin/chkconfig --del pptpd || :
98 %clean
99 %{__rm} -rf %{buildroot}
101 %files
102 %defattr(-,root,root,0755)
103 %doc AUTHORS COPYING INSTALL README* TODO ChangeLog* samples
104 %{_sbindir}/pptpd
105 %{_sbindir}/pptpctrl
106 %{_sbindir}/pptp-portslave
107 %{!?_without_bcrelay:%{_sbindir}/bcrelay}
108 %{_libdir}/pptpd/pptpd-logwtmp.so
109 %{_bindir}/vpnuser
110 %{_bindir}/vpnstats.pl
111 %{_mandir}/man5/pptpd.conf.5*
112 %{_mandir}/man8/pptpd.8*
113 %{_mandir}/man8/pptpctrl.8*
114 /etc/rc.d/init.d/pptpd
115 %config(noreplace) /etc/pptpd.conf
116 %config(noreplace) /etc/ppp/options.pptpd
118 %changelog
119 * Tue Sep 5 2006 Paul Howarth <paul@city-fan.org> - 1.3.3-1
120 - Update to 1.3.3
121 - Add dist tag
122 - Add %%postun scriptlet dependency for /sbin/service
124 * Fri Mar 31 2006 Paul Howarth <paul@city-fan.org> - 1.3.1-1
125 - Update to 1.3.1
127 * Fri Mar 31 2006 Paul Howarth <paul@city-fan.org> - 1.3.0-1
128 - update to 1.3.0
129 - remove redundant macro definitions
130 - change Group: to one listed in rpm's GROUPS file
131 - use full URL for source
132 - simplify conditional build code
133 - use macros for destination directories
134 - honour %%{optflags}
135 - general spec file cleanup
136 - initscript updates:
137 don't enable the service by default
138 add reload and condrestart options
139 - condrestart service on package upgrade
140 - fix build on x86_64
141 - add buildreq tcp_wrappers
143 * Fri Feb 18 2005 James Cameron <james.cameron@hp.com>
144 - fix to use ppp 2.4.3 for plugin
146 * Thu Nov 11 2004 James Cameron <james.cameron@hp.com>
147 - adjust for building on Red Hat Enterprise Linux, per Charlie Brady
148 - remove vpnstats, superceded by vpnstats.pl
150 * Fri May 21 2004 James Cameron <james.cameron@hp.com>
151 - adjust for packaging naming and test
153 * Fri Apr 23 2004 James Cameron <james.cameron@hp.com>
154 - include vpnwho.pl
156 * Thu Apr 22 2004 James Cameron <james.cameron@hp.com>
157 - change description wording
158 - change URL for upstream
159 - release first candidate for 1.2.0
161 * Fri Jul 18 2003 R. de Vroede <richard@oip.tudelft.nl>
162 - Check the ChangeLog files.