From 5b97ba60ecba023e6a69850bc6fc5404f984c37a Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Tue, 18 Jun 2024 19:43:07 +0200
Subject: [PATCH] 1.8-2

---
 .SRCINFO        | 13 +++++++++++++
 .nvchecker.toml |  5 +++++
 PKGBUILD        | 30 +++++++++++++++++-------------
 3 files changed, 35 insertions(+), 13 deletions(-)
 create mode 100644 .SRCINFO
 create mode 100644 .nvchecker.toml

diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..9074aea
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = libndp
+	pkgdesc = Library for Neighbor Discovery Protocol
+	pkgver = 1.8
+	pkgrel = 2
+	url = http://libndp.org/
+	arch = x86_64
+	license = LGPL-2.1-or-later
+	makedepends = git
+	depends = glibc
+	source = git+https://github.com/jpirko/libndp#tag=v1.8
+	b2sums = e2b6d04137c769fa870fa85be159f3a9d3b7c3302d7999962279a643ecc85639e9513c6c8d6a531b23b4bfb929aa16382eab062ee4e5a3f46425ed3ea7747b2e
+
+pkgname = libndp
diff --git a/.nvchecker.toml b/.nvchecker.toml
new file mode 100644
index 0000000..318874d
--- /dev/null
+++ b/.nvchecker.toml
@@ -0,0 +1,5 @@
+[libndp]
+source = "github"
+github = "jpirko/libndp"
+use_max_tag = true
+prefix = "v"
diff --git a/PKGBUILD b/PKGBUILD
index 080ea74..7965cfb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,33 +4,35 @@ pkgname=libndp
 pkgver=1.8
 pkgrel=2
 pkgdesc="Library for Neighbor Discovery Protocol"
-arch=(x86_64)
 url="http://libndp.org/"
-license=(LGPL)
+arch=(x86_64)
+license=(LGPL-2.1-or-later)
 depends=(glibc)
 makedepends=(git)
-_commit=009ce9cd9b950ffa1f4f94c9436027b936850d0c  # tags/v1.8
-source=("git+https://github.com/jpirko/libndp#commit=$_commit")
-sha256sums=('36275381d288177b2b75982a79ce9266d99541d23636c957cfb3afb7f736282a')
-
-pkgver() {
-  cd $pkgname
-  git describe --tags | sed 's/^v//;s/-/+/g'
-}
+source=("git+https://github.com/jpirko/libndp#tag=v$pkgver")
+b2sums=('e2b6d04137c769fa870fa85be159f3a9d3b7c3302d7999962279a643ecc85639e9513c6c8d6a531b23b4bfb929aa16382eab062ee4e5a3f46425ed3ea7747b2e')
 
 prepare() {
   cd $pkgname
 
-  # Fix CVE-2024-5564 https://github.com/jpirko/libndp/issues/26
+  # Fix CVE-2024-5564
+  # https://github.com/jpirko/libndp/issues/26
   git cherry-pick -n 05e4ba7b0d126eea4c04387dcf40596059ee24af
 
   ./autogen.sh
 }
 
 build() {
+  local configure_options=(
+    --prefix=/usr
+    --sysconfdir=/etc
+    --localstatedir=/var
+    --libexecdir=/usr/lib
+    --disable-static
+  )
+
   cd $pkgname
-  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
-    --disable-static --libexecdir=/usr/lib
+  ./configure "${configure_options[@]}"
   make
 }
 
@@ -43,3 +45,5 @@ package() {
   cd $pkgname
   make DESTDIR="$pkgdir" install
 }
+
+# vim:set sw=2 sts=-1 et:
-- 
GitLab