summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)