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