summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d820bcf2034be001381d1723f6dbe6f9503ac1a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Attila Fidan <archlinux-buildsystem@print0.net>

pkgname=ktls-utils-git
_gitname=${pkgname%-git}
pkgver=0.10.r13.g15f57f6
pkgrel=2

pkgdesc="TLS handshake utilities for in-kernel TLS consumers"
url="https://github.com/oracle/ktls-utils"
license=(GPL-2.0-only)
arch=(x86_64)

depends=(
  glib2
  glibc
  gnutls
  libkeyutils.so
  libnl-3.so
)
makedepends=(git)

backup=(etc/tlshd.conf)

source=("git+$url.git#branch=main")
b2sums=(SKIP)

prepare() {
  cd "$_gitname"
  ./autogen.sh
}

pkgver() {
  cd "$_gitname"
  git describe --long --abbrev=7 | sed 's/^ktls-utils-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$_gitname"
  ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --with-systemd
  make
}

package() {
  cd "$_gitname"
  make DESTDIR="$pkgdir" install
  sed -i "s,/usr/sbin/,/usr/bin/,g" "$pkgdir"/usr/lib/systemd/system/*.service
}