summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-21 22:15:21 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-21 22:15:21 (EDT)
commit9fab97aa14a4016a286e028751c74823203aa42d (patch)
tree7b027e02cfeb433be95afae59684707404f31cb0
parenta63ed9196d7e1de51f7d173e01ef1c497f034407 (diff)
source.mk: New file.
-rw-r--r--source.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/source.mk b/source.mk
new file mode 100644
index 0000000..1a6eb6d
--- /dev/null
+++ b/source.mk
@@ -0,0 +1,14 @@
+upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz
+upstream_dir_url = ftp://sourceware.org/pub/$(OPK_SOURCE)
+upstream_url = $(upstream_dir_url)/$(upstream_archive)
+upstream_sum = $(upstream_dir_url)/md5.sum
+source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
+
+$(source_archive):
+ wget -c '$(upstream_url)'
+ wget -O - '$(upstream_sum)' | grep -F '$(upstream_archive)' >MD5SUMS
+ md5sum -c MD5SUMS
+ rm -f MD5SUMS
+ mv '$(upstream_archive)' '$(source_archive)'
+
+source: $(source_archive)