From 64506123ee7a7e80bd222cbcdd9728101149cdfe Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Wed, 28 Jun 2023 14:45:48 -0400 Subject: [PATCH] Initial commit --- .SRCINFO | 23 ++++++++++++++++++++++ Makefile-patch | 4 ++++ PKGBUILD | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 .SRCINFO create mode 100644 Makefile-patch create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..be5202f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = age-plugin-tkey + pkgdesc = Age Plugin for the Tillitis TKey + pkgver = e524299 + pkgrel = 1 + url = https://github.com/quite/age-plugin-tkey + arch = i686 + arch = x86_64 + arch = armv6h + arch = armv7h + arch = aarch64 + license = GPL2 + makedepends = fuse-overlayfs + makedepends = git + makedepends = go + makedepends = podman + provides = age-plugin-tkey + conflicts = age-plugin-tkey + source = git+https://github.com/quite/age-plugin-tkey#branch=rework + source = Makefile-patch + b2sums = SKIP + b2sums = c90546b17ad8e3c15c1c7c2d303372afabbf910a04d541c691f8d6ede0191c840fea3c6bc1613474c3804b1456daf267e6aded68051d41bd54c364dfa71f659e + +pkgname = age-plugin-tkey diff --git a/Makefile-patch b/Makefile-patch new file mode 100644 index 0000000..b51245a --- /dev/null +++ b/Makefile-patch @@ -0,0 +1,4 @@ +4c4 +< go build ./cmd/age-plugin-tkey +--- +> go build -buildvcs=false ./cmd/age-plugin-tkey diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..71d3db8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,53 @@ +# maintainer: cinnaboot + +pkgname=age-plugin-tkey +pkgver=e524299 +pkgrel=1 +pkgdesc="Age Plugin for the Tillitis TKey" +arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') +url="https://github.com/quite/age-plugin-tkey" +license=('GPL2') +makedepends=('fuse-overlayfs' 'git' 'go' 'podman') +conflicts=("${pkgname}") +provides=("${pkgname}") +source=("git+https://github.com/quite/age-plugin-tkey#branch=rework" + "Makefile-patch") +b2sums=('SKIP' + 'c90546b17ad8e3c15c1c7c2d303372afabbf910a04d541c691f8d6ede0191c840fea3c6bc1613474c3804b1456daf267e6aded68051d41bd54c364dfa71f659e' +) + + +prepare() { + echo "-----------------------------------------" + echo "WARNING: you must have /etc/subuid, and /etc/subgid files configured" + echo " for root, and your user to build with podman" + echo " see) https://wiki.archlinux.org/title/Podman#Rootless_Podman" + + user_subuid=$(grep $USER /etc/subuid) + user_subgid=$(grep $USER /etc/subgid) + root_subuid=$(grep root /etc/subuid) + root_subgid=$(grep root /etc/subgid) + + if [[ $user_subuid =~ $USER \ + && $user_subgid =~ $USER \ + && $root_subuid =~ root \ + && $root_subgid =~ root ]]; then + echo found + else + exit 1 + fi + + patch "$pkgname/Makefile" Makefile-patch +} + +build() { + cd "$pkgname/contrib" + make +} + +package() { + destbin="${pkgdir}/usr/bin" + cd "${srcdir}/${pkgname}" + install -Dm755 age-plugin-tkey "${destbin}/age-plugin-tkey" + strip "${destbin}"/age-plugin-tkey +}