summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild2
-rw-r--r--control2
-rw-r--r--source.mk23
3 files changed, 26 insertions, 1 deletions
diff --git a/build b/build
index d099ee0..c7b62e9 100755
--- a/build
+++ b/build
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+include ../source.mk
+
nop:
@:
diff --git a/control b/control
index 349f8f0..f9f6e9b 100644
--- a/control
+++ b/control
@@ -1,3 +1,3 @@
Maintainer: Warren McDonald <wdm2@njit.edu>
-Build-Depends: opkhelper-3.0, libgmp-dev, libmpfr-dev
+Build-Depends: gpg, dirmngr, opkbuild (>= 4.0.0), opkhelper-3.0, libgmp-dev, libmpfr-dev
Homepage: http://www.multiprecision.org/
diff --git a/source.mk b/source.mk
new file mode 100644
index 0000000..1dc0ddc
--- /dev/null
+++ b/source.mk
@@ -0,0 +1,23 @@
+upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.xz
+upstream_url = http://ftp.gnu.org/pub/gnu/$(OPK_SOURCE)/$(upstream_archive)
+source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.xz
+
+gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
+keys = \
+ 'AD17 A21E F8AE D8F1 CC02 DBD9 F7D5 C9BF 765C 61E3'
+
+$(source_archive):
+ wget -c '$(upstream_url)' '$(upstream_url).sig'
+ install -m 0700 -d gnupghome/
+ [ -e ../keyring.gpg ] || \
+ $(gpg) --keyserver hkp://pool.sks-keyservers.net \
+ --recv-keys $(keys); \
+ rm -f ../keyring.gpg~; \
+ if ! $(gpg) --verify '$(upstream_archive).sig'; then \
+ rm -Rf gnupghome/; \
+ exit 1; \
+ fi
+ rm -Rf gnupghome/
+ mv '$(upstream_archive)' '$(source_archive)'
+
+source: $(source_archive)