diff options
author | Martin Banky <martin.banky@gmail.com> | 2010-12-12 22:54:05 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-12-14 01:35:41 +0100 |
commit | 767dce8cee8b295ce91bc0ac1d71287eef4be08a (patch) | |
tree | b416a4339657c5e6091122d34bc506af4870cbc2 /package/xl2tp | |
parent | fc13fc7b57844429e09bd49d84f86b54971fc487 (diff) | |
download | buildroot-novena-767dce8cee8b295ce91bc0ac1d71287eef4be08a.tar.gz buildroot-novena-767dce8cee8b295ce91bc0ac1d71287eef4be08a.zip |
l2tp: convert to gentargets and change to xl2tp
l2tp is no longer being developed, and xl2tpd is forked from l2tpd and is
maintained by Xelerance Corporation.
[Peter: remove invalid pppd dependency]
Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/xl2tp')
-rw-r--r-- | package/xl2tp/Config.in | 11 | ||||
-rw-r--r-- | package/xl2tp/xl2tp-1.2.7-legacy.patch | 17 | ||||
-rw-r--r-- | package/xl2tp/xl2tp-1.2.7-makefile-flags.patch | 33 | ||||
-rw-r--r-- | package/xl2tp/xl2tp.mk | 33 | ||||
-rwxr-xr-x | package/xl2tp/xl2tpd | 27 |
5 files changed, 121 insertions, 0 deletions
diff --git a/package/xl2tp/Config.in b/package/xl2tp/Config.in new file mode 100644 index 000000000..8f9d9b110 --- /dev/null +++ b/package/xl2tp/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XL2TP + bool "xl2tp" + select BR2_PACKAGE_LIBPCAP + help + Layer 2 Tunnelling Protocol (RFC2661). + + xl2tpd is an open source implementation of the L2TP tunneling + protocol. xl2tpd is forked from l2tpd and is maintained by + Xelerance Corporation. + + http://www.xelerance.com/software/xl2tpd/ diff --git a/package/xl2tp/xl2tp-1.2.7-legacy.patch b/package/xl2tp/xl2tp-1.2.7-legacy.patch new file mode 100644 index 000000000..5279fd707 --- /dev/null +++ b/package/xl2tp/xl2tp-1.2.7-legacy.patch @@ -0,0 +1,17 @@ +Replace SUSV3-specific functions index, bcopy, bzero and bcmp by their +POSIX variants. + +--- l2tpd-0.70-pre20031121.oorig/osport.h 2004-07-08 22:47:52.000000000 +0200 ++++ l2tpd-0.70-pre20031121/osport.h 2006-12-28 15:32:50.000000000 +0100 +@@ -37,4 +37,11 @@ + + #endif /* defined(SOLARIS) */ + ++#if defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS ++# define index(x, y) strchr(x, y) ++# define bcopy(S1, S2, LEN) ((void)memmove(S2, S1, LEN)) ++# define bzero(S1, LEN) ((void)memset(S1, 0, LEN)) ++# define bcmp(S1,S2,LEN) ((memcmp(S2, S1, LEN)==0)?0:1) ++#endif /* defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS */ ++ + #endif /* _OSPORT_H_ */ diff --git a/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch b/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch new file mode 100644 index 000000000..68a56a60b --- /dev/null +++ b/package/xl2tp/xl2tp-1.2.7-makefile-flags.patch @@ -0,0 +1,33 @@ +Make sure that the CFLAGS passed on the command line are taken into +account. + +--- xl2tp-1.2.7/Makefile-orig 2010-08-05 15:33:46.000000000 -0700 ++++ xl2tp-1.2.7/Makefile 2010-09-30 22:34:54.000000000 -0700 +@@ -90,7 +90,7 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include + + IPFLAGS?= -DIP_ALLOCATION + +-CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) ++COMPILE_FLAGS+= $(DFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) + HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h + OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o + SRCS=${OBJS:.o=.c} ${HDRS} +@@ -105,6 +105,9 @@ MANDIR?=$(DESTDIR)${PREFIX}/share/man + + all: $(EXEC) pfc + ++%.o: %.c ++ $(CC) $(COMPILE_FLAGS) $(CFLAGS) -c -o $@ -shared $< ++ + clean: + rm -f $(OBJS) $(EXEC) pfc.o pfc + +@@ -112,7 +115,7 @@ $(EXEC): $(OBJS) $(HDRS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) + + pfc: +- $(CC) $(CFLAGS) -c contrib/pfc.c ++ $(CC) $(COMPILE_FLAGS) $(CFLAGS) -c contrib/pfc.c + $(CC) $(LDFLAGS) -lpcap $(LDLIBS) -o pfc pfc.o + + romfs: diff --git a/package/xl2tp/xl2tp.mk b/package/xl2tp/xl2tp.mk new file mode 100644 index 000000000..bcaacf3ba --- /dev/null +++ b/package/xl2tp/xl2tp.mk @@ -0,0 +1,33 @@ +############################################################# +# +# xl2tp +# +############################################################# +XL2TP_VERSION = 1.2.7 +XL2TP_SOURCE = xl2tpd-$(XL2TP_VERSION).tar.gz +XL2TP_SITE = ftp://ftp.xelerance.com/xl2tpd/ + +XL2TP_DEPENDENCIES = libpcap + +define XL2TP_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define XL2TP_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install +endef + +define XL2TP_UNINSTALL_TARGET_CMDS + rm -f $(TARGET_DIR)/usr/bin/pfc + rm -f $(TARGET_DIR)/usr/sbin/xl2tpd + rm -f $(TARGET_DIR)/usr/share/man/man1/pfc.1 + rm -f $(TARGET_DIR)/usr/share/man/man8/xl2tpd.8 + rm -f $(TARGET_DIR)/usr/share/man/man5/xl2tpd.conf.5 + rm -f $(TARGET_DIR)/usr/share/man/man5/l2tp-secrets.5 +endef + +define XL2TP_CLEAN_CMDS + -$(MAKE) -C $(@D) clean +endef + +$(eval $(call GENTARGETS,package,xl2tp)) diff --git a/package/xl2tp/xl2tpd b/package/xl2tp/xl2tpd new file mode 100755 index 000000000..36c12a23f --- /dev/null +++ b/package/xl2tp/xl2tpd @@ -0,0 +1,27 @@ +#!/bin/sh +# +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/xl2tpd +PIDFILE=/var/run/xl2tpd.pid + +test -f $DAEMON || exit 0 + +case "$1" in + start) + start-stop-daemon -S -p $PIDFILE -x $DAEMON -- -D & + ;; + stop) + start-stop-daemon -K -p $PIDFILE -x $DAEMON + ;; + restart|force-reload) + start-stop-daemon -K -p $PIDFILE -x $DAEMON + sleep 1 + start-stop-daemon -S -p $PIDFILE -x $DAEMON + ;; + *) + echo "Usage: /etc/init.d/xl2tdp {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 |