netcf_git.bb 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
  7. SRCREV = "9158278ad35b46ce9a49b2e887483c6d8c287994"
  8. PV = "0.2.8+git${SRCPV}"
  9. SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \
  10. "
  11. DEPENDS += "augeas libnl libxslt libxml2 gnulib"
  12. S = "${WORKDIR}/git"
  13. inherit gettext autotools pkgconfig systemd
  14. EXTRA_OECONF_append_class-target = " --with-driver=redhat"
  15. PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
  16. PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
  17. do_configure_prepend() {
  18. currdir=`pwd`
  19. cd ${S}
  20. # avoid bootstrap cloning gnulib on every configure
  21. # the dir starts out empty from the pkg, but unconditionally blow it
  22. # away so if we reconfigure due to gnulib sysroot sig changes, we will
  23. # get the newer gnulib content into the build here.
  24. rm -rf ${S}/.gnulib
  25. cp -rf ${STAGING_DATADIR}/gnulib ${S}/.gnulib
  26. # --force to avoid errors on reconfigure e.g if recipes changed we depend on
  27. # | bootstrap: running: libtoolize --quiet
  28. # | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
  29. # | ...
  30. ./bootstrap --force --no-git --gnulib-srcdir=.gnulib
  31. cd $currdir
  32. }
  33. do_install_append() {
  34. if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
  35. install -d ${D}${systemd_unitdir}/system
  36. if [ -d "${D}${libdir}/systemd/system" ]; then
  37. mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
  38. rm -rf ${D}${libdir}/systemd/
  39. else
  40. mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
  41. rm -rf ${D}${nonarch_libdir}/systemd/
  42. fi
  43. else
  44. mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
  45. rm -rf ${D}${sysconfdir}/rc.d/
  46. fi
  47. }
  48. FILES_${PN} += " \
  49. ${libdir} \
  50. ${nonarch_libdir} \
  51. "
  52. SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"