diff options
author | Christian Muehlhaeuser | 2021-06-06 00:10:56 +0200 |
---|---|---|
committer | Christian Muehlhaeuser | 2021-06-06 00:10:56 +0200 |
commit | aa219f2f3280a040471697e0b8d64453213a9e99 (patch) | |
tree | 62adb12839ca6a843078e27d3a82c026dc9ee888 | |
parent | 3c8cf23414a997d01a563a90da7d74e8a7383988 (diff) | |
download | aur-aa219f2f3280a040471697e0b8d64453213a9e99.tar.gz |
Update build instructions
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 44 |
2 files changed, 33 insertions, 24 deletions
@@ -1,17 +1,20 @@ pkgbase = pam_beacon-git pkgdesc = PAM module for multi-factor authentication with Bluetooth Devices & Beacons - pkgver = r20.4a0bd5a + pkgver = r36.52d058d pkgrel = 1 url = https://github.com/muesli/pam-beacon arch = x86_64 + arch = i686 + arch = armv6h + arch = armv7h + arch = aarch64 license = MIT - makedepends = go makedepends = git - makedepends = pam + makedepends = go depends = pam provides = pam_beacon - source = git+https://github.com/muesli/pam-beacon.git + conflicts = pam_beacon + source = pam_beacon-git::git://github.com/muesli/pam-beacon.git sha256sums = SKIP pkgname = pam_beacon-git - @@ -1,40 +1,46 @@ # Maintainer: Christian Muehlhaeuser <muesli at gmail dot com> pkgname=pam_beacon-git -pkgver=r20.4a0bd5a +pkgver=r36.52d058d pkgrel=1 pkgdesc="PAM module for multi-factor authentication with Bluetooth Devices & Beacons" -arch=('x86_64') +arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64') url="https://github.com/muesli/pam-beacon" license=('MIT') -makedepends=('go' 'git' 'pam') depends=('pam') -provides=('pam_beacon') -source=('git+https://github.com/muesli/pam-beacon.git') +makedepends=('git' 'go') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=($pkgname::"git://github.com/muesli/pam-beacon.git") sha256sums=('SKIP') pkgver() { - cd "$srcdir/pam-beacon" + cd "$srcdir/$pkgname" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } -prepare() { - cd "$srcdir/pam-beacon" - GOPATH=`pwd` go get -d -v -} - build() { - cd "$srcdir/pam-beacon" - GOPATH=`pwd` make + cd "$srcdir/$pkgname" + + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + + go build \ + -trimpath \ + -buildmode=pie \ + -mod=readonly \ + -modcacherw \ + -ldflags "${extraflags} -extldflags \"${LDFLAGS}\"" \ + -buildmode=c-shared \ + -o "pam_beacon.so" . } package() { - cd "$srcdir/pam-beacon" + cd "$srcdir/$pkgname" - # Install binary install -Dm755 "pam_beacon.so" "$pkgdir/usr/lib/security/pam_beacon.so" - # Install PAM config - install -Dm644 config/pam.d/system-auth-beacon "$pkgdir/etc/pam.d/system-auth-beacon" - # Copy License - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "config/pam.d/system-auth-beacon" "$pkgdir/etc/pam.d/system-auth-beacon" + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname%-git}/LICENSE" } |