From 9e8cbf2627c9ea6edce160388479228eba50928e Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 23 Jun 2014 13:38:46 -0400 Subject: source.mk: New file. --- diff --git a/build b/build index 2a40656..2311c06 100755 --- a/build +++ b/build @@ -1,5 +1,6 @@ #!/usr/bin/make -f +upstream_source = glib include ../source.mk nop: diff --git a/source.mk b/source.mk new file mode 100644 index 0000000..81fe249 --- /dev/null +++ b/source.mk @@ -0,0 +1,17 @@ +upstream_base_name = $(upstream_source)-$(OPK_SOURCE_VERSION_UPSTREAM) +upstream_dir = http://ftp.gnome.org/pub/gnome/sources/$(upstream_source) +upstream_base_ver = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ + sed 's/^\([0-9]*\.[0-9]*\)\..*$$/\1/') +upstream_base_url = $(upstream_dir)/$(upstream_base_ver)/$(upstream_base_name) +source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz + +$(source_archive): + wget -c "$(upstream_base_url).tar.xz" + wget -O - "$(upstream_base_url).sha256sum" | grep -F .tar.xz >sha256sum + sha256sum -c sha256sum + rm sha256sum + unxz -c '$(upstream_base_name).tar.xz' | tar -x + tar -czf '$(source_archive)' $(upstream_source)-*/ + mv $(upstream_source)-*/ src/ + +source: $(source_archive) -- cgit v0.9.1