summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubiquity2021-10-13 23:37:24 +0200
committerLubiquity2021-10-13 23:37:24 +0200
commit015e7941a665754c6d0302d7548853364964a414 (patch)
tree3fbe2589f31c2355e5552bc56d7cd92df8068f65
downloadaur-015e7941a665754c6d0302d7548853364964a414.tar.gz
initial import
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore14
-rw-r--r--LICENSE23
-rw-r--r--PKGBUILD44
4 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6c351330ea00
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = check-soa-git
+ pkgdesc = A simple command-line DNS testing tool for having rapidly an idea of the health of a DNS.
+ pkgver = r73.412cb8a
+ pkgrel = 1
+ url = https://www.bortzmeyer.org/check-soa-go.html
+ arch = i686
+ arch = pentium4
+ arch = x86_64
+ arch = arm
+ arch = armv7h
+ arch = armv6h
+ arch = aarch64
+ license = custom
+ makedepends = go
+ makedepends = godns
+ provides = check-soa
+ conflicts = check-soa
+ conflicts = check-soa-bin
+ source = git+https://framagit.org/bortzmeyer/check-soa/
+ source = LICENSE
+ sha256sums = SKIP
+ sha256sums = c13767fa780d56b981f4bc6eea82263bdc77bf974b5d356293e608ca6b37776b
+
+pkgname = check-soa-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..3e39a1c84da9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+# makepkg directories
+pkg/
+src/
+check-soa/
+
+# Built packages
+*.tar.xz
+*.tar.zst
+
+# Downloaded sources
+*.tar.gz
+
+# Backup files
+*~
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..7baa783c9426
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2012, Stephane Bortzmeyer
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b846d35c4856
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Ludovic Bellier <aur at zyrianes.net>
+
+_gitname=check-soa
+pkgname="${_gitname}-git"
+_gitauthor=bortzmeyer # Stéphane Bortzmeyer
+pkgver=r73.412cb8a
+pkgrel=1
+pkgdesc="A simple command-line DNS testing tool for having rapidly an idea of the health of a DNS."
+arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
+url='https://www.bortzmeyer.org/check-soa-go.html'
+license=('custom')
+conflicts=("${_gitname}" "${_gitname}-bin")
+provides=("${_gitname}")
+depends=('glibc')
+makedepends=('git' 'go' 'godns')
+source=("git+https://framagit.org/${_gitauthor}/${_gitname}/"
+ "LICENSE") # license file extracted from the git README.md
+sha256sums=('SKIP'
+ 'c13767fa780d56b981f4bc6eea82263bdc77bf974b5d356293e608ca6b37776b')
+
+pkgver() {
+ cd "${srcdir}/${_gitname}"
+ (
+ set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ # follow https://wiki.archlinux.org/title/Arch_package_guidelines/Security#Golang
+ export GOFLAGS='-buildmode=pie'
+ export CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2"
+ export CGO_LDFLAGS="-Wl,-z,relro,-z,now"
+
+ cd "${srcdir}/${_gitname}"
+ go build -trimpath -ldflags "-X \"main.lVersion=check-soa: ${pkgver}\""
+}
+
+package() {
+ install -Dm 755 "${srcdir}/${_gitname}"/check-soa "${pkgdir}"/usr/bin/check-soa
+ install -Dm 644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm 644 "${srcdir}/${_gitname}"/README.md "${pkgdir}"/usr/share/doc/${pkgname}/README
+}