summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-11-27 11:25:51 +0000
committerJoe MacDonald <joe.macdonald@windriver.com>2012-11-27 14:43:59 -0500
commit3761a24e1c25fd388f70aec4f1f7b81d89e3caad (patch)
tree4d84c3a646c93a3d297407714ebaf0952b7eeb6b /meta-networking
parent5ea9b7527abb70ebf84370900eca506c97913576 (diff)
downloadmeta-openembedded-3761a24e1c25fd388f70aec4f1f7b81d89e3caad.tar.gz
xl2tpd: add from OE-Classic, update and tidy up
* Update to version 1.3.1 * Fetch source from a git tag as upstream apparently no longer publishes release tarballs * Add virtual/kernel to DEPENDS since it needs the kernel source * Inherit update-rc.d.bbclass * Handle hardcoded paths in initscript * Add LIC_FILES_CHKSUM * Set SUMMARY (which sets DESCRIPTION) * Remove some unnecessary cruft Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-protocols/xl2tpd/xl2tpd-1.3.1/cflags.patch58
-rw-r--r--meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc40
-rw-r--r--meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb8
3 files changed, 106 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd-1.3.1/cflags.patch b/meta-networking/recipes-protocols/xl2tpd/xl2tpd-1.3.1/cflags.patch
new file mode 100644
index 000000000..35508122d
--- /dev/null
+++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd-1.3.1/cflags.patch
@@ -0,0 +1,58 @@
1From 678d71e3b50f566776dbc29db49a1128be89caf6 Mon Sep 17 00:00:00 2001
2From: Paul Eggleton <paul.eggleton@linux.intel.com>
3Date: Fri, 26 Oct 2012 10:07:31 +0100
4Subject: [PATCH] Adjust CFLAGS for building within OE
5
6Updated version of cflags.patch from OE-Classic written by
7Vladimir Sorokin <sorokin@altell.ru>.
8
9Upstream-Status: Inappropriate [configuration]
10
11Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
12---
13 Makefile | 8 +++++---
14 1 files changed, 5 insertions(+), 3 deletions(-)
15
16diff --git a/Makefile b/Makefile
17index 6f6481f..c7602db 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -62,7 +62,7 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include/
21 # are packages seperately (eg kernel-headers on Fedora)
22 # Note: 2.6.23+ support still needs some changes in the xl2tpd source
23 #
24-#OSFLAGS+= -DUSE_KERNEL
25+OSFLAGS+= -DUSE_KERNEL
26 #
27 #
28 # Uncomment the next line for FreeBSD
29@@ -90,7 +90,6 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include/
30
31 IPFLAGS?= -DIP_ALLOCATION
32
33-CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS)
34 HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h
35 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
36 SRCS=${OBJS:.o=.c} ${HDRS}
37@@ -110,6 +109,9 @@ all: $(EXEC) pfc $(CONTROL_EXEC)
38 clean:
39 rm -f $(OBJS) $(EXEC) pfc.o pfc $(CONTROL_EXEC)
40
41+%.o: %.c
42+ $(CC) $(CFLAGS) $(DFLAGS) -O2 -DSANITY $(OSFLAGS) $(IPFLAGS) -o $@ -c $<
43+
44 $(EXEC): $(OBJS) $(HDRS)
45 $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
46
47@@ -117,7 +119,7 @@ $(CONTROL_EXEC): $(CONTROL_SRCS)
48 $(CC) $(CONTROL_SRCS) -o $@
49
50 pfc:
51- $(CC) $(CFLAGS) -c contrib/pfc.c
52+ $(CC) $(CFLAGS) $(DFLAGS) -O2 -DSANITY $(OSFLAGS) $(IPFLAGS) -c contrib/pfc.c
53 $(CC) $(LDFLAGS) -o pfc pfc.o -lpcap $(LDLIBS)
54
55 romfs:
56--
571.7.1
58
diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc b/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
new file mode 100644
index 000000000..cea542732
--- /dev/null
+++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
@@ -0,0 +1,40 @@
1SUMMARY = "Xelerance version of the Layer 2 Tunneling Protocol (L2TP) daemon"
2HOMEPAGE = "http://www.xelerance.com/software/xl2tpd/"
3SECTION = "network"
4DEPENDS = "ppp virtual/kernel"
5
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=0636e73ff0215e8d672dc4c32c317bb3"
8
9INC_PR = "r0"
10
11SRC_URI = "git://github.com/xelerance/xl2tpd.git"
12
13S = "${WORKDIR}/git"
14
15inherit update-rc.d
16
17do_compile () {
18 oe_runmake CFLAGS="${CFLAGS} -DLINUX" LDFLAGS="${LDFLAGS}" PREFIX="${prefix}" KERNELSRC=${STAGING_KERNEL_DIR} all
19}
20
21do_install () {
22 oe_runmake PREFIX="${D}${prefix}" install
23
24 install -d ${D}${sysconfdir}/init.d
25 touch ${D}${sysconfdir}/xl2tpd.conf
26 install -m 0755 debian/xl2tpd.init ${D}${sysconfdir}/init.d/xl2tpd
27 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
28 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
29 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
30 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/xl2tpd
31
32 install -d ${D}${sysconfdir}/default
33 install -m 0644 debian/xl2tpd.default ${D}${sysconfdir}/default/xl2tpd
34}
35
36CONFFILES_${PN} += "${sysconfdir}/xl2tpd.conf ${sysconfdir}/default/xl2tpd"
37
38INITSCRIPT_PACKAGES = "${PN}"
39INITSCRIPT_NAME_${PN} = "xl2tpd"
40
diff --git a/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb
new file mode 100644
index 000000000..5321d6a7a
--- /dev/null
+++ b/meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb
@@ -0,0 +1,8 @@
1require xl2tpd.inc
2PR = "${INC_PR}.0"
3
4# 95445fc9aaeaf709d54c1cd934d4bed4467e910d corresponds to 1.3.1 tag
5SRCREV = "95445fc9aaeaf709d54c1cd934d4bed4467e910d"
6
7SRC_URI += " file://cflags.patch"
8