From 012f492b3ab5d2fe8c3130e1ec7e5cbd90597ee5 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 | 30 +++++++++++++++++++ 2 files changed, 41 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..30120d8fc322 --- /dev/null +++ b/srcpkgs/tpm2-tools/template @@ -0,0 +1,30 @@ +# Template file for 'tpm2-tools' +pkgname=tpm2-tools +version=5.2 +revision=1 +build_style=gnu-configure +hostmakedepends="autoconf autoconf-archive automake libtool pkg-config $(vopt_if man pandoc)" +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/refs/tags/${version}.tar.gz" +checksum=6b81d8214cc8006a8a5011926df917b885f320e428470a61669f577c0778e4d8 + +build_options="man" +desc_option_man="Use pandoc for manpages" + +case "$XBPS_MACHINE" in + x86_64*|i686|ppc64le*|ppc64) build_options_default="man" ;; +esac + +pre_configure() { + echo "${version}" > VERSION + ./bootstrap +} + +post_install() { + vlicense doc/LICENSE +} From 44f43bce1e745462283aeca9d3834f298cdbe2ad 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 | 53 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 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 3654a4e81c0a..8c4f10508c7b 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4161,3 +4161,4 @@ libsyncthingconnector.so.1.2.3 syncthingtray-1.2.3_1 libglibutil.so.1 libglibutil-1.0.64_1 libgbinder.so.1 libgbinder-1.1.20_1 libsunpinyin.so.3 libsunpinyin-3.0.0rc2_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..ebdf3f359c30 --- /dev/null +++ b/srcpkgs/tpm2-totp/template @@ -0,0 +1,53 @@ +# 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 pkg-config $(vopt_if man pandoc)" +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/refs/tags/v${version}.tar.gz" +checksum=5ff29164979d21bc0a51afce17aee80929ccce3270d0f4abce996fd36a4469e1 + +build_options="man" +desc_option_man="Use pandoc for manpages" + +case "$XBPS_MACHINE" in + x86_64*|i686|ppc64le*|ppc64) build_options_default="man" ;; +esac + +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" + + if [ -n "$build_option_man" ]; then + vmove usr/share/man/man3 + fi + } +}