blob: 88a19e2640502cb99856f34925638dc55a85ab81 [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 Bishop0f291cc2019-09-01 15:16:57 -040017DEPENDS += "augeas libnl libxslt libxml2"
18
Brad Bishopc1d34332019-09-09 14:56:00 -040019do_configure[depends] += "${MLPREFIX}gnulib:do_populate_sysroot"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020
21S = "${WORKDIR}/git"
22
Andrew Geissler82c905d2020-04-13 13:39:40 -050023inherit gettext autotools perlnative pkgconfig systemd
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024
Patrick Williams213cb262021-08-07 19:21:33 -050025EXTRA_OECONF:append:class-target = " --with-driver=redhat"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026
27PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
28PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
29
30EXTRA_AUTORECONF += "-I ${S}/gnulib/m4"
31
Patrick Williams213cb262021-08-07 19:21:33 -050032do_configure:prepend() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050033 currdir=`pwd`
34 cd ${S}
35
36 # avoid bootstrap cloning gnulib on every configure
37 # the dir starts out empty from the pkg, but unconditionally blow it
38 # away so if we reconfigure due to gnulib sysroot sig changes, we will
39 # get the newer gnulib content into the build here.
40 rm -rf ${S}/.gnulib
41 cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
42
43 # --force to avoid errors on reconfigure e.g if recipes changed we depend on
44 # | bootstrap: running: libtoolize --quiet
45 # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
46 # | ...
47 ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
48
49 cd $currdir
50}
51
Patrick Williams213cb262021-08-07 19:21:33 -050052do_install:append() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050053 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
54 install -d ${D}${systemd_unitdir}/system
55 if [ -d "${D}${libdir}/systemd/system" ]; then
56 if [ "${systemd_unitdir}" != "${libdir}/systemd" ] ; then
57 mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
58 rm -rf ${D}${libdir}/systemd/
59 fi
60 elif [ "${systemd_unitdir}" != "${nonarch_libdir}/systemd" ] ; then
61 mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
62 rm -rf ${D}${nonarch_libdir}/systemd/
63 fi
64 else
65 mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
66 rm -rf ${D}${sysconfdir}/rc.d/
67 fi
68}
69
Patrick Williams213cb262021-08-07 19:21:33 -050070FILES:${PN} += " \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050071 ${libdir} \
72 ${nonarch_libdir} \
73 "
74
Patrick Williams213cb262021-08-07 19:21:33 -050075SYSTEMD_SERVICE:${PN} = "netcf-transaction.service"