Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "A user-mode PPPoE client and server suite for Linux" |
| 2 | HOMEPAGE = "http://www.roaringpenguin.com/products/pppoe" |
| 3 | SECTION = "net" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-only" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581" |
| 6 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 7 | PR = "r11" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 8 | |
Andrew Geissler | 028142b | 2023-05-05 11:29:21 -0500 | [diff] [blame] | 9 | SRC_URI = "https://dianne.skoll.ca/projects/rp-pppoe/download/OLD/rp-pppoe-${PV}.tar.gz \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 10 | file://top-autoconf.patch \ |
| 11 | file://configure_in_cross.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 12 | file://update-config.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 13 | file://discard-use-of-dnl-in-Makefile.am.patch \ |
| 14 | file://configure.patch \ |
| 15 | file://pppoe-server.default \ |
| 16 | file://pppoe-server.init \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 17 | file://pppoe-server.service \ |
| 18 | file://0001-ppoe-Dont-include-linux-if_ether.h.patch \ |
| 19 | file://0002-Enable-support-for-the-kernel-module.patch \ |
| 20 | " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 21 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 22 | SRC_URI[sha256sum] = "b1f318bc7e4e5b0fd8a8e23e8803f5e6e43165245a5a10a7162a92a6cf17829a" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 23 | |
| 24 | inherit autotools-brokensep update-rc.d systemd |
| 25 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 26 | CACHED_CONFIGUREVARS += "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', 'rpppoe_cv_pack_bitfields=normal', 'rpppoe_cv_pack_bitfields=rev', d)}" |
| 27 | |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 28 | # Needed for strlcpy() |
| 29 | CFLAGS += "-D_GNU_SOURCE" |
| 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | do_install:append() { |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 32 | install -d ${D}${systemd_unitdir}/system |
| 33 | install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system |
| 34 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service |
| 35 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service |
| 36 | install -d ${D}${datadir}/doc/${PN} |
| 37 | if [ -f ${D}${datadir}/doc/README ]; then |
| 38 | mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/ |
| 39 | fi |
| 40 | } |
| 41 | |
| 42 | do_install() { |
| 43 | # Install init script and default settings |
| 44 | install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d |
| 45 | install -m 0644 ${WORKDIR}/pppoe-server.default ${D}${sysconfdir}/default/pppoe-server |
| 46 | install -m 0755 ${WORKDIR}/pppoe-server.init ${D}${sysconfdir}/init.d/pppoe-server |
| 47 | # Install |
| 48 | oe_runmake -C ${S} DESTDIR=${D} docdir=${docdir} install |
| 49 | chmod 4755 ${D}${sbindir}/pppoe |
| 50 | } |
| 51 | |
| 52 | SYSTEMD_PACKAGES = "${PN}-server" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | SYSTEMD_SERVICE:${PN}-server = "pppoe-server.service" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 54 | SYSTEMD_AUTO_ENABLE = "disable" |
| 55 | # Insert server package before main package |
| 56 | PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc" |
| 57 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 58 | FILES:${PN}-server = "${sysconfdir}/default/pppoe-server \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 59 | ${sysconfdir}/init.d/pppoe-server \ |
| 60 | ${sbindir}/pppoe-server \ |
| 61 | ${sysconfdir}/ppp/pppoe-server-options" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | FILES:${PN}-relay = "${sbindir}/pppoe-relay" |
| 63 | FILES:${PN}-sniff = "${sbindir}/pppoe-sniff" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | CONFFILES:${PN} = "${sysconfdir}/ppp/pppoe.conf \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 66 | ${sysconfdir}/ppp/firewall-standalone \ |
| 67 | ${sysconfdir}/ppp/firewall-masq" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 68 | CONFFILES:${PN}-server = "${sysconfdir}/ppp/pppoe-server-options \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 69 | ${sysconfdir}/default/pppoe-server" |
| 70 | |
| 71 | INITSCRIPT_PACKAGES = "${PN}-server" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | INITSCRIPT_NAME:${PN}-server = "pppoe-server" |
| 73 | INITSCRIPT_PARAMS:${PN}-server = "defaults 92 8" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 74 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 75 | RDEPENDS:${PN} = "ppp" |
| 76 | RDEPENDS:${PN}-server = "${PN}" |
| 77 | RRECOMMENDS:${PN} = "ppp-oe" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 78 | |