blob: e1ca17fb323fa04b6329d895c0bc8839ca7902ca [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "A user-mode PPPoE client and server suite for Linux"
2HOMEPAGE = "http://www.roaringpenguin.com/products/pppoe"
3SECTION = "net"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://doc/LICENSE;md5=a194eaefae2be54ee3221339b10d0581"
6
7PR = "r10"
8
9SRC_URI = "http://www.roaringpenguin.com/files/download/${BP}.tar.gz \
10 file://top-autoconf.patch \
11 file://configure_in_cross.patch \
12 file://pppoe-src-restrictions.patch \
13 file://update-config.patch \
14 file://dont-swallow-errors.patch \
15 file://discard-use-of-dnl-in-Makefile.am.patch \
16 file://configure.patch \
17 file://pppoe-server.default \
18 file://pppoe-server.init \
19 file://configure.in-Error-fix.patch \
20 file://pppoe-server.service"
21
22SRC_URI[md5sum] = "216eb52b69062b92a64ee37fd71f4b66"
23SRC_URI[sha256sum] = "00794e04031546b0e9b8cf286f2a6d1ccfc4a621b2a3abb2d7ef2a7ab7cc86c2"
24
25inherit autotools-brokensep update-rc.d systemd
26
27do_install_append() {
28 install -d ${D}${systemd_unitdir}/system
29 install -m 0644 ${WORKDIR}/pppoe-server.service ${D}${systemd_unitdir}/system
30 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
31 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/pppoe-server.service
32 install -d ${D}${datadir}/doc/${PN}
33 if [ -f ${D}${datadir}/doc/README ]; then
34 mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
35 fi
36}
37
38do_install() {
39 # Install init script and default settings
40 install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d
41 install -m 0644 ${WORKDIR}/pppoe-server.default ${D}${sysconfdir}/default/pppoe-server
42 install -m 0755 ${WORKDIR}/pppoe-server.init ${D}${sysconfdir}/init.d/pppoe-server
43 # Install
44 oe_runmake -C ${S} DESTDIR=${D} docdir=${docdir} install
45 chmod 4755 ${D}${sbindir}/pppoe
46}
47
48SYSTEMD_PACKAGES = "${PN}-server"
49SYSTEMD_SERVICE_${PN}-server = "pppoe-server.service"
50SYSTEMD_AUTO_ENABLE = "disable"
51# Insert server package before main package
52PACKAGES = "${PN}-dbg ${PN}-server ${PN}-relay ${PN}-sniff ${PN} ${PN}-doc"
53
54FILES_${PN}-server = "${sysconfdir}/default/pppoe-server \
55 ${sysconfdir}/init.d/pppoe-server \
56 ${sbindir}/pppoe-server \
57 ${sysconfdir}/ppp/pppoe-server-options"
58FILES_${PN}-relay = "${sbindir}/pppoe-relay"
59FILES_${PN}-sniff = "${sbindir}/pppoe-sniff"
60
61CONFFILES_${PN} = "${sysconfdir}/ppp/pppoe.conf \
62 ${sysconfdir}/ppp/firewall-standalone \
63 ${sysconfdir}/ppp/firewall-masq"
64CONFFILES_${PN}-server = "${sysconfdir}/ppp/pppoe-server-options \
65 ${sysconfdir}/default/pppoe-server"
66
67INITSCRIPT_PACKAGES = "${PN}-server"
68INITSCRIPT_NAME_${PN}-server = "pppoe-server"
69INITSCRIPT_PARAMS_${PN}-server = "defaults 92 8"
70
71RDEPENDS_${PN} = "ppp"
72RDEPENDS_${PN}-server = "${PN}"
73RRECOMMENDS_${PN} = "ppp-oe"
74