blob: 700ece61dceaf9bb2e09c2f83151f561a13100c2 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Point-to-Point Protocol (PPP) support"
2DESCRIPTION = "ppp (Paul's PPP Package) is an open source package which implements \
3the Point-to-Point Protocol (PPP) on Linux and Solaris systems."
4SECTION = "console/network"
5HOMEPAGE = "http://samba.org/ppp/"
6BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08007DEPENDS = "libpcap openssl virtual/crypt"
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00008LICENSE = "BSD-3-Clause & BSD-3-Clause-Attribution & GPL-2.0-or-later & LGPL-2.0-or-later & PD"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \
10 file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
11 file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \
12 file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2"
13
Brad Bishop6e60e8b2018-02-01 10:27:11 -050014SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060015 file://makefix.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016 file://pon \
17 file://poff \
18 file://init \
19 file://ip-up \
20 file://ip-down \
21 file://08setupdns \
22 file://92removedns \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023 file://pap \
24 file://ppp_on_boot \
25 file://provider \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 file://ppp@.service \
Andrew Geissler595f6302022-01-24 19:11:47 +000027 file://0001-ppp-fix-build-against-5.15-headers.patch \
Andrew Geissler4ed12e12020-06-05 18:00:41 -050028 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
Andrew Geisslerd1e89492021-02-12 15:35:20 -060030SRC_URI[sha256sum] = "f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
32inherit autotools-brokensep systemd
33
34TARGET_CC_ARCH += " ${LDFLAGS}"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060035EXTRA_OEMAKE = "CC='${CC}' STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036EXTRA_OECONF = "--disable-strip"
37
38# Package Makefile computes CFLAGS, referencing COPTS.
39# Typically hard-coded to '-O2 -g' in the Makefile's.
40#
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${STAGING_INCDIR}/openssl -I${S}/include"'
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042
Andrew Geissler595f6302022-01-24 19:11:47 +000043EXTRA_OECONF:append:libc-musl = " --disable-ipxcp"
44
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045do_configure () {
46 oe_runconf
47}
48
Patrick Williams213cb262021-08-07 19:21:33 -050049do_install:append () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050 make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp
51 mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d
52 mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/
53 mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/
54 install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon
55 install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff
56 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp
57 install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/
58 install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/
59 install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/
60 install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/
61 mkdir -p ${D}${sysconfdir}/chatscripts
62 mkdir -p ${D}${sysconfdir}/ppp/peers
63 install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts
64 install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot
65 install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider
Andrew Geissler5199d832021-09-24 16:47:35 -050066 install -d ${D}${systemd_system_unitdir}
67 install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_system_unitdir}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068 sed -i -e 's,@SBINDIR@,${sbindir},g' \
Andrew Geissler5199d832021-09-24 16:47:35 -050069 ${D}${systemd_system_unitdir}/ppp@.service
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070 rm -rf ${D}/${mandir}/man8/man8
71 chmod u+s ${D}${sbindir}/pppd
72}
73
Patrick Williams213cb262021-08-07 19:21:33 -050074do_install:append:libc-musl () {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080075 install -Dm 0644 ${S}/include/net/ppp_defs.h ${D}${includedir}/net/ppp_defs.h
76}
77
Patrick Williams213cb262021-08-07 19:21:33 -050078CONFFILES:${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050079PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools"
Andrew Geissler5199d832021-09-24 16:47:35 -050080FILES:${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_system_unitdir}/ppp@.service"
Patrick Williams213cb262021-08-07 19:21:33 -050081FILES:${PN}-oa = "${libdir}/pppd/${PV}/pppoatm.so"
82FILES:${PN}-oe = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/*pppoe.so"
83FILES:${PN}-radius = "${libdir}/pppd/${PV}/radius.so ${libdir}/pppd/${PV}/radattr.so ${libdir}/pppd/${PV}/radrealms.so"
84FILES:${PN}-winbind = "${libdir}/pppd/${PV}/winbind.so"
85FILES:${PN}-minconn = "${libdir}/pppd/${PV}/minconn.so"
86FILES:${PN}-password = "${libdir}/pppd/${PV}/pass*.so"
87FILES:${PN}-l2tp = "${libdir}/pppd/${PV}/*l2tp.so"
88FILES:${PN}-tools = "${sbindir}/pppstats ${sbindir}/pppdump"
89SUMMARY:${PN}-oa = "Plugin for PPP for PPP-over-ATM support"
90SUMMARY:${PN}-oe = "Plugin for PPP for PPP-over-Ethernet support"
91SUMMARY:${PN}-radius = "Plugin for PPP for RADIUS support"
92SUMMARY:${PN}-winbind = "Plugin for PPP to authenticate against Samba or Windows"
93SUMMARY:${PN}-minconn = "Plugin for PPP to set a delay before the idle timeout applies"
94SUMMARY:${PN}-password = "Plugin for PPP to get passwords via a pipe"
95SUMMARY:${PN}-l2tp = "Plugin for PPP for l2tp support"
96SUMMARY:${PN}-tools = "Additional tools for the PPP package"
Andrew Geisslerd1e89492021-02-12 15:35:20 -060097
98# Ignore compatibility symlink rp-pppoe.so->pppoe.so
Patrick Williams213cb262021-08-07 19:21:33 -050099INSANE_SKIP:${PN}-oe += "dev-so"