1864cc43bSPatrick WilliamsSUMMARY = "ifupdown: basic ifup and ifdown used by initscripts" 2864cc43bSPatrick WilliamsHOMEPAGE = "https://salsa.debian.org/debian/ifupdown" 3864cc43bSPatrick WilliamsDESCRIPTION = "High level tools to configure network interfaces \ 4864cc43bSPatrick WilliamsThis package provides the tools ifup and ifdown which may be used to \ 5864cc43bSPatrick Williamsconfigure (or, respectively, deconfigure) network interfaces, based on \ 6864cc43bSPatrick Williamsthe file /etc/network/interfaces." 7864cc43bSPatrick WilliamsLICENSE = "GPL-2.0-only" 8864cc43bSPatrick WilliamsLIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" 9864cc43bSPatrick Williams 10864cc43bSPatrick WilliamsSRC_URI = "git://salsa.debian.org/debian/ifupdown.git;protocol=https;branch=master \ 11864cc43bSPatrick Williams file://99_network \ 12864cc43bSPatrick Williams file://run-ptest \ 13864cc43bSPatrick Williams file://0001-Define-FNM_EXTMATCH-for-musl.patch \ 14864cc43bSPatrick Williams file://0001-Makefile-do-not-use-dpkg-for-determining-OS-type.patch \ 15864cc43bSPatrick Williams file://0001-ifupdown-skip-wrong-test-case.patch \ 16864cc43bSPatrick Williams file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \ 17864cc43bSPatrick Williams file://tweak-ptest-script.patch \ 18864cc43bSPatrick Williams " 19864cc43bSPatrick WilliamsSRCREV = "369d9d3c13a0c56ad09fd4f13b4a80eb9a94e270" 20864cc43bSPatrick Williams 21864cc43bSPatrick WilliamsS = "${WORKDIR}/git" 22864cc43bSPatrick Williams 23864cc43bSPatrick Williams 24864cc43bSPatrick Williamsinherit ptest update-alternatives 25864cc43bSPatrick Williams 26864cc43bSPatrick Williamsdo_compile () { 27864cc43bSPatrick Williams chmod a+rx *.pl *.sh 28864cc43bSPatrick Williams oe_runmake 'CC=${CC}' "CFLAGS=${CFLAGS} -Wall -W -D'IFUPDOWN_VERSION=\"${PV}\"'" 29864cc43bSPatrick Williams} 30864cc43bSPatrick Williams 31864cc43bSPatrick Williamsdo_install () { 32864cc43bSPatrick Williams install -d ${D}${mandir}/man8 \ 33864cc43bSPatrick Williams ${D}${mandir}/man5 \ 34864cc43bSPatrick Williams ${D}${base_sbindir} 35864cc43bSPatrick Williams 36864cc43bSPatrick Williams # If volatiles are used, then we'll also need /run/network there too. 37864cc43bSPatrick Williams install -d ${D}/etc/default/volatiles 38*edff4923SAndrew Geissler install -m 0644 ${UNPACKDIR}/99_network ${D}/etc/default/volatiles 39864cc43bSPatrick Williams 40864cc43bSPatrick Williams install -m 0755 ifup ${D}${base_sbindir}/ 41864cc43bSPatrick Williams ln ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifdown 42864cc43bSPatrick Williams install -m 0644 ifup.8 ${D}${mandir}/man8 43864cc43bSPatrick Williams install -m 0644 interfaces.5 ${D}${mandir}/man5 44864cc43bSPatrick Williams cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8 458f840685SAndrew Geissler 468f840685SAndrew Geissler install -d ${D}${sysconfdir}/network/if-pre-up.d 478f840685SAndrew Geissler install -d ${D}${sysconfdir}/network/if-up.d 488f840685SAndrew Geissler install -d ${D}${sysconfdir}/network/if-down.d 498f840685SAndrew Geissler install -d ${D}${sysconfdir}/network/if-post-down.d 50864cc43bSPatrick Williams} 51864cc43bSPatrick Williams 52864cc43bSPatrick Williamsdo_install_ptest () { 53864cc43bSPatrick Williams install -d ${D}${PTEST_PATH}/tests 54864cc43bSPatrick Williams cp -r ${S}/tests/testbuild-linux ${D}${PTEST_PATH}/tests/ 55864cc43bSPatrick Williams cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/ 56864cc43bSPatrick Williams} 57864cc43bSPatrick Williams 58864cc43bSPatrick WilliamsALTERNATIVE_PRIORITY = "100" 59864cc43bSPatrick WilliamsALTERNATIVE:${PN} = "ifup ifdown" 60864cc43bSPatrick Williams 61864cc43bSPatrick WilliamsALTERNATIVE_LINK_NAME[ifup] = "${base_sbindir}/ifup" 62864cc43bSPatrick WilliamsALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown" 63