summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam2021-08-13 00:09:14 +0000
committerSam2021-08-13 00:09:14 +0000
commit59a678b4ac6eb896e82553aa7959083113a476c4 (patch)
treeb4b29db1fc3c084d7565987d995e8fce479e3766
downloadaur-59a678b4ac6eb896e82553aa7959083113a476c4.tar.gz
wip
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD44
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c09f7681c4d7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = podman-dnsname-git
+ pkgdesc = name resolution for containers
+ pkgver = 1.2.0.r19.g98cd96f
+ pkgrel = 1
+ url = https://github.com/containers/dnsname.git
+ arch = any
+ license = Apache
+ makedepends = go
+ makedepends = git
+ depends = dnsmasq
+ provides = podman-dnsname
+ conflicts = podman-dnsname
+ source = git+https://github.com/containers/dnsname.git
+ sha256sums = SKIP
+
+pkgname = podman-dnsname-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..209eaaefe67f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6bf30b688cfd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: samarthj <dev@samarthj.com>
+
+# shellcheck disable=2034,2154
+
+pkgname=podman-dnsname-git
+_pkgname=podman-dnsname
+_gitpkgname=dnsname
+pkgver=1.2.0.r19.g98cd96f
+pkgrel=1
+pkgdesc="name resolution for containers"
+arch=('any')
+depends=('dnsmasq')
+makedepends=('go' 'git')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+url="https://github.com/containers/$_gitpkgname.git"
+license=(Apache)
+source=("git+$url")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${_gitpkgname}" || exit 1
+ ver=$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
+ echo "${ver#v}"
+}
+
+build() {
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
+
+ cd $_gitpkgname || exit 1
+ make
+}
+
+package() {
+ cd $_gitpkgname || exit 1
+ # non-standard dir since it needs to sit beside the other cni-plugins
+ make PREFIX="/usr" LIBEXECDIR="/usr/lib/cni" DESTDIR="${pkgdir}" install
+ install -vDm 755 "$pkgdir/usr/lib/cni/dnsname" -t "$pkgdir/opt/cni/bin/"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}