Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -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" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | DEPENDS = "flex-native bison-native libdaemon " |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 12 | |
| 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" |
| 16 | |
| 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 \ |
Andrew Geissler | 748a483 | 2020-07-24 16:24:21 -0500 | [diff] [blame] | 21 | file://radvd.default \ |
| 22 | file://radvd.conf" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 23 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | inherit autotools useradd pkgconfig systemd |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 25 | |
| 26 | SYSTEMD_SERVICE_${PN} = "radvd.service" |
| 27 | SYSTEMD_AUTO_ENABLE = "disable" |
| 28 | |
| 29 | do_install_append () { |
| 30 | install -m 0755 -d ${D}${sysconfdir}/init.d \ |
| 31 | ${D}${sysconfdir}/default/volatiles \ |
| 32 | ${D}${docdir}/radvd |
| 33 | # Install init script and volatiles |
| 34 | install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd |
| 35 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/radvd |
| 36 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/radvd |
| 37 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd |
| 38 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd |
| 39 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 41 | |
| 42 | # Install systemd service files |
| 43 | install -d ${D}${systemd_unitdir}/system |
| 44 | install -m 0644 ${WORKDIR}/radvd.service ${D}${systemd_unitdir}/system |
| 45 | sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' \ |
| 46 | -e 's#@SBINDIR@#${sbindir}#g' \ |
| 47 | -e 's#@BASE_BINDIR@#${base_bindir}#g' ${D}${systemd_unitdir}/system/radvd.service |
| 48 | |
| 49 | # Install default environment file |
| 50 | install -m 0644 ${WORKDIR}/radvd.default ${D}${sysconfdir}/default/radvd |
| 51 | |
| 52 | # Documentation |
| 53 | for i in radvd.conf.example README; do \ |
| 54 | install -m 0644 ${S}/$i ${D}${docdir}/radvd; \ |
| 55 | done |
Andrew Geissler | 748a483 | 2020-07-24 16:24:21 -0500 | [diff] [blame] | 56 | |
| 57 | install -m 0644 ${WORKDIR}/radvd.conf ${D}${sysconfdir}/radvd.conf |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 58 | } |
| 59 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 60 | USERADD_PACKAGES = "${PN}" |
| 61 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd" |
| 62 | |
| 63 | pkg_postinst_${PN} () { |
| 64 | if [ -z "$D" -a -x /etc/init.d/populate-volatile.sh ]; then |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 65 | /etc/init.d/populate-volatile.sh update |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 66 | fi |
| 67 | } |