From 570a7de7b1b0a77ce060337328ca460090b35488 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 25 Aug 2021 00:03:33 -0600 Subject: libre/parabola-hackers: Update --- libre/parabola-hackers/PKGBUILD | 94 ++++++++++++----------------------------- 1 file changed, 28 insertions(+), 66 deletions(-) diff --git a/libre/parabola-hackers/PKGBUILD b/libre/parabola-hackers/PKGBUILD index 6aae5c6ff..d55a97d73 100644 --- a/libre/parabola-hackers/PKGBUILD +++ b/libre/parabola-hackers/PKGBUILD @@ -1,56 +1,37 @@ -# Maintainer: Luke Shumaker +# Maintainer: Luke Shumaker + +# I guese here's as good a place as any to document the release process. +# +# 1. In parabola-hackers.git, bump config.mk:VERSION. +# 2. In parabola-hackers.git, run `make dist`. +# 3. Copy the resulting parabola-hackers-$(VERSION).tar.gz to your +# makepkg.conf:SRCDEST directory. +# 4. Bump PKGBUILD:pkgver. +# 5. Run `updpkgsums`. This will create a GPG signature for the +# source tarball that `make dist` created. +# 6. You know what to do from here. `librerelease` will handle +# uploading the source tarball that `make dist` created. +# n. Tag the parabola-hackers.git commit cumping config.mk:VERSION +# and push that. I (LukeShu) usually hold off on that until right +# before `librerelease`, in case I discover any problems during +# the package build. pkgbase=parabola-hackers pkgname=(parabola-hackers parabola-hackers-nshd) -pkgver=20210719 +pkgver=20210824 pkgrel=1 -_gitver=9f2356b34595b9663c1b25674607d0c981461f2b pkgdesc='Programs for doing magic with hackers.git' url='https://git.parabola.nu/packages/parabola-hackers.git/' license=('GPL') arch=('armv7h' 'i686' 'x86_64') -makedepends=('go' 'git') -source=("parabola-hackers::git://git.parabola.nu/packages/parabola-hackers.git#commit=${_gitver}" - LICENSE.lgpl-2.1.txt::https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt - LICENSE.gpl-2.txt::https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt - LICENSE.apache-2.0.txt::https://www.apache.org/licenses/LICENSE-2.0 - LICENSE.wtfpl-2.txt::http://www.wtfpl.net/txt/copying/) -_gomodules=("git.lukeshu.com/go/libgnulinux#branch=master" - "git.lukeshu.com/go/libnslcd#branch=master" - "git.lukeshu.com/go/libsystemd#commit=0a43955" - "github.com/pkg/errors#tag=v0.8.0" - "go.googlesource.com/sys#commit=bb9c189" - "gopkg.in/check.v1#commit=20d25e2" - "gopkg.in/yaml.v2#commit=5420a8b") -for _gomodule in "${_gomodules[@]}"; do - source+=("gopkg-$(sed -e 's/#.*//' -e 's/\//_/g' <<<"$_gomodule")::git+https://$_gomodule") -done -sha256sums=('SKIP' - 'dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551' - '8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643' - 'cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30' - '0356258391e190dc1d44ea01565cfe627fe44e27dad693a0a54c2483a7b223e5' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' +makedepends=('go') +source=("https://repo.parabola.nu/other/$pkgbase/$pkgbase-$pkgver.tar.gz"{,.sig}) +sha256sums=('29f4b2b75185b8d689d44ec85ca8891c1cdfd50314fc3dd713b1960f7cc6085b' 'SKIP') -pkgver() { - cd "$srcdir/$pkgbase" - grep VERSION < config.mk | awk '{print $3}' -} - prepare() { - mv -Tv gopkg-go.googlesource.com_sys "$srcdir/$pkgbase"/go/src/golang.org/x/sys - for gopkg in gopkg-*; do - mv -Tv "$gopkg" "$srcdir/$pkgbase"/go/src/"$(sed 's/_/\//g' <<<"${gopkg#gopkg-}")" - done - - cd "$srcdir/$pkgbase" + cd "$srcdir/$pkgbase-$pkgver" printf '%s\n' \ prefix='/usr' \ @@ -58,42 +39,23 @@ prepare() { libexecdir='$(libdir)' \ sysconfdir='/etc' \ >> config.mk - - mv -v "$srcdir"/LICENSE* . - - git submodule update --init - - # FIXME: fix this upstream - # GOPATH='/build/parabola-hackers/src/parabola-hackers/go' AR='ar' CC='gcc -std=gnu99' CGO_ENABLED='1' go install nshd - # go install: version is required when current directory is not in a module - # Try 'go install nshd@latest' to install the latest version - # NOTE: this kludge is very brittle - it would (probably) fail if bins_go contained multiple items - # luckily, the golang 'nshd' is not likely to ever change - sed -i 's|$(go_env) go install $(bins_go)|$(go_env) go install $(bins_go)@latest|' Makefile - # FIXME: the above kludge did not work - # GOPATH='/build/parabola-hackers/src/parabola-hackers/go' AR='ar' CC='gcc -std=gnu99' CGO_ENABLED='1' go install nshd@latest - # go install nshd@latest: malformed module path "nshd": missing dot in first path element } build() { - cd "$srcdir/$pkgbase" + cd "$srcdir/$pkgbase-$pkgver" make } check() { - # On armv7h the tests fails with: - # | FAIL gopkg.in/yaml.v2 [build failed] - if [ "$CARCH" != "armv7h" ]; then - cd "$srcdir/$pkgbase" - make check - fi + cd "$srcdir/$pkgbase-$pkgver" + make check } package_parabola-hackers() { backup=(etc/$pkgbase.yml) depends=('ruby' 'colordiff') - cd "$srcdir/$pkgbase" + cd "$srcdir/$pkgbase-$pkgver" make DESTDIR="${pkgdir}" install find "$pkgdir" -type f \( -name 'nshd*' -o -name shadow \) -delete find "$pkgdir" -type d -empty -exec rmdir -p --ignore-fail-on-non-empty -- {} + @@ -108,11 +70,11 @@ package_parabola-hackers-nshd() { replaces=(nshd) conflicts=(nshd) - cd "$srcdir/$pkgbase" + cd "$srcdir/$pkgbase-$pkgver" make DESTDIR="${pkgdir}" install find "$pkgdir" -type f -not \( -name 'nshd*' -o -name shadow \) -delete find "$pkgdir" -type d -empty -exec rmdir -p --ignore-fail-on-non-empty -- {} + install -d "${pkgdir}/usr/share/licenses/${pkgname}" - cp -t "${pkgdir}/usr/share/licenses/${pkgname}" -- LICENSE.txt LICENSE.bsd*.txt + cp -t "${pkgdir}/usr/share/licenses/${pkgname}" -- LICENSE.txt LICENSE.bsd*.txt LICENSE.mit*.txt NOTICE* } -- cgit v1.2.2