# Maintainer: Yigit Sever # Contributor: Caltlgin Stsodaat pkgname='dnsx' pkgver=1.0.7 pkgrel=1 pkgdesc='Fast and multi-purpose DNS toolkit' arch=('x86_64') url='https://github.com/projectdiscovery/dnsx' license=('MIT') makedepends=('go') provides=("${pkgname}") source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") sha256sums=('3ddf978dd97df76675f48a45b3e5eb7f6da33a5941f88115972e4329f7efbfd0') prepare() { export GOPATH="${srcdir}/gopath" go clean -modcache } build() { 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" cd "${pkgname}-${pkgver}/cmd/${pkgname}" go build -v -o "${pkgname}" . } package() { cd "${pkgname}-${pkgver}" install -Dvm755 "cmd/${pkgname}/${pkgname}" -t "${pkgdir}/usr/bin" install -Dvm644 'README.md' -t "${pkgdir}/usr/share/doc/${pkgname}" install -Dvm644 'LICENSE.md' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }