aboutsummaryrefslogtreecommitdiffstats
path: root/main/pptpd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-09-16 11:21:12 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-09-16 11:21:12 +0000
commit43419d27a334214568486a4f6caaf19ebf245cbb (patch)
tree9ff324b320e215ce8dbb8fca8a8499dcc9b3c93e /main/pptpd
parentd3aa5f237ecaf9873444c5b3978af6d824b0a390 (diff)
downloadaports-43419d27a334214568486a4f6caaf19ebf245cbb.tar.bz2
aports-43419d27a334214568486a4f6caaf19ebf245cbb.tar.xz
main/pptpd: moved from testing
Diffstat (limited to 'main/pptpd')
-rw-r--r--main/pptpd/APKBUILD70
-rw-r--r--main/pptpd/fix_MSG_TRYHARD.patch13
-rw-r--r--main/pptpd/options.pptp11
-rw-r--r--main/pptpd/pptpd.conf88
-rw-r--r--main/pptpd/pptpd.confd5
-rw-r--r--main/pptpd/pptpd.initd20
-rw-r--r--main/pptpd/pptpd.patch32
-rw-r--r--main/pptpd/rcpptpd67
8 files changed, 306 insertions, 0 deletions
diff --git a/main/pptpd/APKBUILD b/main/pptpd/APKBUILD
new file mode 100644
index 0000000000..a1a8400b72
--- /dev/null
+++ b/main/pptpd/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=pptpd
+pkgver=1.4.0
+pkgrel=0
+pkgdesc="PoPToP - PPTP Daemon, Linux as Microsoft VPN Server"
+url="http://www.poptop.org/"
+arch="all"
+license="GPL v2 or later"
+depends=""
+makedepends="ppp-dev"
+install=""
+subpackages="$pkgname-doc"
+source="saveas-http://sourceforge.net/projects/poptop/files/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz/download/$pkgname-$pkgver.tar.gz
+ fix_MSG_TRYHARD.patch
+ pptpd.patch
+ pptpd.confd
+ pptpd.initd
+ options.pptp
+ pptpd.conf
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+ install -Dm755 "$srcdir"/pptpd.initd "$pkgdir"/etc/init.d/pptpd
+ install -Dm644 "$srcdir"/pptpd.confd "$pkgdir"/etc/conf.d/pptpd
+ install -Dm644 "$srcdir"/options.pptp "$pkgdir"/etc/ppp/options.pptp
+ install -Dm644 "$srcdir"/pptpd.conf "$pkgdir"/etc/
+}
+
+md5sums="36f9f45c6ffa92bc3b6e24ae2d053505 pptpd-1.4.0.tar.gz
+3dc72385cb3df526176a54ef2d2a7e06 fix_MSG_TRYHARD.patch
+7b274230768ab70aa32f45df06da501c pptpd.patch
+bff575819b8997e7bbe743b95cb134cb pptpd.confd
+184b6c9cc04e1efc830e39da6c3bfefc pptpd.initd
+95f1efd9f4f896bf3b7aef1940c58e79 options.pptp
+0a7af8968a964ebccf12ad512be9bba5 pptpd.conf"
+sha256sums="8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0 pptpd-1.4.0.tar.gz
+a37ad055e31113fc8c51cc9c2b1f513dd1cb76093bd6697ac31232669a038b47 fix_MSG_TRYHARD.patch
+215df31dc64ca1706a1257f33d90af101193e000c85688cf56c6fc6452b3697c pptpd.patch
+4d69da546e36439dc1a7cb5abb949ad48046155752c047babb5472decdfa1958 pptpd.confd
+9c7f6a5deaecd4098312eefedf9d803cbea1728f7b61d08451fa9a88b105f3c7 pptpd.initd
+668b4e3c8e48f7b96836497f43b449414ae4cb0c555b197a033843c75ef14aed options.pptp
+19695e6dcf3e6df1aae0933fe5e91abc094999957cb3890a7f3b671b21f83ae3 pptpd.conf"
+sha512sums="cfb4caef3025c0721e7fabf8b7bf595739f2d3048555b30616cdadc37e70ba9e1c50561c25091dd617b5448da2816aeaf83aea0fc2ef6b0dd5e3fe35d9591484 pptpd-1.4.0.tar.gz
+718e9fd6a53322f2f390ee4d07b2b4f88b6dd3ad130d4471a4e12e82910942982a06865c06296ff26f08e87aa65f4f7ee4a020cf7c2ff0d67ca5bfb794fe10bc fix_MSG_TRYHARD.patch
+2adbd7203451fe63472fdd443afcf9c85b66d1d4965574f94a7e99a29fdd7f37cfe1eb0f82afebef0e6e11726e0702208e75e90f9867b1103f1d5e401f8ba47f pptpd.patch
+59f118715cf6c36442687a58f46a54519fb5125383e85c4fa352a4c97f8a4e19f46c9715330550755eb9691e8174b70cdfab48fbd14c2707364e8083d6baa488 pptpd.confd
+22641da93b5b5a642383edf4c47cbb702b25ab44f4716fc9d146a23a382557d36f7fe70288ff016731400c48fbbb7addd8c0177628aa16607190ac04f36ad6ce pptpd.initd
+acf235a1c34f34cded7f2c56d6757fec099032ffaefae003e79b0517ad3fc53e19698e8c644193da9613707f8923b9c78f9e642aa0d9c785db1d4e51717a486e options.pptp
+ed6022b6711b0e6b3e336220d6da7ec9dd7d3a0679fc9219d0931f3b165296b80bc21e23123cc0ed621d76d06d5ad3435659eb7b924daa735ee1a069c1ebcbc1 pptpd.conf"
diff --git a/main/pptpd/fix_MSG_TRYHARD.patch b/main/pptpd/fix_MSG_TRYHARD.patch
new file mode 100644
index 0000000000..3e30295ca6
--- /dev/null
+++ b/main/pptpd/fix_MSG_TRYHARD.patch
@@ -0,0 +1,13 @@
+--- a/bcrelay.c
++++ b/bcrelay.c
+@@ -61,6 +61,10 @@
+ // software to your hearts content. You are free to redistribute it as
+ // long as it is accompanied with the source and my credit is included.
+
++#ifndef MSG_TRYHARD
++ # define MSG_TRYHARD MSG_DONTROUTE
++#endif
++
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
diff --git a/main/pptpd/options.pptp b/main/pptpd/options.pptp
new file mode 100644
index 0000000000..645c6e24d7
--- /dev/null
+++ b/main/pptpd/options.pptp
@@ -0,0 +1,11 @@
+lock
+debug
+auth
++chap
++chapms
++chapms-v2
+mppe-40
+mppe-128
+mppe-stateless
+name test02
+proxyarp
diff --git a/main/pptpd/pptpd.conf b/main/pptpd/pptpd.conf
new file mode 100644
index 0000000000..258f5d5ccc
--- /dev/null
+++ b/main/pptpd/pptpd.conf
@@ -0,0 +1,88 @@
+################################################################################
+#
+# Sample PoPToP configuration file
+#
+# for PoPToP version 1.0.0
+#
+################################################################################
+
+# TAG: speed
+#
+# Specifies the speed for the PPP daemon to talk at.
+# Some PPP daemons will ignore this value.
+#
+speed 115200
+
+# TAG: option
+#
+# Specifies the location of the PPP options file.
+# By default PPP looks in '/etc/ppp/options'
+#
+#option /this/is/the/options/file
+option /etc/ppp/options.pptp
+
+# TAG: debug
+#
+# Turns on (more) debugging to syslog.
+#
+debug
+
+# TAG: localip
+# TAG: remoteip
+#
+# Specifies the local and remote IP address ranges.
+#
+# You can specify single IP addresses seperated by commas or you can
+# specify ranges, or both. For example:
+#
+# 192.168.0.234,192.168.0.245-249,192.168.0.254
+#
+# IMPORTANT RESTRICTIONS:
+#
+# 1. No spaces are permitted between commas or within addresses.
+#
+# 2. If you give more IP addresses than MAX_CONNECTIONS, it will
+# start at the beginning of the list and go until it gets
+# MAX_CONNECTIONS IPs. Others will be ignored.
+#
+# 3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
+# you must type 234-238 if you mean this.
+#
+# 4. If you give a single localIP, that's ok - all local IPs will
+# be set to the given one. You MUST still give at least one remote
+# IP for each simultaneous client.
+#
+#localip 192.168.0.234-238,192.168.0.245
+#remoteip 192.168.1.234-238,192.168.1.245
+
+localip 192.168.0.1
+remoteip 192.168.1.100-199
+
+# TAG: ipxnets
+#
+# This gives the range of IPX networks to allocate to clients. By
+# default IPX network number allocation is not handled internally.
+# By putting a low and high network number here a pool of IPX networks
+# can be defined. If this is done then there must be one IPX network
+# per client.
+#
+# The format is a pair of hex numbers without any 0x prefix separated
+# by a hyphen.
+#
+#ipxnets 00001000-00001FFF
+
+# TAG: listen
+#
+# Defines the IP address of the local interface on which pptpd
+# should listen for connections. The default is to listen on all
+# local interfaces (even ones brought up by pptp connections, thus
+# permitting pptp tunnels inside the pptp tunnels).
+#
+#listen 192.168.0.1
+
+# TAG: pidfile
+#
+# This defines the file name in which pptpd should store its process
+# ID (or pid). The default is /var/run/pptpd.pid.
+#
+pidfile /var/run/pptpd.pid
diff --git a/main/pptpd/pptpd.confd b/main/pptpd/pptpd.confd
new file mode 100644
index 0000000000..1169e57f1c
--- /dev/null
+++ b/main/pptpd/pptpd.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/pptpd
+
+# Any extra options you want to pass to pptpd
+# on start-up should be put here.
+PPTPD_OPTS=""
diff --git a/main/pptpd/pptpd.initd b/main/pptpd/pptpd.initd
new file mode 100644
index 0000000000..36af3f25ff
--- /dev/null
+++ b/main/pptpd/pptpd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting pptpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/pptpd -- ${PPTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pptpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/pptpd.pid
+ result=$?
+ start-stop-daemon --stop --quiet --exec /usr/sbin/pptpctrl
+ result=$(( $result + $? ))
+ eend $result
+}
diff --git a/main/pptpd/pptpd.patch b/main/pptpd/pptpd.patch
new file mode 100644
index 0000000000..c2118889da
--- /dev/null
+++ b/main/pptpd/pptpd.patch
@@ -0,0 +1,32 @@
+--- pptpd-1.3.4/Makefile.am
++++ pptpd-1.3.4-orig/Makefile.am
+@@ -11,7 +11,8 @@
+ ## warning with -Wmissing-prototypes).
+ ## -Wmissing-prototypes removed (eg, Linux 2.2.6 headers
+ ## aren't up to it).
+-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++OPTFLAGS=-O2
++CFLAGS = $(OPTFLAGS) -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
+
+--- pptpd-1.3.4/plugins/Makefile
++++ pptpd-1.3.4-orig/plugins/Makefile
+@@ -3,7 +3,7 @@
+ CFLAGS = $(COPTS) -I.. -I../../include -fPIC
+ LDFLAGS = -shared
+ LDADD = -lutil
+-INSTALL = install -o root
++INSTALL = install
+ prefix = /usr/local
+
+ PLUGINS = pptpd-logwtmp.so
+@@ -18,7 +18,7 @@
+ %.so: %.c
+ $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
+
+-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd
++LIBDIR = $(DESTDIR)$(prefix)/lib/pptpd
+
+ install: $(PLUGINS)
+ $(INSTALL) -d $(LIBDIR)
diff --git a/main/pptpd/rcpptpd b/main/pptpd/rcpptpd
new file mode 100644
index 0000000000..83afd0ce76
--- /dev/null
+++ b/main/pptpd/rcpptpd
@@ -0,0 +1,67 @@
+#!/bin/sh
+# Copyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
+#
+# Author: Bernd Kaindl
+#
+# /etc/init.d/pptpd
+#
+
+### BEGIN INIT INFO
+# Provides: pptpd
+# Required-Start: $remote_fs $network
+# Required-Stop: $remote_fs $network
+# Default-Start: 3 5
+# Default-Stop:
+# Description: start pptp daemon
+# Short-Description: pptp daemon
+### END INIT INFO
+
+PPTPD_BIN=/usr/sbin/pptpd
+test -x $PPTPD_BIN || exit 5
+
+# Shell functions sourced from /etc/rc.status:
+. /etc/rc.status
+
+# First reset status of this service
+rc_reset
+
+case "$1" in
+ start)
+ echo -n "Starting MS VPN server pptpd"
+ if modprobe ppp_mppe ; then
+ startproc -sq $PPTPD_BIN
+ rc_status -v
+ else
+ rc_failed 3
+ fi
+ ;;
+ stop)
+ echo -n "Shutting down MS VPN server pptpd"
+ killproc -TERM $PPTPD_BIN
+ rc_status -v
+ rmmod ppp_mppe > /dev/null 2>&1
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ force-reload)
+ $0 stop && $0 start
+ rc_status
+ ;;
+ reload)
+ rc_failed 3
+ rc_status -v
+ ;;
+ status)
+ echo -n "Checking for MS VPN server pptpd: "
+ checkproc $PPTPD_BIN
+ rc_status -v
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+ exit 1
+ ;;
+esac
+rc_exit