diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-07 21:44:59 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-07 22:09:10 (EDT) |
commit | efe25b35a20e6a4b577d9e63e635c7998aa0ac5c (patch) | |
tree | 4dd2972691aa1f2e7d35d4fcd169243a5305810a | |
parent | e454ba07598f0173c3596b1c99f39d1726285b97 (diff) |
source.mk: Update
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | control | 2 | ||||
-rw-r--r-- | source.mk | 40 |
3 files changed, 31 insertions, 15 deletions
@@ -4,8 +4,8 @@ *~ Session.vim -# Source archives -*-*.orig.tar.* +# Upstream sources +src/ # Work area tmp/ @@ -1,3 +1,3 @@ Maintainer: "P. J. McDermott" <pj@pehjota.net> -Build-Depends: opkhelper-3.0 +Build-Depends: gpg, dirmngr, opkhelper-3.0 Homepage: http://libreboot.org/docs/hcl/gm45_remove_me.html @@ -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) |