genode/ports/ports/which.mk
Norman Feske 9d778a658d ports/libports: Avoid multi-target rules
This patch splits the download of signatures from the download of the
archive to improve robustness. This way, signature files will be
downloaded even if the corresponding archive is already in place.

Issue #748
2013-06-12 11:35:13 +02:00

32 lines
973 B
Makefile

WHICH = which-2.20
WHICH_TGZ = $(WHICH).tar.gz
WHICH_SIG = $(WHICH_TGZ).sig
WHICH_BASE_URL = http://ftp.gnu.org/gnu/which
WHICH_URL = $(WHICH_BASE_URL)/$(WHICH_TGZ)
WHICH_URL_SIG = $(WHICH_BASE_URL)/$(WHICH_SIG)
WHICH_KEY = GNU
#
# Interface to top-level prepare Makefile
#
PORTS += $(WHICH)
prepare:: $(CONTRIB_DIR)/$(WHICH)
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(WHICH_TGZ):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) -O $@ $(WHICH_URL) && touch $@
$(DOWNLOAD_DIR)/$(WHICH_SIG):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(WHICH_URL_SIG) && touch $@
$(DOWNLOAD_DIR)/$(WHICH_TGZ).verified: $(DOWNLOAD_DIR)/$(WHICH_TGZ) \
$(DOWNLOAD_DIR)/$(WHICH_SIG)
$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(WHICH_TGZ) $(DOWNLOAD_DIR)/$(WHICH_SIG) $(WHICH_KEY)
$(VERBOSE)touch $@
$(CONTRIB_DIR)/$(WHICH): $(DOWNLOAD_DIR)/$(WHICH_TGZ).verified
$(VERBOSE)tar xfz $(<:.verified=) -C $(CONTRIB_DIR) && touch $@