summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorveecue2018-06-04 13:04:35 +0200
committerveecue2018-06-04 13:04:35 +0200
commit46058627d75806a7ca6923ef9b5c8dab04e4e45d (patch)
tree1c601b926aeab0cad9b4fa8f876216a9de80b751
parentb7629d4a7c6f0509b79a958c62b713f6b19906e0 (diff)
downloadaur-46058627d75806a7ca6923ef9b5c8dab04e4e45d.tar.gz
improved build process
-rw-r--r--PKGBUILD28
1 files changed, 14 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 45164cf3f97..7f3d9f4aa8a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: veecue <veecue@ventos.tk>
+pkgname=pacmon-git
_pkgname=pacmon
-pkgname=$_pkgname-git
-pkgver=20180602
+pkgver=20180604
pkgrel=1
pkgdesc="A zero-configuration, fast and simple pacman LAN-mirror as a replacement for pacserve"
arch=('x86_64' 'i686' 'armv6' 'armv7')
@@ -10,28 +10,28 @@ url="https://github.com/veecue/pacmon"
license=('GPL')
makedepends=('git' 'go')
options=('!strip' '!emptydirs')
-_gopkg="github.com/veecue/$_pkgname"
-source=("git+https://$_gopkg")
+source=("$_pkgname::git+https://github.com/veecue/pacmon")
sha256sums=('SKIP')
conflicts=("$_pkgname")
provides=("$_pkgname")
install=pacmon.install
-build() {
- mkdir -p "$srcdir/src/$_gopkg"
- cp -r "$srcdir/$_pkgname/"* "$srcdir/src/$_gopkg"
- GOPATH="$srcdir" go install -ldflags='-s -w' $_gopkg
+prepare() {
+ mkdir -p "$srcdir/src/github.com/veecue"
+ ln -rTsf "$srcdir/$_pkgname" "$srcdir/src/github.com/veecue/pacmon"
}
-check() {
- GOPATH="$srcdir" go test $_gopkg
+build() {
+ cd "$_pkgname"
+ GOPATH="$srcdir" go build -ldflags='-s -w'
}
package() {
- install -pDm755 "$srcdir/bin/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
- install -pDm644 "$srcdir/src/$_gopkg/$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
- install -pDm644 "$srcdir/src/$_gopkg/pacmon-mirrorlist.hook" "$pkgdir/usr/share/libalpm/hooks/pacmon-mirrorlist.hook"
- install -pDm644 "$srcdir/src/$_gopkg/LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
+ cd "$_pkgname"
+ install -Dm755 "$_pkgname" "$pkgdir/usr/bin/$_pkgname"
+ install -Dm644 "$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"
+ install -Dm644 "pacmon-mirrorlist.hook" "$pkgdir/usr/share/libalpm/hooks/pacmon-mirrorlist.hook"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et: