blob: 6bfaabe829cdff046b12cb25ae949d829288d53c [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 "
27
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
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050044CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
45LDFLAGS_append_libc-musl = " -ltirpc "
46
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"