blob: 2f1f6c02640f8598312f72eed12906fbd668a579 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "A system tool for maintaining the /etc/rc*.d hierarchy"
2DESCRIPTION = "Chkconfig is a basic system utility. It updates and queries runlevel \
3information for system services. Chkconfig manipulates the numerous \
4symbolic links in /etc/rc.d, to relieve system administrators of some \
5of the drudgery of manually editing the symbolic links."
6
7RECIPE_NO_UPDATE_REASON = "Version 1.5 requires selinux"
8
Brad Bishop37a0e4d2017-12-04 01:01:44 -05009HOMEPAGE = "https://github.com/fedora-sysv"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010
11LICENSE = "GPLv2"
12LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
13
14DEPENDS = "libnewt popt"
15PROVIDES += "virtual/update-alternatives"
16
17PR = "r7"
18
Brad Bishop37a0e4d2017-12-04 01:01:44 -050019S = "${WORKDIR}/${BPN}-${BPN}-${PV}"
20
21UPSTREAM_CHECK_URI = "https://github.com/fedora-sysv/${BPN}/releases"
22
23SRC_URI = "https://github.com/fedora-sysv/chkconfig/archive/chkconfig-${PV}.tar.gz \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050024 file://replace_caddr_t.patch \
25 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
Brad Bishop37a0e4d2017-12-04 01:01:44 -050027SRC_URI[md5sum] = "3f51ac38a234be5278b3a2d9705eda5e"
28SRC_URI[sha256sum] = "bf1e81f0d7cc999b536c9fe7877abf584a4082fd03c9d2597b6f090966579b40"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
30inherit gettext
31
32# Makefile uses RPM_OPT_FLAGS to construct CFLAGS
33#
34EXTRA_OEMAKE = "\
35 'RPM_OPT_FLAGS=${CFLAGS}' \
36 'LDFLAGS=${LDFLAGS}' \
37 'BINDIR=${base_sbindir}' \
38 'SBINDIR=${sbindir}' \
39 'MANDIR=${mandir}' \
40 'ALTDIR=${localstatedir}/lib/alternatives' \
41 'ALTDATADIR=${sysconfdir}/alternatives' \
42"
43
44do_unpack[postfuncs] += "obey_variables"
45do_unpack[vardeps] += "obey_variables"
46obey_variables () {
47 sed -i -e 's,/etc,${sysconfdir},; s,/lib/systemd,${base_libdir}/systemd,' ${S}/leveldb.h
48 sed -i -e 's,/etc/alternatives,${sysconfdir}/alternatives,' \
49 -e 's,/var/lib/alternatives,${localstatedir}/lib/alternatives,' \
50 -e 's,/usr/share/locale,${datadir}/locale,' ${S}/alternatives.c
51}
52
53do_install() {
54 oe_runmake 'DESTDIR=${D}' 'INSTALLNLSDIR=${D}${datadir}/locale' \
55 'BINDIR=${sbindir}' install
56 install -d ${D}${sysconfdir}/chkconfig.d
57}
58
59PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc"
60SUMMARY_${PN}-alternatives = "Maintain symbolic links determining default commands"
61DESCRIPTION_${PN}-alternatives = "alternatives creates, removes, maintains and displays \
62information about the symbolic links comprising the alternatives system."
63SUMMARY_${PN}-alternatives-doc = "${SUMMARY_${PN}-alternatives} - Documentation files"
64DESCRIPTION_${PN}-alternatives-doc = "${DESCRIPTION_${PN}-alternatives} \
65This package contains documentation."
66RPROVIDES_${PN}-alternatives += "update-alternatives"
67RCONFLICTS_${PN}-alternatives = "update-alternatives-opkg update-alternatives-dpkg"
68FILES_${PN}-alternatives = "${sbindir}/alternatives ${sbindir}/update-alternatives \
69 ${sysconfdir}/alternatives ${localstatedir}/lib/alternatives"
70FILES_${PN}-alternatives-doc = "${mandir}/man8/alternatives.8 \
71 ${mandir}/man8/update-alternatives.8"