blob: 8fb69bb27ac0155bf1f82bd522f71d65cf3c5051 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "netcf"
2DESCRIPTION = "netcf is a cross-platform network configuration library."
3HOMEPAGE = "https://fedorahosted.org/netcf/"
4SECTION = "libs"
5LICENSE = "LGPLv2.1"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
8
9SRCREV = "9158278ad35b46ce9a49b2e887483c6d8c287994"
10PV = "0.2.8+git${SRCPV}"
11
12SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \
13"
14
15DEPENDS += "augeas libnl libxslt libxml2 gnulib"
16
17S = "${WORKDIR}/git"
18
19inherit gettext autotools pkgconfig systemd
20
21EXTRA_OECONF_append_class-target = " --with-driver=redhat"
22
23PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)}"
24PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
25
26do_configure_prepend() {
27 currdir=`pwd`
28 cd ${S}
29
30 # avoid bootstrap cloning gnulib on every configure
31 # the rmdir acts as a sentinel to let us know if the pkg ever changes
32 # the path for GNUlib or populates the dir making it non-empty.
33 rmdir ${S}/.gnulib
34 cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
35
36 # --force to avoid errors on reconfigure e.g if recipes changed we depend on
37 # | bootstrap: running: libtoolize --quiet
38 # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
39 # | ...
40 ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
41
42 cd $currdir
43}
44
45do_install_append() {
46 if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
47 install -d ${D}${systemd_unitdir}/system
48 if [ -d "${D}${libdir}/systemd/system" ]; then
49 mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
50 rm -rf ${D}${libdir}/systemd/
51 else
52 mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
53 rm -rf ${D}${nonarch_libdir}/systemd/
54 fi
55 else
56 mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
57 rm -rf ${D}${sysconfdir}/rc.d/
58 fi
59}
60
61FILES_${PN} += " \
62 ${libdir} \
63 ${nonarch_libdir} \
64 "
65
66SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"