Date: Saturday, October 26, 2019 @ 14:18:50 Author: shibumi Revision: 520343
add netplan as dep for cloud-init Added: netplan/ netplan/repos/ netplan/trunk/ netplan/trunk/PKGBUILD netplan/trunk/make-fixes.patch ------------------+ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ make-fixes.patch | 17 +++++++++++++++++ 2 files changed, 63 insertions(+) Added: netplan/trunk/PKGBUILD =================================================================== --- netplan/trunk/PKGBUILD (rev 0) +++ netplan/trunk/PKGBUILD 2019-10-26 14:18:50 UTC (rev 520343) @@ -0,0 +1,46 @@ +# Maintainer: Christian Rebischke <[email protected]> +# Contributor: Conrad Hoffmann <[email protected]> + +pkgname=netplan +pkgver=0.98 +pkgrel=1 +pkgdesc="Network configuration abstraction renderer" +arch=('i686' 'x86_64') +url="https://github.com/CanonicalLtd/netplan" +license=('GPL3') +depends=( + 'glib2' + 'python-yaml' + 'python-netifaces' + 'iproute2' +) +makedepends=( + 'python' + 'pkgconf' + 'pandoc' +) +source=( + "https://github.com/CanonicalLtd/${pkgname}/archive/${pkgver}.tar.gz" + 'make-fixes.patch' +) +sha256sums=( + '2cc5511eb1675950f37c361e3056fcb17ca213998db7911cbe34511362641d92' + '7c4f0ca9fa822a5493a3d7dbad2c374cfc489699d4aa105784519617a841deb8' +) + +prepare(){ + cd "${pkgname}-${pkgver}" + patch -Np1 -i "$srcdir/make-fixes.patch" + env +} + +build(){ + cd "${pkgname}-${pkgver}" + env + make +} + +package() { + cd "${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" ROOTPREFIX=/usr SBINDIR=/usr/bin install +} Added: netplan/trunk/make-fixes.patch =================================================================== --- netplan/trunk/make-fixes.patch (rev 0) +++ netplan/trunk/make-fixes.patch 2019-10-26 14:18:50 UTC (rev 520343) @@ -0,0 +1,17 @@ +diff --git a/Makefile b/Makefile +index d89eb26..546a37f 100644 +--- a/Makefile ++++ b/Makefile +@@ -33,10 +33,10 @@ generate: src/generate.[hc] src/parse.[hc] src/util.[hc] src/networkd.[hc] src/n + $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.c, $^) `pkg-config --cflags --libs glib-2.0 gio-2.0 yaml-0.1 uuid` + + netplan-dbus: src/dbus.c src/_features.h +- $(CC) $(BUILDFLAGS) $(CFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0` ++ $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0` + + src/_features.h: src/[^_]*.[hc] +- echo "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {" > $@ ++ printf "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {" > $@ + awk 'match ($$0, /netplan-feature:.*/ ) { $$0=substr($$0, RSTART, RLENGTH); print "\""$$2"\"," }' $^ >> $@ + echo "NULL, };" >> $@ +
