# -*-makefile-*- # $Id$ # # Copyright (C) 2002 by Pengutronix e.K., Hildesheim, Germany # See CREDITS for details about who has contributed to this project. # # For further information about the PTXdist project and license conditions # see the README file. # # # We provide this package # PACKAGES-$(PTXCONF_PORTMAP) += portmap # # Paths and names # PORTMAP = portmap_4 PORTMAP_URL = ftp://ftp.porcupine.org/pub/security/$(PORTMAP).tar.gz PORTMAP_SOURCE = $(SRCDIR)/$(PORTMAP).tar.gz PORTMAP_DIR = $(BUILDDIR)/$(PORTMAP) -include $(call package_depfile) # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- portmap_get: $(STATEDIR)/portmap.get $(STATEDIR)/portmap.get: $(PORTMAP_SOURCE) @$(call targetinfo, $@) @$(call get_patches, $(PORTMAP)) @$(call touch, $@) $(PORTMAP_SOURCE): @$(call targetinfo, $@) @$(call get, $(PORTMAP_URL)) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- portmap_extract: $(STATEDIR)/portmap.extract $(STATEDIR)/portmap.extract: $(STATEDIR)/portmap.get @$(call targetinfo, $@) @$(call clean, $(PORTMAP_DIR)) @$(call extract, $(PORTMAP_SOURCE)) @$(call patchin, $(PORTMAP)) # apply some fixes @$(call disable_sh, $(PORTMAP_DIR)/Makefile, HOSTS_ACCESS) @$(call disable_sh, $(PORTMAP_DIR)/Makefile, CHECK_PORT) @$(call disable_sh, $(PORTMAP_DIR)/Makefile, AUX) # FIXME: uggly, make patch perl -i -p -e "s/const/__const/g" $(PORTMAP_DIR)/portmap.c # remove TCP_WRAP assuption if no TCP_WRAP ifndef PTXCONF_TCPWRAPPER sed -ie 's/$$(WRAP_DIR)\/libwrap.a//' $(PORTMAP_DIR)/Makefile endif @$(call touch, $@) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- portmap_prepare: $(STATEDIR)/portmap.prepare portmap_prepare_deps = \ $(STATEDIR)/virtual-xchain.install ifdef PTXCONF_TCPWRAPPER portmap_prepare_deps += $(STATEDIR)/tcpwrapper.install endif portmap_prepare_deps += $(STATEDIR)/portmap.extract $(STATEDIR)/portmap.prepare: $(portmap_prepare_deps) @$(call targetinfo, $@) @$(call touch, $@) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- portmap_compile: $(STATEDIR)/portmap.compile PORTMAP_ENV = $(CROSS_ENV) PORTMAP_PATH = PATH=$(CROSS_PATH) ifdef PTXCONF_TCPWRAPPER PORTMAP_MAKEVARS = WRAP_DIR=$(CROSS_LIB_DIR)/lib endif $(STATEDIR)/portmap.compile: $(STATEDIR)/portmap.prepare @$(call targetinfo, $@) cd $(PORTMAP_DIR) && \ $(PORTMAP_ENV) $(PORTMAP_PATH) make $(PORTMAP_MAKEVARS) @$(call touch, $@) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- portmap_install: $(STATEDIR)/portmap.install $(STATEDIR)/portmap.install: $(STATEDIR)/portmap.compile @$(call targetinfo, $@) @$(call touch, $@) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- portmap_targetinstall: $(STATEDIR)/portmap.targetinstall $(STATEDIR)/portmap.targetinstall: $(STATEDIR)/portmap.install @$(call targetinfo, $@) @$(call install_init,default) @$(call install_fixup,PACKAGE,portmap) @$(call install_fixup,PRIORITY,optional) @$(call install_fixup,VERSION,$(PORTMAP_VERSION)) @$(call install_fixup,SECTION,base) @$(call install_fixup,AUTHOR,"Robert Schwebel ") @$(call install_fixup,DEPENDS,) @$(call install_fixup,DESCRIPTION,missing) ifdef PTXCONF_PORTMAP_INSTALL_PORTMAPPER @$(call install_copy, 0, 0, 0755, $(PORTMAP_DIR)/portmap, /sbin/portmap) endif @$(call install_finish) @$(call touch, $@) # ---------------------------------------------------------------------------- # Clean # ---------------------------------------------------------------------------- portmap_clean: rm -rf $(STATEDIR)/portmap.* rm -rf $(IMAGEDIR)/portmap_* rm -rf $(PORTMAP_DIR) # vim: syntax=make