blob: 971545849b1a67f5d08fa3d84f18c8b789cd9aa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# Maintainer: Misaka13514 <Misaka13514 at gmail dot com>
pkgname=fscan
pkgver=1.8.4
_pkgver=$pkgver
pkgrel=1
pkgdesc="An intranet comprehensive scanning tool"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/shadow1ng/fscan"
license=('MIT')
depends=('glibc')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz"::"$url/archive/$_pkgver.tar.gz")
sha256sums=('24e0aeac234e458ff1cdfd1b0d8f1d2b4fd920582a420fb1091f7cafa18fe33c')
prepare() {
cd "$pkgname-$_pkgver"
mkdir -p build/
}
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 .
}
check() {
cd "$pkgname-$_pkgver"
go test ./...
}
package() {
cd "$pkgname-$_pkgver"
install -Dm755 -t "$pkgdir/usr/bin/" build/$pkgname
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.txt
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
}
|