genode/ports/ports/openssh.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

35 lines
1.3 KiB
Makefile

OPENSSH = openssh-6.1p1
OPENSSH_TGZ = $(OPENSSH).tar.gz
OPENSSH_SIG = $(OPENSSH_TGZ).asc
OPENSSH_BASE_URL = ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/
OPENSSH_URL = $(OPENSSH_BASE_URL)/$(OPENSSH_TGZ)
OPENSSH_URL_SIG = $(OPENSSH_BASE_URL)/$(OPENSSH_SIG)
OPENSSH_KEY = 3981992A1523ABA079DBFC66CE8ECB0386FF9C48
#
# Interface to top-level prepare Makefile
#
PORTS += $(OPENSSH)
prepare:: $(CONTRIB_DIR)/$(OPENSSH)
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(OPENSSH_TGZ):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(OPENSSH_URL) && touch $@
$(DOWNLOAD_DIR)/$(OPENSSH_SIG):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(OPENSSH_URL_SIG) && touch $@
$(DOWNLOAD_DIR)/$(OPENSSH_TGZ).verified: $(DOWNLOAD_DIR)/$(OPENSSH_TGZ) \
$(DOWNLOAD_DIR)/$(OPENSSH_SIG)
$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(OPENSSH_TGZ) $(DOWNLOAD_DIR)/$(OPENSSH_SIG) $(OPENSSH_KEY)
$(VERBOSE)touch $@
$(CONTRIB_DIR)/$(OPENSSH): $(DOWNLOAD_DIR)/$(OPENSSH_TGZ).verified
$(VERBOSE)tar xfz $(<:.verified=) -C $(CONTRIB_DIR) && touch $@
$(VERBOSE)patch -d contrib/ -N -p0 < src/noux-pkg/openssh/monitor_fdpass.c.patch
$(VERBOSE)patch -d contrib/ -N -p0 < src/noux-pkg/openssh/sshconnect.h.patch
$(VERBOSE)patch -d contrib/ -N -p0 < src/noux-pkg/openssh/includes_h.patch