diff options
author | Bartłomiej Piotrowski | 2018-01-07 18:37:30 +0100 |
---|---|---|
committer | Bartłomiej Piotrowski | 2018-01-07 18:37:30 +0100 |
commit | d3f737f6bd6c8c51522222af6f0e57035b9702d4 (patch) | |
tree | ab0415edc9634dc48a4cba8e4770c2ced5057933 /PKGBUILD | |
parent | 655cbed566945beb3a797a399dc9e91c99545767 (diff) | |
download | aur-d3f737f6bd6c8c51522222af6f0e57035b9702d4.tar.gz |
Import from official repositories
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 161 |
1 files changed, 93 insertions, 68 deletions
@@ -1,85 +1,110 @@ -# Maintainer: Zygmunt Krynicki <me at zygoon dot pl> -pkgname=snapd -pkgver=2.0.10 -pkgrel=1 -pkgdesc="Service and tools for management of snap packages." -arch=('i686' 'x86_64') +# $Id: PKGBUILD 267493 2017-11-19 19:43:28Z bpiotrowski $ +# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com> +# Contributor: Zygmunt Krynicki <me at zygoon dot pl> + +pkgbase=snapd +pkgname=(snapd snap-confine) +pkgver=2.26.1 +pkgrel=3 +_gitcommit=3853be982c99267133d132901df7da0bf850d949 +arch=('x86_64') url="https://github.com/snapcore/snapd" license=('GPL3') -groups=() -depends=('glibc' 'snap-confine' 'squashfs-tools') -makedepends=('git' 'go' 'go-tools' 'bzr') -provides=() -conflicts=() -replaces=() -backup=() -options=('!strip' '!emptydirs') +makedepends=('git' 'go-pie' 'go-tools' 'bzr') +checkdepends=('python' 'squashfs-tools') + +# snap-confine +makedepends+=('libcap' 'python-docutils' 'systemd' 'xfsprogs') +checkdepends+=('indent' 'shellcheck') + +options=('!strip' 'emptydirs') install=snapd.install -source=("https://github.com/snapcore/$pkgname/archive/$pkgver.tar.gz" +source=("git+https://github.com/snapcore/$pkgname.git#commit=$_gitcommit" 'snapd.sh') -noextract=() -md5sums=('af789f427239a22e2d15d729cd94f95b' - '1d841a1d09ba86945551dfc5c5658b2e') +md5sums=('SKIP' + '8e9b8108165d5b2ae911de9caefb37ce') _gourl=github.com/snapcore/snapd prepare() { - # Use $srcdir/go as our GOPATH - export GOPATH="$srcdir/go" - mkdir -p "$GOPATH" - # Have snapd checkout appear in a place suitable for subsequent GOPATH This - # way we don't have to go get it again and it is exactly what the tag/hash - # above describes. - mkdir -p "$(dirname "$GOPATH/src/${_gourl}")" - ln --no-target-directory -fs "$srcdir/$pkgname-$pkgver" "$GOPATH/src/${_gourl}" + cd "$pkgname" + + # Use $srcdir/go as our GOPATH + export GOPATH="$srcdir/go" + mkdir -p "$GOPATH" + # Have snapd checkout appear in a place suitable for subsequent GOPATH This + # way we don't have to go get it again and it is exactly what the tag/hash + # above describes. + mkdir -p "$(dirname "$GOPATH/src/${_gourl}")" + ln --no-target-directory -fs "$srcdir/$pkgname" "$GOPATH/src/${_gourl}" } build() { - export GOPATH="$srcdir/go" - # Use get-deps.sh provided by upstream to fetch go dependencies using the - # godeps tool and dependencies.tsv (maintained upstream). - ( cd "$GOPATH/src/${_gourl}" && ./get-deps.sh ) - # Build/install snap and snapd - go install "${_gourl}/cmd/snap" - go install "${_gourl}/cmd/snapd" - cd "$pkgname-$pkgver" + export GOPATH="$srcdir/go" + # Use get-deps.sh provided by upstream to fetch go dependencies using the + # godeps tool and dependencies.tsv (maintained upstream). + cd "$GOPATH/src/${_gourl}" + XDG_CONFIG_HOME="$srcdir" ./get-deps.sh + # Build/install snap and snapd + go install "${_gourl}/cmd/snap" + go install "${_gourl}/cmd/snapd" + + # Generate the real systemd units out of the available templates + make -C data/systemd all + + # Build snap-confine + ./mkversion.sh + cd cmd + autoreconf -i -f + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/snapd \ + --with-snap-mount-dir=/var/lib/snapd/snap \ + --disable-apparmor \ + --enable-nvidia-arch \ + --enable-merged-usr + make } +# FIXME check() { - export GOPATH="$srcdir/go" - cd "$GOPATH/src/${_gourl}" - # FIXME: re-enable this after upstream behaves correctly in absence of .git - # ./run-checks --unit - # FIXME: this seems to break on C.UTF-8 locale - # ./run-checks --static + return + export GOPATH="$srcdir/go" + cd "$GOPATH/src/${_gourl}" + + ./run-checks --unit + ./run-checks --static + + cd cmd + make -k check +} + +package_snapd() { + pkgdesc="Service and tools for management of snap packages." + depends=('snap-confine' 'squashfs-tools') + + export GOPATH="$srcdir/go" + # Ensure that we have /var/lib/snapd/{hostfs,lib/gl}/ as they are required by snap-confine + # for constructing some bind mounts around. + install -d -m 755 "$pkgdir/var/lib/snapd/hostfs/" "$pkgdir/var/lib/snapd/lib/gl/" + # Install the refresh timer and service for updating snaps + install -d -m 755 "$pkgdir/usr/lib/systemd/system/" + install -m 644 "$GOPATH/src/${_gourl}/data/systemd/snapd.refresh.service" "$pkgdir/usr/lib/systemd/system" + install -m 644 "$GOPATH/src/${_gourl}/data/systemd/snapd.refresh.timer" "$pkgdir/usr/lib/systemd/system" + # Install the snapd socket and service for the main daemon + install -m 644 "$GOPATH/src/${_gourl}/data/systemd/snapd.service" "$pkgdir/usr/lib/systemd/system" + install -m 644 "$GOPATH/src/${_gourl}/data/systemd/snapd.socket" "$pkgdir/usr/lib/systemd/system" + # Install snap and snapd executables + install -d -m 755 "$pkgdir/usr/bin/" + install -m 755 "$GOPATH/bin/snap" "$pkgdir/usr/bin/" + install -d -m 755 "$pkgdir/usr/lib/snapd" + install -m 755 "$GOPATH/bin/snapd" "$pkgdir/usr/lib/snapd/" + # Install script to export binaries paths of snaps + install -Dm 755 "$srcdir/snapd.sh" "$pkgdir/etc/profile.d/apps-bin-path.sh" } -package() { - export GOPATH="$srcdir/go" - # Ensure that we have /var/lib/snapd/{hostfs,lib/gl}/ as they are required by snap-confine - # for constructing some bind mounts around. - install -d -m 755 "$pkgdir/var/lib/snapd/hostfs/" - touch "$pkgdir/var/lib/snapd/hostfs/.keep" - install -d -m 755 "$pkgdir/var/lib/snapd/lib/gl/" - touch "$pkgdir/var/lib/snapd/lib/gl/.keep" - # Install the refresh timer and service for updating snaps - install -d -m 755 "$pkgdir/usr/lib/systemd/system/" - install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.refresh.service" "$pkgdir/usr/lib/systemd/system" - install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.refresh.timer" "$pkgdir/usr/lib/systemd/system" - # Install the snapd socket and service for the main daemon - install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.service" "$pkgdir/usr/lib/systemd/system" - install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.socket" "$pkgdir/usr/lib/systemd/system" - # Install legacy "frameworks" units - # TODO: drop those when they go away upstream - install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.frameworks-pre.target" "$pkgdir/usr/lib/systemd/system" - install -m 644 "$GOPATH/src/${_gourl}/debian/snapd.frameworks.target" "$pkgdir/usr/lib/systemd/system" - # Install snap and snapd executables - install -d -m 755 "$pkgdir/usr/bin/" - install -m 755 "$GOPATH/bin/snap" "$pkgdir/usr/bin/" - install -d -m 755 "$pkgdir/usr/lib/snapd" - install -m 755 "$GOPATH/bin/snapd" "$pkgdir/usr/lib/snapd/" - # Install the license - install -Dm 755 "$GOPATH/src/${_gourl}/COPYING" "$pkgdir/usr/share/licenses/${pkgname%-git}/COPYING" - # Install script to export binaries paths of snaps - install -Dm 755 "$srcdir/snapd.sh" "$pkgdir/etc/profile.d/apps-bin-path.sh" +package_snap-confine() { + pkgdesc="Confinement system for snap applications" + depends=('libseccomp' 'libsystemd') + make -C "$srcdir/$pkgbase/cmd" install DESTDIR="$pkgdir/" } |