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:
12 Summary: PoPToP Point to Point Tunneling Server
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
27 Requires(post
): /sbin
/chkconfig
28 Requires(preun
): /sbin
/chkconfig
, /sbin
/service
29 Requires(postun
): /sbin
/service
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.
39 # Fix permissions for debuginfo package
42 # Fix for distros with %{_libdir} = /usr/lib64
43 %{__perl} -pi -e 's,/usr/lib/pptpd,%{_libdir}/pptpd
,;' pptpctrl.c
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}'
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}
67 DESTDIR
=%{buildroot} \
68 INSTALL
=%{__install} \
69 LIBDIR
=%{buildroot}%{_libdir}/pptpd \
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
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"
;
87 { echo "possible outdated executable detected
; we now use
%{_sbindir}/pptp*, perhaps you should run the following command:"; echo "rm -i $OUTD" ;}
90 [ $
1 -gt
0 ] && /sbin
/service pptpd condrestart
&> /dev
/null ||
:
93 if [ "$
1"
-lt
1 ]; then
94 /sbin
/service pptpd stop
&> /dev
/null ||
:
95 /sbin
/chkconfig
--del pptpd ||
:
99 %{__rm} -rf %{buildroot}
102 %defattr(-,root
,root
,0755)
103 %doc AUTHORS COPYING INSTALL README
* TODO ChangeLog
* samples
106 %{_sbindir}/pptp
-portslave
107 %{!?_without_bcrelay:%{_sbindir}/bcrelay}
108 %{_libdir}/pptpd
/pptpd
-logwtmp.so
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
119 * Tue Sep
5 2006 Paul Howarth
<paul@city
-fan.org
> - 1.3.3-1
122 - Add %
%postun scriptlet dependency
for /sbin
/service
124 * Fri Mar
31 2006 Paul Howarth
<paul@city
-fan.org
> - 1.3.1-1
127 * Fri Mar
31 2006 Paul Howarth
<paul@city
-fan.org
> - 1.3.0-1
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
>
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.