summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Fritz2018-12-25 23:08:15 +0100
committerSteffen Fritz2018-12-25 23:08:15 +0100
commite9cb27e1555575bd4012cf249c702a049d72386c (patch)
treeb281cbe7ab699ade501ae207df1a20680981ffe4
parentcafe22d6be4d3cc1e87cf819d84bf6a0f223cb5b (diff)
downloadaur-e9cb27e1555575bd4012cf249c702a049d72386c.tar.gz
v0.4.0-2: Rewrite of PKGBUILD to follow AUR guidelines and added PIE buildmode
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD16
2 files changed, 13 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e5770fa86f6..96b807d35db 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pacaudit
pkgdesc = This package audits installed packages against known vulnerabilities. Use after pacman -Syu.
pkgver = 0.4.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/steffenfritz/pacaudit
arch = i686
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 68e40032216..fd3e63408c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Steffen Fritz <aur AT fritz DOT wtf>
pkgname=pacaudit
pkgver=0.4.0
-pkgrel=1
+pkgrel=2
pkgdesc="This package audits installed packages against known vulnerabilities. Use after pacman -Syu."
arch=('i686' 'x86_64')
url="https://github.com/steffenfritz/pacaudit"
@@ -15,12 +15,20 @@ sha256sums=('9512deb8b29e09aa2312661e5d8c5c0c331e2975110582f407e8482c7d471c4c'
source=("https://github.com/steffenfritz/pacaudit/archive/v$pkgver.tar.gz" "https://fritz.wtf/v$pkgver.tar.gz.asc")
+
+
+prepare(){
+ mkdir -p src/github.com/steffenfritz
+ ln -rTsf "${pkgname}-${pkgver}" src/github.com/steffenfritz/pacaudit
+}
+
build() {
- cd pacaudit-$pkgver
- go build -o pacaudit -ldflags "-s -w"
+ export GOPATH="${srcdir}"
+ cd src/github.com/steffenfritz/pacaudit
+ go build -o pacaudit -ldflags "-s -w" -buildmode=pie
}
package() {
- install -Dm755 "$srcdir"/pacaudit-$pkgver/pacaudit "$pkgdir"/usr/bin/pacaudit
+ install -Dm755 "$srcdir"/pacaudit-${pkgver}/pacaudit "$pkgdir/usr/bin/pacaudit"
install -Dm644 "$srcdir"/pacaudit-$pkgver/pacaudit.1 "${pkgdir}/usr/share/man/man1/pacaudit.1"
}