%define name pptpd-server %define realname pptpd %define version 1.2.1 %define their_version 1.2.1 %define release 1mdk %define buildlibwrap 1 %define buildbsdppp 0 %define buildslirp 0 %define buildipalloc 0 %define buildbcrelay 1 %define buildpnsmode 0 Summary: PoPToP Linux VPN server Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Networking/Other Source0: %{realname}-%{their_version}.tar.bz2 Source1: %{realname}-init.bz2 #Patch0: %{realname}-%{version}-headers.patch.bz2 URL: http://www.poptop.org Provides: %{realname} Requires: tcp_wrappers PreReq: rpm-helper Buildroot: %{_tmppath}/%{name}-%{version}-buildroot %description PoPToP is the PPTP server solution for Linux (ports exist for Solaris 2.6, OpenBSD and FreeBSD and other). To date no real solution existed if you wished to include Linux server in PPTP established VPNs. PoPToP resolves that problem by allowing Linux servers to function seamlessly in the PPTP VPN environment. This enables administrators to leverage the considerable benifits of both Microsoft and Linux. The current release supports Windows 9x/NT/2000 PPTP clients and PPTP Linux clients. PoPToP is free GNU software. # allow --with[out] <feature> at rpm command line build # e.g. --with ipalloc --without libwrap # --with overrides --without %{?_without_libwrap: %{expand: %%define buildlibwrap 0}} %{?_without_bsdppp: %{expand: %%define buildbsdppp 0}} %{?_without_slirp: %{expand: %%define buildslirp 0}} %{?_without_ipalloc: %{expand: %%define buildipalloc 0}} %{?_without_bcrelay: %{expand: %%define buildbcrelay 0}} %{?_without_pnsmode: %{expand: %%define buildpnsmode 0}} %{?_with_libwrap: %{expand: %%define buildlibwrap 1}} %{?_with_bsdppp: %{expand: %%define buildbsdppp 1}} %{?_with_slirp: %{expand: %%define buildslirp 1}} %{?_with_ipalloc: %{expand: %%define buildipalloc 1}} %{?_with_bcrelay: %{expand: %%define buildbcrelay 1}} %{?_with_pnsmode: %{expand: %%define buildpnsmode 1}} %prep %setup -q -n %{realname}-%{their_version} #%patch -p1 bzcat %{SOURCE1} > %{realname}-init rm -rf `find -name CVS` %build buildopts="" %if %{buildlibwrap} buildopts="$buildopts --with-libwrap" %endif %if %{buildbsdppp} buildopts="$buildopts --with-bsdppp" %endif %if %{buildslirp} buildopts="$buildopts --with-slirp" %endif %if %{buildipalloc} buildopts="$buildopts --with-pppd-ip-alloc" %endif %if %{buildbcrelay} buildopts="$buildopts --with-bcrelay" %endif %if %{buildpnsmode} buildopts="$buildopts --with-pns-mode" %endif %configure $buildopts perl -p -i -e "s|-o root||" plugins/Makefile %make %install rm -rf $RPM_BUILD_ROOT %makeinstall install -m 0644 samples/%{realname}.conf -D $RPM_BUILD_ROOT%{_sysconfdir}/%{realname}.conf install -m 0644 samples/options.%{realname} -D $RPM_BUILD_ROOT%{_sysconfdir}/options.%{realname} install -m 0755 %{realname}-init -D $RPM_BUILD_ROOT%{_initrddir}/%{realname} mkdir -p $RPM_BUILD_ROOT/%{_bindir} install -m 0755 tools/vpnuser $RPM_BUILD_ROOT/%{_bindir}/vpnuser install -m 0755 tools/vpnstats $RPM_BUILD_ROOT/%{_bindir}/vpnstats install -m 0755 tools/vpnstats.pl $RPM_BUILD_ROOT/%{_bindir}/vpnstats.pl install -m 0755 tools/pptp-portslave $RPM_BUILD_ROOT/%{_sbindir}/pptp-portslave %post %_post_service %{realname} %preun %_preun_service %{realname} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc AUTHORS COPYING INSTALL README* TODO ChangeLog* samples %{_mandir}/man[58]/pptp* %config(noreplace) %{_sysconfdir}/%{realname}.conf %config(noreplace) %{_sysconfdir}/options.%{realname} %defattr(755,root,root,755) %config(noreplace) %{_initrddir}/%{realname} %{_sbindir}/* %{_bindir}/* %{_libdir}/* %changelog * Wed Jun 23 2004 Florin <florin@mandrakesoft.com> 1.2.1-1mdk - 1.2.1 - add modprobe lines in the initscript - remove the '-o root' in make install - remove the Anon-CVS and the html/* files in docs - add the tools %{_bindir} binaries - use mcros for %configure * Tue Jun 24 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 1.1.4-0.b4.1mdk - 1.1.4-b4 - quiet setup - rm -rf buildroot in correct stage - cleanups, cosmetics, macroization.. - use %%_post_service and %%_preun_service - updated url - bzip2 %%{SOURCE1} - use %%makeinstall macro - compile with $RPM_OPT_FLAGS * Mon Mar 03 2003 Lenny Cartier <lenny@mandrakesoft.com> 1.1.2-0.3mdk - fix call to right initscript in preun section rather than in post - add missing clean section * Wed Nov 06 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.1.2-0.2mdk - initscript (Todd) - remove /etc/rc.d/init.d/pptpd.conf * Thu Feb 14 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.1.2-0.1mdk - 1.1.2 * Thu Jan 25 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.0.1-1mdk - updated to 1.0.1 * Thu Sep 14 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.0.0-1mdk - rebuild * Wed May 03 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.9.17-2mdk - fix group - fix files section * Wed Oct 13 1999 Lenny Cartier <lenny@mandrakesoft.com> - Specfile adaptation.