summaryrefslogtreecommitdiffstats
path: root/source.mk
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-06-03 13:11:27 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-06-03 13:11:27 (EDT)
commitbca7dbbc209e2256ab1bf3054bbc6e2638bb8cbb (patch)
treebf88579ec08e1e3035eb55376b919a5ced2c7d8b /source.mk
parent2c0f711d9bf87797d8de5a9a6e3fad2eeb31076d (diff)
Use SPF 2.0, opkhelper 3.0, and new upstream ver.
Diffstat (limited to 'source.mk')
-rw-r--r--source.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/source.mk b/source.mk
new file mode 100644
index 0000000..3246a4c
--- /dev/null
+++ b/source.mk
@@ -0,0 +1,16 @@
+upstream_version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
+ sed 's/~/-/')
+upstream_archive = opkhelper-$(upstream_version).tar.bz2
+upstream_dir_url = http://files.proteanos.com/pub/opkhelper/$(upstream_version)
+upstream_url = $(upstream_dir_url)/$(upstream_archive)
+upstream_sum = $(upstream_dir_url)/SHA256SUMS
+source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2
+
+$(source_archive):
+ wget "$(upstream_url)"
+ wget -O - "$(upstream_sum)" | grep -F "$(upstream_archive)" >SHA256SUMS
+ sha256sum -c SHA256SUMS
+ rm -f SHA256SUMS
+ mv "$(upstream_archive)" "$(source_archive)"
+
+source: $(source_archive)