From 463986858db228ccd96b7a5f46504df350f65253 Mon Sep 17 00:00:00 2001 From: caltlgin Date: Sat, 14 Nov 2020 12:58:56 +1300 Subject: Add to AUR --- .SRCINFO | 14 ++++++++++++++ .gitignore | 4 ++++ PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..b47ba0a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = dnsx + pkgdesc = Fast and multi-purpose DNS toolkit + pkgver = 1.0.0 + pkgrel = 1 + url = https://github.com/projectdiscovery/dnsx + arch = x86_64 + license = MIT + makedepends = go + provides = dnsx + source = dnsx-1.0.0.tar.gz::https://github.com/projectdiscovery/dnsx/archive/v1.0.0.tar.gz + sha256sums = 112f81c2e5efc73103bebfb9e8f7db0c7e7e9a95ba432625a5469cfe0a104d06 + +pkgname = dnsx + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..05c6d4d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..4c4736a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Caltlgin Stsodaat + +pkgname='dnsx' +pkgver=1.0.0 +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=('112f81c2e5efc73103bebfb9e8f7db0c7e7e9a95ba432625a5469cfe0a104d06') + +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" +} + +# vim: ts=2 sw=2 et: -- cgit v1.2.3-70-g09d2