blob: e8390264ce64c7999967fdbbc8d04a3c47714e67 [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
9HOMEPAGE = "http://fedorahosted.org/releases/c/h/chkconfig"
10
11LICENSE = "GPLv2"
12LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
13
14DEPENDS = "libnewt popt"
15PROVIDES += "virtual/update-alternatives"
16
17PR = "r7"
18
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050019SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2 \
20 file://replace_caddr_t.patch \
21 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
23SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
24SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
25
26inherit gettext
27
28# Makefile uses RPM_OPT_FLAGS to construct CFLAGS
29#
30EXTRA_OEMAKE = "\
31 'RPM_OPT_FLAGS=${CFLAGS}' \
32 'LDFLAGS=${LDFLAGS}' \
33 'BINDIR=${base_sbindir}' \
34 'SBINDIR=${sbindir}' \
35 'MANDIR=${mandir}' \
36 'ALTDIR=${localstatedir}/lib/alternatives' \
37 'ALTDATADIR=${sysconfdir}/alternatives' \
38"
39
40do_unpack[postfuncs] += "obey_variables"
41do_unpack[vardeps] += "obey_variables"
42obey_variables () {
43 sed -i -e 's,/etc,${sysconfdir},; s,/lib/systemd,${base_libdir}/systemd,' ${S}/leveldb.h
44 sed -i -e 's,/etc/alternatives,${sysconfdir}/alternatives,' \
45 -e 's,/var/lib/alternatives,${localstatedir}/lib/alternatives,' \
46 -e 's,/usr/share/locale,${datadir}/locale,' ${S}/alternatives.c
47}
48
49do_install() {
50 oe_runmake 'DESTDIR=${D}' 'INSTALLNLSDIR=${D}${datadir}/locale' \
51 'BINDIR=${sbindir}' install
52 install -d ${D}${sysconfdir}/chkconfig.d
53}
54
55PACKAGES =+ "${PN}-alternatives ${PN}-alternatives-doc"
56SUMMARY_${PN}-alternatives = "Maintain symbolic links determining default commands"
57DESCRIPTION_${PN}-alternatives = "alternatives creates, removes, maintains and displays \
58information about the symbolic links comprising the alternatives system."
59SUMMARY_${PN}-alternatives-doc = "${SUMMARY_${PN}-alternatives} - Documentation files"
60DESCRIPTION_${PN}-alternatives-doc = "${DESCRIPTION_${PN}-alternatives} \
61This package contains documentation."
62RPROVIDES_${PN}-alternatives += "update-alternatives"
63RCONFLICTS_${PN}-alternatives = "update-alternatives-opkg update-alternatives-dpkg"
64FILES_${PN}-alternatives = "${sbindir}/alternatives ${sbindir}/update-alternatives \
65 ${sysconfdir}/alternatives ${localstatedir}/lib/alternatives"
66FILES_${PN}-alternatives-doc = "${mandir}/man8/alternatives.8 \
67 ${mandir}/man8/update-alternatives.8"