Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "netcf" |
| 2 | DESCRIPTION = "netcf is a cross-platform network configuration library." |
| 3 | HOMEPAGE = "https://fedorahosted.org/netcf/" |
| 4 | SECTION = "libs" |
| 5 | LICENSE = "LGPLv2.1" |
| 6 | |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" |
| 8 | |
| 9 | SRCREV = "9158278ad35b46ce9a49b2e887483c6d8c287994" |
| 10 | PV = "0.2.8+git${SRCPV}" |
| 11 | |
| 12 | SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \ |
| 13 | " |
| 14 | |
| 15 | DEPENDS += "augeas libnl libxslt libxml2 gnulib" |
| 16 | |
| 17 | S = "${WORKDIR}/git" |
| 18 | |
| 19 | inherit gettext autotools pkgconfig systemd |
| 20 | |
| 21 | EXTRA_OECONF_append_class-target = " --with-driver=redhat" |
| 22 | |
| 23 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)}" |
| 24 | PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts," |
| 25 | |
| 26 | do_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 | |
| 45 | do_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 | |
| 61 | FILES_${PN} += " \ |
| 62 | ${libdir} \ |
| 63 | ${nonarch_libdir} \ |
| 64 | " |
| 65 | |
| 66 | SYSTEMD_SERVICE_${PN} = "netcf-transaction.service" |