blob: 8f8f846bfb40ee091b65cf4663a8e37421dd5438 [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
Andrew Geissler4ed12e12020-06-05 18:00:41 -050012UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050013
Andrew Geissler4ed12e12020-06-05 18:00:41 -050014SRC_URI = "git://github.com/openSUSE/xinetd.git;protocol=https \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 file://xinetd.init \
16 file://xinetd.conf \
17 file://xinetd.default \
18 file://Various-fixes-from-the-previous-maintainer.patch \
19 file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
20 file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
21 file://xinetd-CVE-2013-4342.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050022 file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023 file://xinetd.service \
24 "
25
26SRCREV = "68bb9ab9e9f214ad8a2322f28ac1d6733e70bc24"
27
28S = "${WORKDIR}/git"
29
30inherit autotools update-rc.d systemd
31
32SYSTEMD_SERVICE_${PN} = "xinetd.service"
33
34INITSCRIPT_NAME = "xinetd"
35INITSCRIPT_PARAMS = "defaults"
36
37EXTRA_OECONF="--disable-nls"
38
39PACKAGECONFIG ??= "tcp-wrappers"
40PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
41
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042CFLAGS += "-I${STAGING_INCDIR}/tirpc"
43LDFLAGS += "-ltirpc"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050044
Patrick Williamsc124f4f2015-09-15 14:41:29 -050045do_configure() {
46 # Looks like configure.in is broken, so we are skipping
47 # rebuilding configure and are just using the shipped one
48 ( cd ${S}; gnu-configize --force )
49 oe_runconf
50}
51
52do_install() {
53 # Same here, the Makefile does some really stupid things,
54 # but since we only want two files why not override
55 # do_install from autotools and doing it ourselfs?
56 install -d "${D}${sbindir}"
57 install -d "${D}${sysconfdir}/init.d"
58 install -d "${D}${sysconfdir}/xinetd.d"
59 install -d "${D}${sysconfdir}/default"
60 install -m 644 "${WORKDIR}/xinetd.conf" "${D}${sysconfdir}"
61 install -m 755 "${WORKDIR}/xinetd.init" "${D}${sysconfdir}/init.d/xinetd"
62 install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
63 install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
64 install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065 install -m 664 ${S}/contrib/xinetd.d/* ${D}${sysconfdir}/xinetd.d
Patrick Williamsc124f4f2015-09-15 14:41:29 -050066
67 # Install systemd unit files
68 install -d ${D}${systemd_unitdir}/system
69 install -m 0644 ${WORKDIR}/xinetd.service ${D}${systemd_unitdir}/system
70 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
71 -e 's,@SBINDIR@,${sbindir},g' \
72 ${D}${systemd_unitdir}/system/xinetd.service
73}
74
75CONFFILES_${PN} = "${sysconfdir}/xinetd.conf"