Date: Tuesday, November 1, 2022 @ 20:31:01
Author: foutrelis
Revision: 1340307
archrelease: copy trunk to community-staging-x86_64
Added:
swtpm/repos/community-staging-x86_64/
swtpm/repos/community-staging-x86_64/PKGBUILD
(from rev 1340305, swtpm/trunk/PKGBUILD)
swtpm/repos/community-staging-x86_64/keys/
----------+
PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
Copied: swtpm/repos/community-staging-x86_64/PKGBUILD (from rev 1340305,
swtpm/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-11-01 20:31:01 UTC (rev 1340307)
@@ -0,0 +1,50 @@
+# Maintainer: Jonas Witschel <[email protected]>
+pkgname=swtpm
+pkgver=0.7.3
+_tag=f29a3435867dce2ddabace2a0ac8b435ed41d2eb # git rev-parse "v$pkgver"
+pkgrel=2
+pkgdesc='Libtpms-based TPM emulator with socket, character device, and Linux
CUSE interface'
+arch=('x86_64')
+url='https://github.com/stefanberger/swtpm'
+license=('BSD')
+depends=('fuse2' 'glib2' 'gnutls' 'json-glib' 'libseccomp' 'libtpms' 'openssl'
'libseccomp.so')
+makedepends=('git' 'expect' 'iproute2' 'libtasn1' 'python' 'socat')
+checkdepends=('softhsm')
+options=('debug')
+source=("git+$url.git?signed#tag=$_tag")
+sha512sums=('SKIP')
+validpgpkeys=('B818B9CADF9089C2D5CEC66B75AD65802A0B4211') # Stefan Berger
<[email protected]>
+
+pkgver() {
+ cd "$pkgname"
+ git describe | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$pkgname"
+
+ # Remove usage of /usr/bin/env to avoid PATH manipulation attacks
+ sed --in-place 's/env //' samples/swtpm-create-tpmca
samples/swtpm-create-user-config-files.in
+
+ autoreconf --install --force
+}
+
+build() {
+ cd "$pkgname"
+ ./configure --prefix=/usr --with-cuse --with-gnutls --with-seccomp
+ make
+}
+
+check() {
+ cd "$pkgname"
+ make check
+}
+
+package() {
+ cd "$pkgname"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+ echo 'u tss - "tss user for tpm2"' | install -Dm644 /dev/stdin
"$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+ echo 'z /var/lib/swtpm-localca 0750 tss root' | install -Dm644
/dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+ chmod 750 "$pkgdir/var/lib/swtpm-localca"
+}