summaryrefslogtreecommitdiffstats
path: root/source.mk
diff options
context:
space:
mode:
Diffstat (limited to 'source.mk')
-rw-r--r--source.mk40
1 files changed, 28 insertions, 12 deletions
diff --git a/source.mk b/source.mk
index 8343782..dfcd282 100644
--- a/source.mk
+++ b/source.mk
@@ -1,15 +1,31 @@
-upstream_commit = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
- sed 's/^.*~git........\.\([0-9a-f]*\).*$$/\1/')
-upstream_git_uri = git://git.sv.gnu.org/libreboot.git
-source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2
+upstream_mirror = http://www.mirrorservice.org/sites/libreboot.org/release
+upstream_url_base = $(upstream_mirror)/stable/$(OPK_SOURCE_VERSION_UPSTREAM)
+upstream_archive_base = libreboot_r$(OPK_SOURCE_VERSION_UPSTREAM)_src
+upstream_archive_file = $(upstream_archive_base).tar.xz
-$(source_archive):
- git clone '$(upstream_git_uri)' libreboot/
- (cd libreboot/ && git checkout "$(upstream_commit)")
- mv libreboot/resources/utilities/ich9deblob/ ich9deblob/
- tar -cjf '$@' ich9deblob/
- rm -Rf src/
- mv ich9deblob/ src/
- rm -Rf libreboot/
+gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
+keys = \
+ 'CDC9 CAE3 2CB4 B7FC 84FD C804 969A 9795 05E8 C5B2'
+
+source:
+ wget -c \
+ $(upstream_url_base)/$(upstream_archive_file) \
+ $(upstream_url_base)/SHA512SUMS \
+ $(upstream_url_base)/SHA512SUMS.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 SHA512SUMS.sig SHA512SUMS; then \
+ rm -Rf gnupghome/; \
+ exit 1; \
+ fi
+ rm -Rf gnupghome/
+ grep -F $(upstream_archive_file) SHA512SUMS >SHA512SUMS_src
+ sha512sum -c SHA512SUMS_src
+ tar -xJf $(upstream_archive_file)
+ mv $(upstream_archive_base)/resources/utilities/ich9deblob/ ../src/
+ rm -Rf $(upstream_archive_base)/
source: $(source_archive)