From 31d147b20c67d95a9e306d0749200bf964ac42af Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 29 Oct 2021 01:30:24 +0300 Subject: Use actual files instead of submodules --- dnsx/PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 dnsx/PKGBUILD (limited to 'dnsx/PKGBUILD') diff --git a/dnsx/PKGBUILD b/dnsx/PKGBUILD new file mode 100644 index 0000000..88d5a45 --- /dev/null +++ b/dnsx/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Yigit Sever +# Contributor: Caltlgin Stsodaat + +pkgname='dnsx' +pkgver=1.0.6 +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=('ef0ade0508f0d6d8ed7e80f06e2ed888eaca9837fde513fc801451044b6a567e') + +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" +} -- cgit v1.2.3-70-g09d2