summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/source.mk b/source.mk
index f7457bf..22a8b21 100644
--- a/source.mk
+++ b/source.mk
@@ -1,5 +1,6 @@
-upstream_archive = $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz
-upstream_url = http://ftp.gnu.org/pub/gnu/$(OPK_SOURCE)/$(upstream_archive)
+source = $$(printf '%s\n' '$(OPK_SOURCE)' | sed 's/[.].*//')
+upstream_archive = $(source)-$(OPK_SOURCE_VERSION_UPSTREAM).tar.gz
+upstream_url = http://ftp.gnu.org/pub/gnu/$(source)/$(upstream_archive)
source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz
gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg
@@ -7,17 +8,17 @@ keys = \
'7C01 35FB 088A AF6C 66C6 50B9 BB58 69F0 64EA 74AB'
$(source_archive):
- wget -c '$(upstream_url)' '$(upstream_url).sig'
+ wget -c "$(upstream_url)" "$(upstream_url).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 '$(upstream_archive).sig'; then \
+ if ! $(gpg) --verify "$(upstream_archive).sig"; then \
rm -Rf gnupghome/; \
exit 1; \
fi
rm -Rf gnupghome/
- mv '$(upstream_archive)' '$(source_archive)'
+ mv "$(upstream_archive)" '$(source_archive)'
source: $(source_archive)