diff options
author | Chocobo1 | 2024-01-12 19:22:35 +0800 |
---|---|---|
committer | Chocobo1 | 2024-01-12 19:25:17 +0800 |
commit | 54c2991b443eca22cb4444daecf65f0597bfde1e (patch) | |
tree | d184a75a9c45cde1e15af89d6c420b625a63e072 /PKGBUILD | |
parent | e4cbc56306e09ab9a4b09c407b8d9349dfe33c1e (diff) | |
download | aur-keyutils-git.tar.gz |
upgpkg: keyutils-git 1.6.3.r6.gc076dff-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 73 |
1 files changed, 44 insertions, 29 deletions
@@ -1,54 +1,69 @@ -# Maintainer: Vincent Grande <shoober420@gmail.com> +# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> +# Previous maintainer: Vincent Grande <shoober420@gmail.com> # Contributor: Stéphane Gaudreault <stephane@archlinux.org> # Contributor: Tobias Powalowski <tpowa@archlinux.org> pkgname=keyutils-git -pkgver=1.6.3 +pkgver=1.6.3.r6.gc076dff pkgrel=1 -pkgdesc='Linux Key Management Utilities' -arch=('x86_64') -url='https://www.kernel.org/' -license=('GPL2' 'LGPL2.1') +pkgdesc="Key management utilities" +arch=('i686' 'x86_64') +url="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/" +license=('GPL' 'LGPL') depends=('glibc' 'sh') makedepends=('git') -provides=('libkeyutils.so' 'keyutils') +provides=("keyutils=$pkgver" 'libkeyutils.so') conflicts=('keyutils') backup=('etc/request-key.conf') -#validpgpkeys=('A86E54B0D5E1B4E0AB7C640FFBB7576BA7CB0B6B') # David Howells <dhowells@redhat.com> +options=('staticlibs') source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git" - 'request-key.conf.patch' 'reproducible.patch') + "reproducible.patch::https://gitlab.archlinux.org/archlinux/packaging/packages/keyutils/-/raw/main/reproducible.patch" + "request-key.conf.patch::https://gitlab.archlinux.org/archlinux/packaging/packages/keyutils/-/raw/main/request-key.conf.patch") sha256sums=('SKIP' - '203c602c61ed94ccd423a0a453d74143d678c641a9a4486367576ee8af2cb8d6' - '7bb7400b2b8c8f0288c86ec9191f8964a1e682745a204013d5fc7c2e1a253d8e') + 'SKIP' + 'SKIP') -_commit() { - # Convert HEAD into a shortened commit id: - git rev-parse --short HEAD + +prepare() { + cd "keyutils" + + patch -Np1 -i "$srcdir/reproducible.patch" + patch -Np0 -i "$srcdir/request-key.conf.patch" } pkgver() { - cd keyutils + cd "keyutils" - # Suggestions for improvement welcome! - printf '%s.r%s.%s' \ - "$(_commit)" + _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1) + _rev=$(git rev-list --count $_tag..HEAD) + _hash=$(git rev-parse --short HEAD) + printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//' } -prepare() { - cd keyutils - # fix paths of binaries in /etc/request-key.conf - patch -Np0 -i ../request-key.conf.patch +build() { + cd "keyutils" - # make keyutils reproducible - patch -Np1 -i ../reproducible.patch + make \ + CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + BINDIR="/usr/bin" \ + SBINDIR="/usr/bin" } -build() { - cd keyutils - make CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" SBINDIR='/usr/bin' BINDIR='/usr/bin' +check() { + cd "keyutils" + + #make test } package() { - cd keyutils - make DESTDIR="${pkgdir}" SBINDIR='/usr/bin' BINDIR='/usr/bin' LIBDIR='/usr/lib' USRLIBDIR='/usr/lib' install + cd "keyutils" + + make \ + DESTDIR="$pkgdir" \ + BINDIR="/usr/bin" \ + SBINDIR="/usr/bin" \ + LIBDIR="/usr/lib" \ + USRLIBDIR="/usr/lib" \ + install } |