openl2tp_1.8.bb 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. SUMMARY = "An L2TP client/server, designed for VPN use."
  2. DESCRIPTION = "OpenL2TP is an open source L2TP client / server, written \
  3. specifically for Linux. It has been designed for use as an enterprise \
  4. L2TP VPN server or in commercial, Linux-based, embedded networking \
  5. products and is able to support hundreds of sessions, each with \
  6. different configuration. It is used by several ISPs to provide \
  7. L2TP services and by corporations to implement L2TP VPNs."
  8. HOMEPAGE = "http://www.openl2tp.org/"
  9. SECTION = "net"
  10. # cli and usl use license LGPL-2.1
  11. LICENSE = "GPL-2.0-only & LGPL-2.1-only"
  12. LIC_FILES_CHKSUM = "file://COPYING;md5=e9d9259cbbf00945adc25a470c1d3585 \
  13. file://LICENSE;md5=f8970abd5ea9be701a0deedf5afd77a5 \
  14. file://cli/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
  15. file://usl/LICENSE;md5=9c1387a3c5213aa40671438af3e00793 \
  16. "
  17. DEPENDS = "popt flex readline rpcsvc-proto-native bison-native"
  18. SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \
  19. file://Makefile-modify-CFLAGS-to-aviod-build-error.patch \
  20. file://openl2tp-simplify-gcc-warning-hack.patch \
  21. file://Makefile-obey-LDFLAGS.patch \
  22. file://0001-test-pppd_dummy.c-Fix-return-value.patch \
  23. file://0001-Use-1-instead-of-WAIT_ANY.patch \
  24. file://0002-cli-include-fcntl.h-for-O_CREAT-define.patch \
  25. file://0003-cli-Define-_GNU_SOURCE-for-getting-sighandler_t.patch \
  26. file://0001-l2tp_api-Included-needed-headers.patch \
  27. file://openl2tpd-initscript-fix.patch \
  28. file://openl2tpd-initscript-fix-sysconfig.patch \
  29. file://openl2tpd-initscript-fix-warning.patch \
  30. file://openl2tpd.service \
  31. file://openl2tpd-enable-tests.patch \
  32. file://run-ptest \
  33. file://fix_linux_4.15_compile.patch \
  34. file://0002-user-ipv6-structures.patch \
  35. file://0001-l2tp_rpc_server.c-Add-missing-prototype-for-l2tp_api.patch \
  36. file://0001-lex-yacc-Add-missing-function-prototypes.patch \
  37. "
  38. SRC_URI[md5sum] = "e3d08dedfb9e6a9a1e24f6766f6dadd0"
  39. SRC_URI[sha256sum] = "1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f"
  40. inherit autotools-brokensep pkgconfig systemd ptest
  41. SYSTEMD_SERVICE:${PN} = "openl2tpd.service"
  42. SYSTEMD_AUTO_ENABLE = "disable"
  43. DEPENDS += "libtirpc"
  44. CPPFLAGS += "-I${STAGING_INCDIR}/tirpc"
  45. CFLAGS += "-I${STAGING_INCDIR}/tirpc"
  46. LDFLAGS += "-ltirpc"
  47. PARALLEL_MAKE = ""
  48. EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -Wno-unused-but-set-variable" CPPFLAGS="${CPPFLAGS}" OPT_CFLAGS="${CFLAGS}"'
  49. do_compile:prepend() {
  50. sed -i -e "s:SYS_LIBDIR=.*:SYS_LIBDIR=${libdir}:g" \
  51. -e 's:$(CROSS_COMPILE)as:${AS}:g' \
  52. -e 's:$(CROSS_COMPILE)ld:${LD}:g' \
  53. -e 's:$(CROSS_COMPILE)gcc:${CC}:g' \
  54. -e 's:$(CROSS_COMPILE)ar:${AR}:g' \
  55. -e 's:$(CROSS_COMPILE)nm:${NM}:g' \
  56. -e 's:$(CROSS_COMPILE)strip:${STRIP}:g' \
  57. -e 's:$(CROSS_COMPILE)install:install:g' \
  58. -e 's:CPPFLAGS-y:CPPFLAGS:g' \
  59. ${S}/Makefile
  60. }
  61. do_install:append () {
  62. install -d ${D}${sysconfdir}/init.d
  63. install -d ${D}${sysconfdir}/default
  64. install -m 0755 ${S}/etc/rc.d/init.d/openl2tpd ${D}${sysconfdir}/init.d/openl2tpd
  65. install -m 0755 ${S}/etc/sysconfig/openl2tpd ${D}${sysconfdir}/default/openl2tpd
  66. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  67. install -D -m 0644 ${UNPACKDIR}/openl2tpd.service ${D}${systemd_system_unitdir}/openl2tpd.service
  68. sed -i -e 's,@STATEDIR@,${localstatedir},g' \
  69. -e 's,@SYSCONFDIR@,${sysconfdir},g' \
  70. -e 's,@SBINDIR@,${sbindir},g' \
  71. -e 's,@BINDIR@,${bindir},g' \
  72. -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
  73. -e 's,@BASE_BINDIR@,${base_bindir},g' \
  74. ${D}${systemd_system_unitdir}/openl2tpd.service
  75. fi
  76. }
  77. do_install_ptest () {
  78. for i in all.tcl configfile.test peer_profile.test ppp_profile.test \
  79. session_profile.test session.test system.test test_procs.tcl \
  80. thirdparty_lns.test tunnel_profile.test tunnel.test; do
  81. install -m 0755 ${S}/test/$i ${D}${PTEST_PATH}
  82. done
  83. }
  84. RDEPENDS:${PN} = "ppp ppp-l2tp bash"