summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 32 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index dda4f90f4947..5e830b1a4027 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,21 +3,47 @@
_srcname=assetfinder
pkgname=assetfinder-git
-pkgver=r17.e0a2b33
+pkgver=r19.4e95d87
pkgrel=1
pkgdesc="Find domains and subdomains related to a given domain"
arch=('any')
url="https://github.com/tomnomnom/assetfinder"
+source=("git+${url}.git")
license=('MIT')
makedepends=('go' 'git')
conflicts=('assetfinder')
+provides=('assetfinder')
+sha256sums=('SKIP')
-prepare() {
- export GOPATH="$srcdir"/gopath
+pkgver() {
+ cd "${srcdir}/${pkgname/-git/}"
+
+ # Get the version number.
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare(){
+ cd "${pkgname/-git/}"
+ mkdir -p build/
+}
+
+build() {
+ cd "${pkgname/-git/}"
+ export GO111MODULE=auto
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o build .
+}
+
+check() {
+ cd "${pkgname/-git/}"
+ go test ./...
}
package() {
- go get -u github.com/tomnomnom/${_srcname}
- mkdir -p ${pkgdir}/usr/bin
- install $GOPATH/bin/${_srcname} ${pkgdir}/usr/bin/${_srcname}
+ cd "${pkgname/-git/}"
+ install -Dm755 build/${pkgname/-git/} "$pkgdir"/usr/bin/${pkgname/-git/}
}