diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2018-12-31 19:52:14 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2018-12-31 19:52:21 +0000 |
commit | c56245d8f481a7c41c63348342f0e6b9ffff5dbc (patch) | |
tree | eda5cc24e8761690f3042b1d4c53b3070a6e4cfa /testing/lxd/APKBUILD | |
parent | 7e42b775063cedb30f5935ba01a606fca119cb51 (diff) | |
download | aports-c56245d8f481a7c41c63348342f0e6b9ffff5dbc.tar.bz2 aports-c56245d8f481a7c41c63348342f0e6b9ffff5dbc.tar.xz |
testing/lxd: fixed sqlite symbols
Diffstat (limited to 'testing/lxd/APKBUILD')
-rw-r--r-- | testing/lxd/APKBUILD | 80 |
1 files changed, 56 insertions, 24 deletions
diff --git a/testing/lxd/APKBUILD b/testing/lxd/APKBUILD index c28d2402dd..0665273b7c 100644 --- a/testing/lxd/APKBUILD +++ b/testing/lxd/APKBUILD @@ -2,14 +2,15 @@ # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=lxd pkgver=3.8 -pkgrel=0 +pkgrel=1 pkgdesc="a container hypervisor and a new user experience for LXC" url="https://linuxcontainers.org/lxd/" arch="all" license="Apache-2.0" -depends="acl xz netcat-openbsd cgmanager squashfs-tools rsync shadow-uidmap lxc ip6tables dnsmasq ca-certificates" +depends="acl xz netcat-openbsd cgmanager squashfs-tools rsync shadow-uidmap lxc ip6tables +dnsmasq ca-certificates" makedepends="lxc-dev protobuf-dev rsync go gettext-dev linux-headers acl-dev - tcl-dev libtool autoconf automake sqlite-dev libuv-dev" + tcl-dev libtool autoconf automake libuv-dev intltool" subpackages="$pkgname-scripts:scripts $pkgname-bash-completion:bashcomp:noarch $pkgname-openrc" install="$pkgname.pre-install" options="!check" @@ -17,37 +18,65 @@ source="https://linuxcontainers.org/downloads/$pkgname/$pkgname-$pkgver.tar.gz $pkgname.confd $pkgname.initd lxd-dont-go-get.patch" + _project="github.com/lxc/lxd" builddir="$srcdir"/lxd-$pkgver prepare() { default_prepare - cd "$builddir" - # symlink links to a path outside of $GOPATH - # copy src to project directory to replace the symlink - rm -f dist/src/"$_project" - rsync -a . --exclude="dist" dist/src/"$_project" + cd "$builddir"/dist/dqlite + autoreconf -i } build() { - cd "$builddir" export GOPATH="$builddir/dist" - make deps - #https://github.com/lxc/lxd/issues/496 - export CGO_CFLAGS="-I${GOPATH}/deps/sqlite/ -I${GOPATH}/deps/dqlite/include/" - export CGO_LDFLAGS="-lintl -L${GOPATH}/deps/sqlite/.libs/ -L${GOPATH}/deps/dqlite/.libs/" - export LD_LIBRARY_PATH="${GOPATH}/deps/sqlite/.libs/:${GOPATH}/deps/dqlite/.libs/" - make -C dist/src/"$_project" -} + export CGO_LDFLAGS="$CGO_LDFLAGS -lintl" + cd "$GOPATH"/sqlite + ./configure \ + --prefix=/usr \ + --enable-replication \ + --disable-amalgamation \ + --disable-tcl \ + --libdir=/usr/lib/lxd + + cd "$GOPATH"/dqlite + PKG_CONFIG_PATH="${GOPATH}/sqlite/" ./configure \ + --prefix=/usr \ + --libdir=/usr/lib/lxd + + cd "$GOPATH"/sqlite + make + + cd "$GOPATH"/dqlite + make CFLAGS="-I${GOPATH}/sqlite" LDFLAGS="-L${GOPATH}/sqlite" -package() { cd "$builddir" - for i in fuidshift lxc ; do - install -Dm 755 "dist/bin/$i" \ - "$pkgdir/usr/bin/$i" + go install -v -x $_project/lxc + export CGO_CFLAGS="-I${GOPATH}/sqlite/ -I${GOPATH}/dqlite/include/" + export CGO_LDFLAGS="$CGO_LDFLAGS -L${GOPATH}/sqlite/.libs/ -L${GOPATH}/dqlite/.libs/ -Wl,-rpath,/usr/lib/lxd" + export LD_LIBRARY_PATH="${GOPATH}/sqlite/.libs/:${GOPATH}/dqlite/.libs/" + go install -v -x -tags libsqlite3 $_project/lxd + for tool in fuidshift lxc-to-lxd lxd-benchmark lxd-p2c; do + go install -v -x $_project/$tool done - install -Dm755 "dist/bin/lxd" "$pkgdir/usr/sbin/lxd" +} + +package() { + export GOPATH="$builddir/dist" + export CGO_LDFLAGS="$CGO_LDFLAGS -lintl" + cd "$GOPATH"/sqlite + make DESTDIR="$pkgdir" install + + cd "$GOPATH"/dqlite + make DESTDIR="$pkgdir" install + + rm $pkgdir/usr/bin/sqlite3 + rm -r $pkgdir/usr/include + + cd $GOPATH + install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname + install -Dm755 "$srcdir"/lxd.initd \ "$pkgdir"/etc/init.d/lxd install -Dm644 "$srcdir"/lxd.confd \ @@ -68,9 +97,12 @@ scripts() { pkgdesc="LXD scripts" depends="$pkgname python3 py3-lxc" - cd "$builddir" - install -Dm755 dist/bin/lxc-to-lxd \ - "$subpkgdir/usr/sbin/lxc-to-lxd" + export GOPATH="$builddir/dist" + cd $GOPATH + + for tool in fuidshift lxc-to-lxd lxd-benchmark lxd-p2c; do + install -Dm755 bin/$tool "$subpkgdir"/usr/bin/$tool + done } sha512sums="20085f05c59287fc8f350d8ef314c19fd7361f8394812e4a0466f76d9df6957348fc954d952f70e50e7227d593a9db9af994e15f69fd76e6ca4812174bfa907c lxd-3.8.tar.gz |