Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "netcf" |
| 2 | DESCRIPTION = "netcf is a cross-platform network configuration library." |
| 3 | HOMEPAGE = "https://pagure.io/netcf" |
| 4 | SECTION = "libs" |
| 5 | LICENSE = "LGPLv2.1" |
| 6 | |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=fb919cc88dbe06ec0b0bd50e001ccf1f" |
| 8 | |
| 9 | SRCREV = "2c5d4255857531bc09d91dcd02e86545f29004d4" |
| 10 | PV .= "+git${SRCPV}" |
| 11 | |
| 12 | SRC_URI = "git://pagure.io/netcf.git;protocol=https \ |
| 13 | " |
| 14 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | UPSTREAM_CHECK_GITTAGREGEX = "release-(?P<pver>(\d+(\.\d+)+))" |
| 16 | |
Brad Bishop | 0f291cc | 2019-09-01 15:16:57 -0400 | [diff] [blame^] | 17 | DEPENDS += "augeas libnl libxslt libxml2" |
| 18 | |
| 19 | do_configure[depends] += "gnulib:do_populate_sysroot" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 20 | |
| 21 | S = "${WORKDIR}/git" |
| 22 | |
| 23 | inherit gettext autotools pkgconfig systemd |
| 24 | |
| 25 | EXTRA_OECONF_append_class-target = " --with-driver=redhat" |
| 26 | |
| 27 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
| 28 | PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts," |
| 29 | |
| 30 | EXTRA_AUTORECONF += "-I ${S}/gnulib/m4" |
| 31 | |
| 32 | do_configure_prepend() { |
| 33 | 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 | |
| 52 | do_install_append() { |
| 53 | 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 | |
| 70 | FILES_${PN} += " \ |
| 71 | ${libdir} \ |
| 72 | ${nonarch_libdir} \ |
| 73 | " |
| 74 | |
| 75 | SYSTEMD_SERVICE_${PN} = "netcf-transaction.service" |