blob: a4a9c91c6c37fc44e3f9e82609a566425a4852f3 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001SUMMARY = "netcf"
2DESCRIPTION = "netcf is a cross-platform network configuration library."
3HOMEPAGE = "https://pagure.io/netcf"
4SECTION = "libs"
5LICENSE = "LGPLv2.1"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f"
8
9SRCREV = "2c5d4255857531bc09d91dcd02e86545f29004d4"
10PV .= "+git${SRCPV}"
11
12SRC_URI = "git://pagure.io/netcf.git;protocol=https \
13"
14
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015UPSTREAM_CHECK_GITTAGREGEX = "release-(?P<pver>(\d+(\.\d+)+))"
16
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017DEPENDS += "augeas libnl libxslt libxml2 gnulib"
18
19S = "${WORKDIR}/git"
20
21inherit gettext autotools pkgconfig systemd
22
23EXTRA_OECONF_append_class-target = " --with-driver=redhat"
24
25PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
26PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
27
28EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
29
30do_configure_prepend() {
31 currdir=`pwd`
32 cd ${S}
33
34 # avoid bootstrap cloning gnulib on every configure
35 # the dir starts out empty from the pkg, but unconditionally blow it
36 # away so if we reconfigure due to gnulib sysroot sig changes, we will
37 # get the newer gnulib content into the build here.
38 rm -rf ${S}/.gnulib
39 cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
40
41 # --force to avoid errors on reconfigure e.g if recipes changed we depend on
42 # | bootstrap: running: libtoolize --quiet
43 # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
44 # | ...
45 ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
46
47 cd $currdir
48}
49
50do_install_append() {
51 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
52 install -d ${D}${systemd_unitdir}/system
53 if [ -d "${D}${libdir}/systemd/system" ]; then
54 if [ "${systemd_unitdir}" != "${libdir}/systemd" ] ; then
55 mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
56 rm -rf ${D}${libdir}/systemd/
57 fi
58 elif [ "${systemd_unitdir}" != "${nonarch_libdir}/systemd" ] ; then
59 mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
60 rm -rf ${D}${nonarch_libdir}/systemd/
61 fi
62 else
63 mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
64 rm -rf ${D}${sysconfdir}/rc.d/
65 fi
66}
67
68FILES_${PN} += " \
69 ${libdir} \
70 ${nonarch_libdir} \
71 "
72
73SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"