Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 1 | SUMMARY = "IPv6 router advertisement daemon" |
| 2 | DESCRIPTION = "radvd is the router advertisement daemon for IPv6. It \ |
| 3 | listens to router solicitations and sends router \ |
| 4 | advertisements as described in RFC 2461, Neighbor \ |
| 5 | Discovery for IP Version 6 (IPv6). With these \ |
| 6 | advertisements hosts can automatically configure their \ |
| 7 | addresses and some other parameters. They also can \ |
| 8 | choose a default router based on these advertisements." |
| 9 | HOMEPAGE = "http://www.litech.org/radvd/" |
| 10 | SECTION = "net" |
| 11 | DEPENDS = "flex-native bison-native libdaemon " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 12 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 13 | # License is BSD-Style (with advertising clause) but also has an additional 0th clause |
| 14 | LICENSE = "radvd" |
| 15 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db" |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 16 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 17 | SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \ |
| 18 | file://radvd.init \ |
| 19 | file://radvd.service \ |
| 20 | file://volatiles.03_radvd \ |
| 21 | file://radvd.default \ |
| 22 | file://radvd.conf \ |
| 23 | file://0001-Reverts-the-include.h-change-in-46883f8a1a02fe42040d.patch \ |
| 24 | " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 25 | SRC_URI[sha256sum] = "c36470706fec3a9e6bed394ffea08acaff5dac647848d26b96bb9b9c65d58da0" |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 26 | |
| 27 | inherit autotools useradd pkgconfig systemd |
| 28 | |
| 29 | SYSTEMD_SERVICE:${PN} = "radvd.service" |
| 30 | SYSTEMD_AUTO_ENABLE = "disable" |
| 31 | |
| 32 | do_install:append () { |
| 33 | install -m 0755 -d ${D}${sysconfdir}/init.d \ |
| 34 | ${D}${sysconfdir}/default/volatiles \ |
| 35 | ${D}${docdir}/radvd |
| 36 | # Install init script and volatiles |
| 37 | install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd |
| 38 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd |
| 39 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd |
| 40 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd |
| 41 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd |
| 42 | |
| 43 | install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd |
| 44 | |
| 45 | # Install systemd service files |
| 46 | install -d ${D}${systemd_unitdir}/system |
| 47 | install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system |
| 48 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \ |
| 49 | -e 's#@SBINDIR@#${sbindir}#g' \ |
| 50 | -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service |
| 51 | |
| 52 | # Install default environment file |
| 53 | install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd |
| 54 | |
| 55 | # Documentation |
| 56 | for i in radvd.conf.example README; do \ |
| 57 | install -m 0644 ${S}/$i ${D}${docdir}/radvd; \ |
| 58 | done |
| 59 | |
| 60 | install -m 0644 ${WORKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf |
| 61 | } |
| 62 | |
| 63 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 64 | GROUPADD_PARAM:${PN} = "--system nogroup" |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 65 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup --shell /sbin/nologin radvd" |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 66 | |
| 67 | pkg_postinst:${PN} () { |
| 68 | if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then |
| 69 | /etc/init.d/populate-volatile.sh update |
| 70 | fi |
| 71 | } |