blob: 3c6774c28b2bc34cb66bddb576373d5a713851ed [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001SUMMARY = "Universal Addresses to RPC Program Number Mapper"
2DESCRIPTION = "The rpcbind utility is a server that converts RPC \
3 program numbers into universal addresses."
4SECTION = "console/network"
5HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
6BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
7DEPENDS = "libtirpc quota"
8
9LICENSE = "BSD"
10LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
11 file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
14 file://init.d \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050015 file://rpcbind.conf \
16 file://rpcbind.socket \
17 file://rpcbind.service \
18 file://0001-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040019 file://pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch \
20 file://rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021 file://rpcbind_add_option_to_fix_port_number.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022 "
Brad Bishop6e60e8b2018-02-01 10:27:11 -050023SRC_URI[md5sum] = "cf10cd41ed8228fc54c316191c1f07fe"
24SRC_URI[sha256sum] = "074a9a530dc7c11e0d905aa59bcb0847c009313f02e98d3d798aa9568f414c66"
25
26inherit autotools update-rc.d systemd pkgconfig
27
28PACKAGECONFIG ??= "tcp-wrappers"
29PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
30
31INITSCRIPT_NAME = "rpcbind"
32INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
33
34SYSTEMD_SERVICE_${PN} = "rpcbind.service"
35
36inherit useradd
37
38USERADD_PACKAGES = "${PN}"
39USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \
40 --shell /bin/false --user-group rpc"
41
42PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
43PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \
44 --without-systemdsystemunitdir, \
45 systemd \
46"
47
48EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
49
50do_install_append () {
51 mv ${D}${bindir} ${D}${sbindir}
52
53 install -d ${D}${sysconfdir}/init.d
54 sed -e 's,/etc/,${sysconfdir}/,g' \
55 -e 's,/sbin/,${sbindir}/,g' \
56 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
57 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
58
59 install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
60 install -d ${D}${systemd_unitdir}/system
61 install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system
62 install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
63 sed -i -e 's,@SBINDIR@,${sbindir},g' \
64 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
65 ${D}${systemd_unitdir}/system/rpcbind.service
66}