summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorBao Trinh2023-04-03 18:41:04 -0500
committerBao Trinh2023-04-03 18:41:04 -0500
commit955ae35ea15cc119c46ef4875fc49cb65de80605 (patch)
tree75d7065ef6185108904a62c5b34792bd41fc54f0 /PKGBUILD
parentb6442e2271ebdfbcb4d9ed303ff162c89e6fe668 (diff)
downloadaur-cni-plugins-nftables.tar.gz
v1.0.12
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD28
1 files changed, 12 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1ac7c25ed09b..076e7b86318d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,34 +1,28 @@
-# Maintainer: Davide Depau <davide@depau.eu>
+# Maintainer: Bao Trinh <qubidt@gmail.com>
+# Contributor: Davide Depau <davide@depau.eu>
-_pkgname=cni-plugins-nftables
-pkgname="${_pkgname}-git"
-pkgver=v1.0.9.r0.ge25d348
+_pkgname=cni-plugins
+pkgname=cni-plugins-nftables
+pkgver=1.0.12
pkgrel=1
pkgdesc='CNI plugins compatible with nftables'
arch=('x86_64' 'i686' 'pentium4' 'armv7h' 'aarch64')
url="https://github.com/greenpau/cni-plugins"
license=('apache')
makedepends=('go' 'git')
-source=("${_pkgname}::git+https://github.com/greenpau/cni-plugins.git")
-conflicts=("${_pkgname}")
+source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
optdepends=(
"cni-plugins: Other network plugins maintained by the CNI team"
)
-provides=("${_pkgname}")
-sha256sums=('SKIP')
-
-pkgver() {
- cd "$_pkgname"
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
-}
+sha256sums=('51c4b41c61f46c7dfc691d52dba301e7d8189589e1a625772f761ea3ae804fb3')
prepare(){
- cd "$_pkgname"
+ cd "${_pkgname}-${pkgver}"
mkdir -p build/
}
build() {
- cd "$_pkgname"
+ cd "${_pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
@@ -39,11 +33,13 @@ build() {
}
package() {
- cd "$_pkgname"
+ cd "${_pkgname}-${pkgver}"
install -dm755 "$pkgdir/usr/lib/cni"
install -dm755 "$pkgdir/opt/cni/bin"
install -Dm755 build/cni-nftables-portmap "$pkgdir"/usr/lib/cni/cni-nftables-portmap
install -Dm755 build/cni-nftables-firewall "$pkgdir"/usr/lib/cni/cni-nftables-firewall
install -Dm755 build/cni-nftables-portmap "$pkgdir"/opt/cni/bin/cni-nftables-portmap
install -Dm755 build/cni-nftables-firewall "$pkgdir"/opt/cni/bin/cni-nftables-firewall
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+ install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
}