blob: 6e43f5be6f7f0581322ac87434b50535c76c32e6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Socket-based service activation daemon"
2HOMEPAGE = "https://github.com/xinetd-org/xinetd"
3
4# xinetd is a BSD-like license
5# Apple and Gentoo say BSD here.
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
8
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009DEPENDS += "libtirpc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010PR = "r2"
11
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012# Blacklist a bogus tag in upstream check
13UPSTREAM_CHECK_GITTAGREGEX = "xinetd-(?P<pver>(?!20030122).+)"
14
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015SRC_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 Williamsd8c66bc2016-06-20 12:57:21 -050023 file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024 file://xinetd.service \
25 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026UPSTREAM_VERSION_UNKNOWN = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027
28SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24"
29
30S = "${WORKDIR}/git"
31
32inherit autotools update-rc.d systemd
33
34SYSTEMD_SERVICE_${PN} = "xinetd.service"
35
36INITSCRIPT_NAME = "xinetd"
37INITSCRIPT_PARAMS = "defaults"
38
39EXTRA_OECONF="--disable-nls"
40
41PACKAGECONFIG ??= "tcp-wrappers"
42PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
43
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044CFLAGS += "-I${STAGING_INCDIR}/tirpc"
45LDFLAGS += "-ltirpc"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050046
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047do_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
54do_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 Williamsd8c66bc2016-06-20 12:57:21 -050067 install -m 664 ${S}/contrib/xinetd.d/* ${D}${sysconfdir}/xinetd.d
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068
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
77CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"