Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Socket-based service activation daemon" |
| 2 | HOMEPAGE = "https://github.com/xinetd-org/xinetd" |
| 3 | |
| 4 | # xinetd is a BSD-like license |
| 5 | # Apple and Gentoo say BSD here. |
| 6 | LICENSE = "BSD" |
| 7 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8" |
| 8 | |
| 9 | DEPENDS = "" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 10 | DEPENDS_append_libc-musl = " libtirpc " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | PR = "r2" |
| 12 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | # Blacklist a bogus tag in upstream check |
| 14 | UPSTREAM_CHECK_GITTAGREGEX = "xinetd-(?P<pver>(?!20030122).+)" |
| 15 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \ |
| 17 | file://xinetd.init \ |
| 18 | file://xinetd.conf \ |
| 19 | file://xinetd.default \ |
| 20 | file://Various-fixes-from-the-previous-maintainer.patch \ |
| 21 | file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \ |
| 22 | file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \ |
| 23 | file://xinetd-CVE-2013-4342.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 24 | file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | file://xinetd.service \ |
| 26 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 27 | UPSTREAM_VERSION_UNKNOWN = "1" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | |
| 29 | SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24" |
| 30 | |
| 31 | S = "${WORKDIR}/git" |
| 32 | |
| 33 | inherit autotools update-rc.d systemd |
| 34 | |
| 35 | SYSTEMD_SERVICE_${PN} = "xinetd.service" |
| 36 | |
| 37 | INITSCRIPT_NAME = "xinetd" |
| 38 | INITSCRIPT_PARAMS = "defaults" |
| 39 | |
| 40 | EXTRA_OECONF="--disable-nls" |
| 41 | |
| 42 | PACKAGECONFIG ??= "tcp-wrappers" |
| 43 | PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers" |
| 44 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 45 | CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc " |
| 46 | LDFLAGS_append_libc-musl = " -ltirpc " |
| 47 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | do_configure() { |
| 49 | # Looks like configure.in is broken, so we are skipping |
| 50 | # rebuilding configure and are just using the shipped one |
| 51 | ( cd ${S}; gnu-configize --force ) |
| 52 | oe_runconf |
| 53 | } |
| 54 | |
| 55 | do_install() { |
| 56 | # Same here, the Makefile does some really stupid things, |
| 57 | # but since we only want two files why not override |
| 58 | # do_install from autotools and doing it ourselfs? |
| 59 | install -d "${D}${sbindir}" |
| 60 | install -d "${D}${sysconfdir}/init.d" |
| 61 | install -d "${D}${sysconfdir}/xinetd.d" |
| 62 | install -d "${D}${sysconfdir}/default" |
| 63 | install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}" |
| 64 | install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd" |
| 65 | install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd" |
| 66 | install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}" |
| 67 | install -m 755 "${B}/xinetd/itox" "${D}${sbindir}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 68 | install -m 664 ${S}/contrib/xinetd.d/* ${D}${sysconfdir}/xinetd.d |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 69 | |
| 70 | # Install systemd unit files |
| 71 | install -d ${D}${systemd_unitdir}/system |
| 72 | install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system |
| 73 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
| 74 | -e 's,@SBINDIR@,${sbindir},g' \ |
| 75 | ${D}${systemd_unitdir}/system/xinetd.service |
| 76 | } |
| 77 | |
| 78 | CONFFILES_${PN} = "${sysconfdir}/xinetd.conf" |