genode/libports/ports/mpfr.mk
Stephan Mueller 056e0792e5 libports: Verify signatures of 3rd-party code
This patch adds integrity checks for the packages of the libports
repository.

Issue #748
2013-06-10 10:44:09 +02:00

42 lines
1.1 KiB
Makefile

MPFR = mpfr-3.0.0
MPFR_TGZ = $(MPFR).tar.gz
MPFR_SIG = $(MPFR_TGZ).asc
MPFR_BASE_URL = http://www.mpfr.org/$(MPFR)
MPFR_URL = $(MPFR_BASE_URL)/$(MPFR_TGZ)
MPFR_URL_SIG = $(MPFR_BASE_URL)/$(MPFR_SIG)
MPFR_KEY = GNU
#
# Interface to top-level prepare Makefile
#
PORTS += $(MPFR)
MPFR_INCLUDES = include/mpfr/mpfr.h include/mpfr/mparam.h
prepare-mpfr: $(CONTRIB_DIR)/$(MPFR) $(MPFR_INCLUDES)
$(CONTRIB_DIR)/$(MPFR): clean-mpfr
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(MPFR_TGZ):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(MPFR_URL) && touch $@
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(MPFR_URL_SIG) && touch $@
$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(MPFR_TGZ) $(DOWNLOAD_DIR)/$(MPFR_SIG) $(MPFR_KEY)
$(CONTRIB_DIR)/$(MPFR): $(DOWNLOAD_DIR)/$(MPFR_TGZ)
$(VERBOSE)tar xfz $< -C $(CONTRIB_DIR) && touch $@
include/mpfr/mpfr.h:
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)ln -sf ../../$(CONTRIB_DIR)/$(MPFR)/mpfr.h $@
include/mpfr/mparam.h:
$(VERBOSE)mkdir -p $(dir $@)
$(VERBOSE)ln -sf ../../$(CONTRIB_DIR)/$(MPFR)/mparam_h.in $@
clean-mpfr:
$(VERBOSE)rm -f $(MPFR_INCLUDES)
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(MPFR)