genode/ports/ports/vim.mk
Norman Feske 179f742924 ports/libports: Handle failed integrity checks
This patch makes the handling of failed integrity checks of 3rd-party
packages more robust. Previously, a once failed 'make prepare PKG=curl'
would not leave any trace of the verification state. Hence, a successive
attempt to perform the 'make prepare' step again succeeded even if the
signature check failed.

To solve this problem, the outcome of a successful signature check is
represented by a tag file called 'download/<archive-name>.verified'.
Because the rule for extracting the archive depends on the .verify tag
file, the extraction step is not performed until the signature check
succeeds.

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

43 lines
1.2 KiB
Makefile

VIM = vim-7.3
VIM_TBZ2 = $(VIM).tar.bz2
VIM_URL = ftp://ftp.vim.org/pub/vim/unix/$(VIM_TBZ2)
# from ftp://ftp.vim.org/pub/vim/unix/MD5SUMS
VIM_MD5 = 5b9510a17074e2b37d8bb38ae09edbf2
#
# Interface to top-level prepare Makefile
#
PORTS += $(VIM)
#
# Check for tools
#
$(call check_tool,sed)
prepare:: $(CONTRIB_DIR)/$(VIM)
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(VIM_TBZ2):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(VIM_URL) && touch $@
$(DOWNLOAD_DIR)/$(VIM_TBZ2).verified: $(DOWNLOAD_DIR)/$(VIM_TBZ2)
$(VERBOSE)$(HASHVERIFIER) $(DOWNLOAD_DIR)/$(VIM_TBZ2) $(VIM_MD5) md5
$(VERBOSE)touch $@
$(CONTRIB_DIR)/$(VIM): $(DOWNLOAD_DIR)/$(VIM_TBZ2).verified
$(VERBOSE)tar xfj $(<:.verified=) -C $(CONTRIB_DIR)
$(VERBOSE)mv $(CONTRIB_DIR)/vim73 $@ && touch $@
@#
@# Prevent configure script from breaking unconditionally
@# because of cross compiling.
@#
$(VERBOSE)sed -i "/could not compile program using uint32_t/s/^/#/" $@/src/auto/configure
@#
@# Fix compiled-in VIM install location. Otherwise, the absolute path used
@# during the build will be compiled-in, which makes no sense in the Noux
@# environment
@#
$(VERBOSE)sed -i "/default_vim_dir/s/.(VIMRCLOC)/\/share\/vim/" $@/src/Makefile