Files
meta-openembedded/meta-networking/recipes-support/netcf/netcf_git.bb
T
Paul Gortmaker 00ec8bc10d autotools-bootstrap: make bootstrap package specific.
The theory behind this bbclass was reasonable, with the primary
goal being to avoid multiple downloads of gnulib, but it neglected
the fact that packages would be shipping a specific version of the
./bootstrap which will support some flags but maybe not all the
latest ones from the latest gnulib/build-aux/bootstrap file.

I attempted to simply update the two pkgs to use the latest copy
of bootstrap from gnulib but this of course triggers the descent
into autoconf hell that we all know and love.  Rather than futzing
with the packages configure.ac and deviating from what the pkg
maintainers intended and tested, we can just let the packages have
independent calls to ./bootstrap with whatever flags are needed.

The goal of this commit is to move the prepend out to the packages
and then delete the class without any real functional change ; i.e.
a purely mechanical change.  Then we can adjust each package to
ensure it will still build with a modern host, in an independent
fashion, while keeping the main advantage of not fetching gnulib
two extra times for netcf and fontforge.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-12 11:53:30 -04:00

68 lines
2.0 KiB
BlitzBasic

SUMMARY = "netcf"
DESCRIPTION = "netcf is a cross-platform network configuration library."
HOMEPAGE = "https://fedorahosted.org/netcf/"
SECTION = "libs"
LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff"
SRCREV = "9158278ad35b46ce9a49b2e887483c6d8c287994"
PV = "0.2.8+git${SRCPV}"
SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \
"
DEPENDS += "augeas libnl libxslt libxml2 gnulib"
S = "${WORKDIR}/git"
inherit gettext autotools pkgconfig systemd
EXTRA_OECONF_append_class-target = " --with-driver=redhat"
PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)}"
PACKAGECONFIG[systemd] = "--with-sysinit=systemd,--with-sysinit=initscripts,"
do_configure_prepend() {
currdir=`pwd`
cd ${S}
# avoid bootstrap cloning gnulib on every configure
cat >.gitmodules <<EOF
[submodule "gnulib"]
path = gnulib
url = git://git.sv.gnu.org/gnulib
EOF
cp -rf ${STAGING_DATADIR}/gnulib ${S}
# --force to avoid errors on reconfigure e.g if recipes changed we depend on
# | bootstrap: running: libtoolize --quiet
# | libtoolize: error: 'libltdl/COPYING.LIB' exists: use '--force' to overwrite
# | ...
./bootstrap --force
cd $currdir
}
do_install_append() {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${systemd_unitdir}/system
if [ -d "${D}${libdir}/systemd/system" ]; then
mv ${D}${libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
rm -rf ${D}${libdir}/systemd/
else
mv ${D}${nonarch_libdir}/systemd/system/* ${D}${systemd_unitdir}/system/
rm -rf ${D}${nonarch_libdir}/systemd/
fi
else
mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir}
rm -rf ${D}${sysconfdir}/rc.d/
fi
}
FILES_${PN} += " \
${libdir} \
${nonarch_libdir} \
"
SYSTEMD_SERVICE_${PN} = "netcf-transaction.service"