summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/parcimonie-sh-git/PKGBUILD44
1 files changed, 34 insertions, 10 deletions
diff --git a/pcr/parcimonie-sh-git/PKGBUILD b/pcr/parcimonie-sh-git/PKGBUILD
index e8416b1ae..818d23eb7 100644
--- a/pcr/parcimonie-sh-git/PKGBUILD
+++ b/pcr/parcimonie-sh-git/PKGBUILD
@@ -1,28 +1,52 @@
-# Maintainer: Etienne Perot <etienne at perot dot me>
+# Maintainer (AUR): Frederik Schwan <frederik dot schwan at linux dot com>
+# Contributor (AUR): Etienne Perot <etienne at perot dot me>
+
+# parabola changes and rationale:
+# - renamed pgp-key to avoid collisions
+# - fixed $startdir reference in pkgver()
+
pkgname=parcimonie-sh-git
-_pkgname=parcimonie.sh
-pkgver=38.328bd84
+pkgver=72.03713bb
pkgrel=1
pkgdesc='Bash reimplementation of parcimonie - Refresh your GnuPG keyring without disclosing your whole contact list to the world'
arch=('any')
url='https://github.com/EtiennePerot/parcimonie.sh'
-license=('WTFPL')
+license=('custom:WTFPL')
depends=('bash' 'torsocks' 'tor' 'gnupg')
makedepends=('git')
-source=('git+https://github.com/EtiennePerot/parcimonie.sh')
-sha512sums=('SKIP')
+source=('git+https://github.com/EtiennePerot/parcimonie.sh'
+ "$pkgname-pgp-key::https://perot.me/pgp-minimal.asc")
+sha512sums=('SKIP'
+ 'c5aaa5de31174ee0d1d8937aa5ec17fab3784688f65d7046210b37f9c3a55eee97c1c5dc7ee43c34f961fb043e59cdfd1788ea7dbca1a0e94b3fa996952bc286')
pkgver() {
- cd "${_pkgname}"
+ cd "$srcdir/parcimonie.sh"
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
-build() {
- :
+check() {
+ cd "$srcdir/parcimonie.sh"
+ msg2 'Verifying GPG signature on HEAD commit.'
+ export GNUPGHOME="$(pwd)/.gnupg"
+ mkdir -p "$GNUPGHOME"
+ chmod 700 "$GNUPGHOME"
+ gpg --import < "$srcdir/$pkgname-pgp-key"
+ gpgKeyId="$(gpg --batch --with-colons < "$srcdir/$pkgname-pgp-key" | grep '^sub:' | head -1 | cut -d ':' -f 5)"
+ git log --max-count=1 --pretty="format:%H,%G?,%GK" HEAD | grep -q ",[GU],${gpgKeyId}\$"
+ returnValue="$?"
+ if [ "$returnValue" -eq 0 ]; then
+ msg2 'Latest commit is properly signed.'
+ else
+ error "Latest commit '$(git rev-parse HEAD)' is not signed by GPG key '$gpgKeyId'."
+ fi
+ rm -r "$GNUPGHOME"
+ unset GNUPGHOME
+ return "$returnValue"
}
package() {
- cd "${_pkgname}"
+ cd "$srcdir/parcimonie.sh"
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D -m644 README.md "${pkgdir}/usr/share/parcimonie.sh/README.md"
install -D -m755 parcimonie.sh "${pkgdir}/usr/share/parcimonie.sh/parcimonie.sh"
install -D -m644 pkg/parcimonie.sh@.service "${pkgdir}/usr/lib/systemd/system/parcimonie.sh@.service"