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