summaryrefslogtreecommitdiffstats
path: root/source.mk
blob: aac9ab040a9d1c90d837865c5b48e91749c0e664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Upstream only distributes xz-compressed archives, which opkbuild doesn't
# support.  So we repack with bzip2 compression.

upstream_sf_base = http://downloads.sourceforge.net/project/strace
upstream_path = strace/$(OPK_SOURCE_VERSION_UPSTREAM)
upstream_archive = strace-$(OPK_SOURCE_VERSION_UPSTREAM).tar.xz
upstream_url = $(upstream_sf_base)/$(upstream_path)/$(upstream_archive)
source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2
keys = F7DDBB3A

$(source_archive):
	wget -c '$(upstream_url)'
	set -e; if gpg --version >/dev/null 2>&1; then \
		wget -c '$(upstream_url).asc'; \
		[ -e ../keyring.gpg ] || \
			gpg --keyring ../keyring.gpg --no-default-keyring \
				--recv-keys $(keys) || true; \
		rm -f ../keyring.gpg~; \
		gpg --verify --keyring ../keyring.gpg \
			'$(upstream_archive).asc'; \
	fi
	tar -xJf '$(upstream_archive)'
	rm -f '$(upstream_archive)' '$(upstream_archive).asc'
	tar -cjf '$(source_archive)' \
		$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM)
	mv $(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM) src

source: $(source_archive)