blob: 1beb5456e19b2e0605bf42bf99dadd8b46c51607 [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
9DEPENDS = ""
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010DEPENDS_append_libc-musl = " libtirpc "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011PR = "r2"
12
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050013# Blacklist a bogus tag in upstream check
14UPSTREAM_CHECK_GITTAGREGEX = "xinetd-(?P<pver>(?!20030122).+)"
15
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016SRC_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 Williamsd8c66bc2016-06-20 12:57:21 -050024 file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025 file://xinetd.service \
26 "
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027UPSTREAM_VERSION_UNKNOWN = "1"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028
29SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24"
30
31S = "${WORKDIR}/git"
32
33inherit autotools update-rc.d systemd
34
35SYSTEMD_SERVICE_${PN} = "xinetd.service"
36
37INITSCRIPT_NAME = "xinetd"
38INITSCRIPT_PARAMS = "defaults"
39
40EXTRA_OECONF="--disable-nls"
41
42PACKAGECONFIG ??= "tcp-wrappers"
43PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
44
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050045CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
46LDFLAGS_append_libc-musl = " -ltirpc "
47
Patrick Williamsc124f4f2015-09-15 14:41:29 -050048do_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
55do_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 Williamsd8c66bc2016-06-20 12:57:21 -050068 install -m 664 ${S}/contrib/xinetd.d/* ${D}${sysconfdir}/xinetd.d
Patrick Williamsc124f4f2015-09-15 14:41:29 -050069
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
78CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"