summaryrefslogtreecommitdiff
path: root/package/pptp
diff options
context:
space:
mode:
Diffstat (limited to 'package/pptp')
-rw-r--r--package/pptp/Config.in11
-rw-r--r--package/pptp/Makefile30
-rw-r--r--package/pptp/files/ifup.pptp45
-rw-r--r--package/pptp/files/options.pptp6
-rw-r--r--package/pptp/ipkg/pptp.conffiles1
-rw-r--r--package/pptp/ipkg/pptp.control5
6 files changed, 98 insertions, 0 deletions
diff --git a/package/pptp/Config.in b/package/pptp/Config.in
new file mode 100644
index 000000000..3f132d202
--- /dev/null
+++ b/package/pptp/Config.in
@@ -0,0 +1,11 @@
+config ADK_PACKAGE_PPTP
+ prompt "pptp.............................. PPTP (Point-to-Point Tunneling Protocol) client"
+ tristate
+ default n
+ select ADK_KPACKAGE_KMOD_NET_IPGRE
+ select ADK_PACKAGE_PPP
+ help
+ A Point-to-Point Tunneling Protocol Client
+
+ http://pptpclient.sourceforge.net/
+
diff --git a/package/pptp/Makefile b/package/pptp/Makefile
new file mode 100644
index 000000000..5c76fbba7
--- /dev/null
+++ b/package/pptp/Makefile
@@ -0,0 +1,30 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= pptp
+PKG_VERSION:= 1.6.0
+PKG_RELEASE:= 3
+PKG_MD5SUM:= 9a706327fb9827541d7c86d48ceb9631
+MASTER_SITES:= ${MASTER_SITE_SOURCEFORGE:=pptpclient/}
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,PPTP,pptp,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+BUILD_STYLE:= auto
+MAKE_FLAGS+= CC="${TARGET_CC}" \
+ CFLAGS="${TARGET_CFLAGS}"
+
+do-install:
+ ${INSTALL_DIR} ${IDIR_PPTP}/sbin
+ ${INSTALL_DIR} ${IDIR_PPTP}/usr/sbin
+ ${INSTALL_DIR} ${IDIR_PPTP}/etc/ppp
+ ${INSTALL_BIN} ./files/ifup.pptp ${IDIR_PPTP}/sbin/ifup.pptp
+ ${INSTALL_DATA} ./files/options.pptp ${IDIR_PPTP}/etc/ppp/
+ ${INSTALL_BIN} ${WRKBUILD}/pptp ${IDIR_PPTP}/usr/sbin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/pptp/files/ifup.pptp b/package/pptp/files/ifup.pptp
new file mode 100644
index 000000000..f401a36b2
--- /dev/null
+++ b/package/pptp/files/ifup.pptp
@@ -0,0 +1,45 @@
+#!/bin/sh
+[ $# = 0 ] && { echo " $0 <group>"; exit; }
+. /etc/config/network
+type=$1
+
+eval "proto=\"\${${type}_proto}\""
+[ "$proto" = "pptp" ] || {
+ echo "$0: ${type}_proto isn't pptp"
+ exit
+}
+
+mkdir -p /var/lock
+
+for module in slhc ppp_generic ppp_async ip_gre; do
+ /sbin/insmod $module 2>&- >&-
+done
+
+KEEPALIVE=${ppp_redialperiod:+lcp-echo-interval $ppp_redialperiod lcp-echo-failure 5}
+case "$ppp_demand" in
+ on|1|enabled)
+ DEMAND=${ppp_idletime:+demand idle $ppp_idletime}
+ [ -f /etc/ppp/filter ] && DEMAND=${DEMAND:+precompiled-active-filter /etc/ppp/filter $DEMAND}
+ ;;
+ *) DEMAND="persist";;
+esac
+MTU=${ppp_mtu:-1452}
+
+[ "$pptp_proto" = "static" ] || pptp_proto="dhcp"
+do_ifup $pptp_proto $type
+
+/usr/sbin/pppd \
+ pty "/usr/sbin/pptp $pptp_server_ip --loglevel 0 --nolaunchpppd" \
+ file /etc/ppp/options.pptp \
+ connect /bin/true \
+ usepeerdns \
+ defaultroute \
+ replacedefaultroute \
+ linkname "$type" \
+ ipparam "$type" \
+ user "$ppp_username" \
+ password "$ppp_passwd" \
+ mtu $MTU mru $MTU \
+ $DEMAND \
+ $KEEPALIVE
+
diff --git a/package/pptp/files/options.pptp b/package/pptp/files/options.pptp
new file mode 100644
index 000000000..c520de74b
--- /dev/null
+++ b/package/pptp/files/options.pptp
@@ -0,0 +1,6 @@
+lock
+noauth
+nobsdcomp
+nodeflate
+idle 0
+defaultroute
diff --git a/package/pptp/ipkg/pptp.conffiles b/package/pptp/ipkg/pptp.conffiles
new file mode 100644
index 000000000..136db31f1
--- /dev/null
+++ b/package/pptp/ipkg/pptp.conffiles
@@ -0,0 +1 @@
+/etc/ppp/options.pptp \ No newline at end of file
diff --git a/package/pptp/ipkg/pptp.control b/package/pptp/ipkg/pptp.control
new file mode 100644
index 000000000..e582c6221
--- /dev/null
+++ b/package/pptp/ipkg/pptp.control
@@ -0,0 +1,5 @@
+Package: pptp
+Priority: optional
+Section: net
+Description: a Point-to-Point Tunneling Protocol (PPTP) client
+Depends: ppp, kmod-gre