diff --git a/projects/gnupg.org/gpg b/projects/gnupg.org/gpg new file mode 100644 index 00000000..17f6d5e2 --- /dev/null +++ b/projects/gnupg.org/gpg @@ -0,0 +1,13 @@ +#!/bin/sh + +d=$(dirname "$0") + +if [ ! -f "$GNUPGHOME/gpg.conf" ]; then +cat << EOF > $GNUPGHOME/gpg.conf +use-agent +pinentry-mode loopback +agent-program $d/gpg-agent +EOF +fi + +$d/gpg-exec "$@" \ No newline at end of file diff --git a/projects/gnupg.org/package.yml b/projects/gnupg.org/package.yml index e894bc3e..7b107ff1 100644 --- a/projects/gnupg.org/package.yml +++ b/projects/gnupg.org/package.yml @@ -9,6 +9,55 @@ versions: - /gnupg-/ - /.tar.bz2/ +dependencies: + zlib.net: '*' + sourceware.org/bzip2: '*' + gnupg.org/npth: '*' + gnupg.org/libgpg-error: '*' + gnupg.org/libksba: '*' + gnupg.org/libassuan: '*' + gnupg.org/libgcrypt: '*' + gnupg.org/pinentry: '*' + gnutls.org: '*' + openldap.org: '*' + gnu.org/readline: '*' + sqlite.org: '*' + darwin: + gnu.org/gettext: '*' + +runtime: + env: + GNUPGHOME: "{{prefix}}/etc/gnupg" + +build: + freedesktop.org/pkg-config: '*' + linux: + gnu.org/gcc: '*' + script: + - ./configure $ARGS + - make --jobs {{ hw.concurrency }} + - make --jobs {{ hw.concurrency }} install + - run: | + sed -i.bak "s|{{prefix}}|\$(dirname \$0)/..|g" gpg-wks-client + rm gpg-wks-client.bak + working-directory: "{{prefix}}/libexec" + - run: mkdir -p var/run etc/gnupg + working-directory: "{{prefix}}" + - run: | + mv ./gpg ./gpg-exec + working-directory: "{{prefix}}/bin" + - run: install gpg {{prefix}}/bin/ + working-directory: props + env: + ARGS: + - --prefix={{prefix}} + - --libdir={{prefix}}/lib + - --sysconfdir={{prefix}}/etc + - --disable-debug + - --disable-dependency-tracking + - --disable-silent-rules + - --with-pinentry-pgm={{deps.gnupg.org/pinentry.prefix}}/bin/pinentry + provides: - bin/gpg - bin/gpg-agent @@ -26,31 +75,10 @@ provides: - bin/kbxutil - bin/watchgnupg -dependencies: - zlib.net: 1 - sourceware.org/bzip2: 1 - gnupg.org/npth: 1 - gnupg.org/libgpg-error: 1 - gnupg.org/libksba: 1 - gnupg.org/libassuan: 2 - gnupg.org/libgcrypt: 1 - -build: - script: | - ./configure --prefix={{prefix}} - make - make check - make install - test: - script: | - gpg --version - MD5=$(echo foo | gpg --print-md MD5) - SHA1=$(echo foo | gpg --print-md SHA1) - SHA512=$(echo foo | gpg --print-md SHA512) - - test "$MD5" = "D3 B0 73 84 D1 13 ED EC 49 EA A6 23 8A D5 FF 00" - test "$SHA1" = "F1D2 D2F9 24E9 86AC 86FD F7B3 6C94 BCDF 32BE EC15" - # Yes, there's a newline in this string - test "$SHA512" = "0CF9180A 764ABA86 3A67B6D7 2F0918BC 131C6772 642CB2DC E5A34F0A 702F9470 - DDC2BF12 5C12198B 1995C233 C34B4AFD 346C54A2 334C350A 948A51B6 E8B4E6B6" + script: + - killall gpg-agent || true + - gpg --version | grep {{version}} + - gpg --quick-gen-key --batch --passphrase "" "Testing" default default never + - gpg --detach-sign test.txt + - gpg --verify test.txt.sig diff --git a/projects/gnupg.org/test.txt b/projects/gnupg.org/test.txt new file mode 100644 index 00000000..c57eff55 --- /dev/null +++ b/projects/gnupg.org/test.txt @@ -0,0 +1 @@ +Hello World! \ No newline at end of file