diff options
author | Y7n05h | 2022-01-06 18:49:39 +0800 |
---|---|---|
committer | Y7n05h | 2022-01-06 18:49:39 +0800 |
commit | 4a7ce9daa64178f122817eae0194eb051bd4a71d (patch) | |
tree | 4ca8c14150af91db8609d728c87a33c370beb390 | |
download | aur-netspy.tar.gz |
init
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 34 |
2 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..667f61fbb941 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = netspy + pkgdesc = 一款快速探测内网可达网段工具 + pkgver = 0.0.2 + pkgrel = 2 + url = https://github.com/shmilylty/netspy + arch = x86_64 + license = custom + makedepends = go + depends = glibc + source = netspy-0.0.2.tar.gz::https://github.com/shmilylty/netspy/archive/v0.0.2.tar.gz + sha256sums = 1afdb7a00b7a1b82a64cc860eb5e11056f90c4bb829559a0984ed2b0d52f867c + +pkgname = netspy diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..36003f6e4905 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: Y7n05h <Y7n05h(aT)protonmail--d0t--com> +pkgname=netspy +pkgver=0.0.2 +pkgrel=2 +pkgdesc="一款快速探测内网可达网段工具" +arch=("x86_64") +url="https://github.com/shmilylty/netspy" +license=("custom") +depends=('glibc') +makedepends=(go) +optdepends=() + +source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") +sha256sums=('1afdb7a00b7a1b82a64cc860eb5e11056f90c4bb829559a0984ed2b0d52f867c') + + +prepare() { + cd "$pkgname-$pkgver" + go mod tidy +} + +build() { + cd "$pkgname-$pkgver" + 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 ./cmd/... +} +package() { + cd "$pkgname-$pkgver" + install -Dm755 build "$pkgdir"/usr/bin/$pkgname +} |