From 0e0c85ebb72718e8c3690b72b0a968e658d21265 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Mon, 8 Aug 2022 23:50:39 +0200 Subject: [PATCH 1/2] New package: tpm2-tools-5.2 --- .../tpm2-tools/patches/version-cache.patch | 11 +++++++++ srcpkgs/tpm2-tools/template | 23 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 srcpkgs/tpm2-tools/patches/version-cache.patch create mode 100644 srcpkgs/tpm2-tools/template diff --git a/srcpkgs/tpm2-tools/patches/version-cache.patch b/srcpkgs/tpm2-tools/patches/version-cache.patch new file mode 100644 index 000000000000..3766b3fe9a53 --- /dev/null +++ b/srcpkgs/tpm2-tools/patches/version-cache.patch @@ -0,0 +1,11 @@ +diff --git a/configure.ac b/configure.ac +index f1c1711..2ca51b0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,5 +1,5 @@ + AC_INIT([tpm2-tools], +- [m4_esyscmd_s([git describe --tags --always --dirty])]) ++ [m4_esyscmd_s([cat VERSION])]) + AC_CONFIG_MACRO_DIR([m4]) + + AX_IS_RELEASE([dash-version]) diff --git a/srcpkgs/tpm2-tools/template b/srcpkgs/tpm2-tools/template new file mode 100644 index 000000000000..cbba94a2b9da --- /dev/null +++ b/srcpkgs/tpm2-tools/template @@ -0,0 +1,23 @@ +# Template file for 'tpm2-tools' +pkgname=tpm2-tools +version=5.2 +revision=1 +build_style=gnu-configure +hostmakedepends="autoconf autoconf-archive automake libtool pandoc pkg-config" +makedepends="libcurl-devel openssl-devel tpm2-tss-devel" +short_desc="Trusted Platform Module (TPM2.0) tools" +maintainer="Marcin Puc " +license="BSD-3-Clause" +homepage="https://github.com/tpm2-software/tpm2-tools/" +changelog="https://raw.githubusercontent.com/tpm2-software/tpm2-tools/master/docs/CHANGELOG.md" +distfiles="https://github.com/tpm2-software/tpm2-tools/archive/${version}.tar.gz" +checksum=6b81d8214cc8006a8a5011926df917b885f320e428470a61669f577c0778e4d8 + +pre_configure() { + echo "${version}" > VERSION + ./bootstrap +} + +post_install() { + vlicense doc/LICENSE +} From 2f1c1f828c56cb717c8fefd0b6e8f6dba2daeadd Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Mon, 8 Aug 2022 23:51:03 +0200 Subject: [PATCH 2/2] New package: tpm2-totp-0.3.0 --- common/shlibs | 1 + srcpkgs/libtpm2-totp | 1 + srcpkgs/tpm2-totp-devel | 1 + srcpkgs/tpm2-totp/template | 43 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+) create mode 120000 srcpkgs/libtpm2-totp create mode 120000 srcpkgs/tpm2-totp-devel create mode 100644 srcpkgs/tpm2-totp/template diff --git a/common/shlibs b/common/shlibs index ea6fde4ffe31..743596e51e39 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4185,3 +4185,4 @@ libnvidia-container-go.so.1 libnvidia-container-1.10.0_1 libqtspell-qt5.so.1 qtspell-1.0.1_1 libopensmtpd.so.0 libopensmtpd-0.7_1 libiio.so.0 libiio-0.23_1 +libtpm2-totp.so.0 libtpm2-totp-0.3.0_1 diff --git a/srcpkgs/libtpm2-totp b/srcpkgs/libtpm2-totp new file mode 120000 index 000000000000..483b177bd8ef --- /dev/null +++ b/srcpkgs/libtpm2-totp @@ -0,0 +1 @@ +tpm2-totp \ No newline at end of file diff --git a/srcpkgs/tpm2-totp-devel b/srcpkgs/tpm2-totp-devel new file mode 120000 index 000000000000..483b177bd8ef --- /dev/null +++ b/srcpkgs/tpm2-totp-devel @@ -0,0 +1 @@ +tpm2-totp \ No newline at end of file diff --git a/srcpkgs/tpm2-totp/template b/srcpkgs/tpm2-totp/template new file mode 100644 index 000000000000..16e5c66e97fb --- /dev/null +++ b/srcpkgs/tpm2-totp/template @@ -0,0 +1,43 @@ +# Template file for 'tpm2-totp' +pkgname=tpm2-totp +version=0.3.0 +revision=1 +build_style=gnu-configure +hostmakedepends="autoconf autoconf-archive automake doxygen libtool pandoc pkg-config" +makedepends="dracut mkinitcpio qrencode-devel tpm2-tss-devel" +checkdepends="iproute2 oath-toolkit-devel swtpm tpm2-tools" +short_desc="Attest the trustworthiness of a device using TOTP" +maintainer="Marcin Puc " +license="BSD-3-Clause" +homepage="https://github.com/tpm2-software/tpm2-totp" +changelog="https://raw.githubusercontent.com/tpm2-software/tpm2-totp/master/CHANGELOG.md" +distfiles="https://github.com/tpm2-software/tpm2-totp/archive/v${version}.tar.gz" +checksum=5ff29164979d21bc0a51afce17aee80929ccce3270d0f4abce996fd36a4469e1 + +if [ -n $XBPS_CHECK_PKGS ]; then + configure_args="--enable-integration" +fi + +pre_configure() { + autoreconf -isv +} + +libtpm2-totp_package() { + short_desc+=" - library files" + pkg_install() { + vmove "usr/lib/*.so.*" + vlicense LICENSE + } +} + +tpm2-totp-devel_package() { + short_desc+=" - development files" + depends="libtpm2-totp>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/share/man/man3 + } +}