blob: 818d23eb767955bc7a2d0c44be22bd84ce0b8a63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# 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
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=('custom:WTFPL')
depends=('bash' 'torsocks' 'tor' 'gnupg')
makedepends=('git')
source=('git+https://github.com/EtiennePerot/parcimonie.sh'
"$pkgname-pgp-key::https://perot.me/pgp-minimal.asc")
sha512sums=('SKIP'
'c5aaa5de31174ee0d1d8937aa5ec17fab3784688f65d7046210b37f9c3a55eee97c1c5dc7ee43c34f961fb043e59cdfd1788ea7dbca1a0e94b3fa996952bc286')
pkgver() {
cd "$srcdir/parcimonie.sh"
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
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 "$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"
install -D -m644 pkg/sample-configuration.conf.sample "${pkgdir}/etc/parcimonie.sh.d/sample-configuration.conf.sample"
install -D -m644 pkg/all-users.conf "${pkgdir}/etc/parcimonie.sh.d/all-users.conf"
mkdir -p "${pkgdir}/usr/bin"
ln -sf /usr/share/parcimonie.sh/parcimonie.sh "${pkgdir}/usr/bin/parcimonie.sh"
}
|