diff options
| author | Jackie Huang <jackie.huang@windriver.com> | 2017-07-28 15:20:17 +0800 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-09-12 10:37:17 -0400 |
| commit | a5846fc960ac002a35455916eb78ba156b1d9005 (patch) | |
| tree | 30ae4b4de9ad379ee6a1be8e23dda5ac980cb941 /meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | |
| parent | 3381e8fdcc65f91a1885599d9f877664f41c5542 (diff) | |
| download | meta-openembedded-a5846fc960ac002a35455916eb78ba156b1d9005.tar.gz | |
openl2tp: add init script and systemd support
- Add patches to fix init script issues
- Add openl2tpd.service to add systemd support
- Add runtime dependency on ppp and ppp-l2tp
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb')
| -rw-r--r-- | meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb index 9be1c79569..1e5bfe2643 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp_1.8.bb | |||
| @@ -27,6 +27,10 @@ SRC_URI = "ftp://ftp.openl2tp.org/releases/${BP}/${BP}.tar.gz \ | |||
| 27 | file://0002-cli-include-fcntl.h-for-O_CREAT-define.patch \ | 27 | file://0002-cli-include-fcntl.h-for-O_CREAT-define.patch \ |
| 28 | file://0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch \ | 28 | file://0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch \ |
| 29 | file://0001-l2tp_api-Included-needed-headers.patch \ | 29 | file://0001-l2tp_api-Included-needed-headers.patch \ |
| 30 | file://openl2tpd-initscript-fix.patch \ | ||
| 31 | file://openl2tpd-initscript-fix-sysconfig.patch \ | ||
| 32 | file://openl2tpd-initscript-fix-warning.patch \ | ||
| 33 | file://openl2tpd.service \ | ||
| 30 | " | 34 | " |
| 31 | 35 | ||
| 32 | SRC_URI_append_libc-musl = "\ | 36 | SRC_URI_append_libc-musl = "\ |
| @@ -36,7 +40,10 @@ SRC_URI_append_libc-musl = "\ | |||
| 36 | SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" | 40 | SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0" |
| 37 | SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" | 41 | SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f" |
| 38 | 42 | ||
| 39 | inherit autotools-brokensep pkgconfig | 43 | inherit autotools-brokensep pkgconfig systemd |
| 44 | |||
| 45 | SYSTEMD_SERVICE_${PN} = "openl2tpd.service" | ||
| 46 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 40 | 47 | ||
| 41 | DEPENDS_append_libc-musl = " libtirpc" | 48 | DEPENDS_append_libc-musl = " libtirpc" |
| 42 | CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" | 49 | CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" |
| @@ -58,3 +65,23 @@ do_compile_prepend() { | |||
| 58 | -e 's:CPPFLAGS-y:CPPFLAGS:g' \ | 65 | -e 's:CPPFLAGS-y:CPPFLAGS:g' \ |
| 59 | ${S}/Makefile | 66 | ${S}/Makefile |
| 60 | } | 67 | } |
| 68 | |||
| 69 | do_install_append () { | ||
| 70 | install -d ${D}${sysconfdir}/init.d | ||
| 71 | install -d ${D}${sysconfdir}/default | ||
| 72 | install -m 0755 ${S}/etc/rc.d/init.d/openl2tpd ${D}${sysconfdir}/init.d/openl2tpd | ||
| 73 | install -m 0755 ${S}/etc/sysconfig/openl2tpd ${D}${sysconfdir}/default/openl2tpd | ||
| 74 | |||
| 75 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 76 | install -D -m 0644 ${WORKDIR}/openl2tpd.service ${D}${systemd_system_unitdir}/openl2tpd.service | ||
| 77 | sed -i -e 's,@STATEDIR@,${localstatedir},g' \ | ||
| 78 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
| 79 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
| 80 | -e 's,@BINDIR@,${bindir},g' \ | ||
| 81 | -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ | ||
| 82 | -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
| 83 | ${D}${systemd_system_unitdir}/openl2tpd.service | ||
| 84 | fi | ||
| 85 | } | ||
| 86 | |||
| 87 | RDEPENDS_${PN} = "ppp ppp-l2tp" | ||
