summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Furman2018-05-07 14:01:40 +0100
committerCraig Furman2018-05-07 14:01:40 +0100
commitba8f0a32d0f9859aed2d9fc21341b08ca144474c (patch)
tree7beb4cb76a9a0e238f00eb9217f2e37fe4f8cab9
parent75021b8ba7c23fd4d9359c8df84d9aceb385e496 (diff)
downloadaur-ba8f0a32d0f9859aed2d9fc21341b08ca144474c.tar.gz
Assorted fixes
* The package did not build in a clean chroot due to usage of relative path in package() function. This is now fixed. * Prefer $srcdir to $PWD. * Use GitHub-generated source tarball from tag instead of fetching the source with git. * Build with go-pie instead of go. * Remove README as per packaging idioms.
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD23
-rw-r--r--README.md2
3 files changed, 16 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 50a8b3070641..7d6585a4639d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,15 @@
pkgbase = networkmanager-vpn-web-ui
pkgdesc = A web UI for remotely managing NetworkManager-managed VPN connections
pkgver = 0.1.0
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/craigfurman/networkmanager-vpn-web-ui
arch = x86_64
license = MIT
- makedepends = git
- makedepends = go
+ makedepends = go-pie
depends = networkmanager
- source = git+https://github.com/craigfurman/networkmanager-vpn-web-ui
+ source = https://github.com/craigfurman/networkmanager-vpn-web-ui/archive/v0.1.0.tar.gz
source = networkmanager-vpn-web-ui.service
- sha512sums = SKIP
+ sha512sums = faa29c07be2e5b85ba565d0ee0aab3e958e4a40060c13a888e82cadc886bd2df835e582a61894e6ba2694e97f83ef6dac081b7443ef04ff328da57c1f3e00f70
sha512sums = 9c3a3c15a4e758aaeeb8b515e3270685efae778def816b066bb1c9abc004e7b97f995f662198129f78693f8e6d6a63326e7a2ddb84c8628d75203888c4c844b7
pkgname = networkmanager-vpn-web-ui
diff --git a/PKGBUILD b/PKGBUILD
index 200d4d95ad93..7cc9fef7d901 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,35 @@
# Maintainer: Craig Furman <craig.furman89@gmail.com>
pkgname=networkmanager-vpn-web-ui
pkgver=0.1.0
-pkgrel=2
+pkgrel=3
pkgdesc="A web UI for remotely managing NetworkManager-managed VPN connections"
arch=('x86_64')
url="https://github.com/craigfurman/networkmanager-vpn-web-ui"
license=('MIT')
-source=(git+$url
+source=("https://github.com/craigfurman/$pkgname/archive/v$pkgver.tar.gz"
$pkgname.service)
-sha512sums=('SKIP'
+sha512sums=('faa29c07be2e5b85ba565d0ee0aab3e958e4a40060c13a888e82cadc886bd2df835e582a61894e6ba2694e97f83ef6dac081b7443ef04ff328da57c1f3e00f70'
'9c3a3c15a4e758aaeeb8b515e3270685efae778def816b066bb1c9abc004e7b97f995f662198129f78693f8e6d6a63326e7a2ddb84c8628d75203888c4c844b7')
depends=(networkmanager)
-makedepends=(git go)
-
-
-_gopath=$PWD/gopath
-_gopath_loc="$_gopath/src/github.com/craigfurman/$pkgname"
+makedepends=(go-pie)
build() {
+ _gopath=$srcdir/gopath
+ _gopath_loc="$_gopath/src/github.com/craigfurman/$pkgname"
+
mkdir -p "$(dirname "$_gopath_loc")"
- mv "$pkgname" "$(dirname "$_gopath_loc")"
+ mv "${pkgname}-${pkgver}" "$_gopath_loc"
cd "$_gopath_loc"
- git checkout "v$pkgver"
GOPATH=$_gopath make dist
}
package() {
+ _gopath=$srcdir/gopath
+ _gopath_loc="$_gopath/src/github.com/craigfurman/$pkgname"
+
mkdir -p "$pkgdir/opt"
cp -a "$_gopath_loc/dist/$pkgname" "$pkgdir/opt/"
install -Dm644 "$_gopath_loc/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- install -Dm644 "../$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}
diff --git a/README.md b/README.md
deleted file mode 100644
index d05d9bce5c79..000000000000
--- a/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-Arch Linux package for
-[networkmanager-vpn-web-ui](https://github.com/craigfurman/networkmanager-vpn-web-ui).