# -*-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_FLASH) += flash # # Paths and names # FLASH_VERSION = 0.9.5 FLASH = flash-$(FLASH_VERSION) FLASH_URL = http://www.netsoc.ucd.ie/flash/$(FLASH).tar.gz FLASH_SOURCE = $(SRCDIR)/$(FLASH).tar.gz FLASH_DIR = $(BUILDDIR)/$(FLASH) FLASH_EXTRACT = gzip -dc # FIXME: RSC: convert this to use the patch repository; this is a bugfix patch! FLASH_PATCH = flash-$(FLASH_VERSION)-ptx2.diff FLASH_PATCH_URL = http://www.pengutronix.de/software/ptxdist/temporary-src/$(FLASH_PATCH) FLASH_PATCH_SOURCE = $(SRCDIR)/$(FLASH_PATCH) FLASH_PATCH_EXTRACT = cat # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- flash_get: $(STATEDIR)/flash.get $(STATEDIR)/flash.get: $(flash_get_deps_default) @$(call targetinfo, $@) @$(call touch, $@) $(FLASH_SOURCE): @$(call targetinfo, $@) @$(call get, FLASH) # ---------------------------------------------------------------------------- # Extract # ---------------------------------------------------------------------------- flash_extract: $(STATEDIR)/flash.extract $(STATEDIR)/flash.extract: $(flash_extract_deps_default) @$(call targetinfo, $@) $(FLASH_EXTRACT) $(FLASH_SOURCE) | $(TAR) -C $(BUILDDIR) -xf - cd $(FLASH_DIR) && patch -p1 < $(FLASH_PATCH_SOURCE) @$(call patchin, FLASH, $(FLASH_DIR)) @$(call touch, $@) # ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- flash_prepare: $(STATEDIR)/flash.prepare FLASH_PATH = PATH=$(PTXCONF_PREFIX)/$(AUTOCONF257)/bin:$(CROSS_PATH) FLASH_ENV = $(CROSS_ENV) # # autoconf # FLASH_AUTOCONF = $(CROSS_AUTOCONF_USR) FLASH_AUTOCONF += --with-ncurses-path=$(NCURSES_DIR) $(STATEDIR)/flash.prepare: $(flash_prepare_deps_default) @$(call targetinfo, $@) @$(call clean, $(FLASH_BUILDDIR)) mkdir -p $(FLASH_DIR) rm -f $(FLASH_DIR)/configure cd $(FLASH_DIR) && autoconf # # Workaround for broken autoconf magic for cross compilation cd $(FLASH_DIR) && \ ac_cv_func_getpgrp_void=yes \ ac_cv_func_setpgrp_void=yes \ ac_cv_sizeof_long_long=8 \ ac_cv_func_memcmp_clean=yes \ ac_cv_func_getrlimit=yes \ $(FLASH_PATH) $(FLASH_ENV) $(FLASH_DIR)/configure $(FLASH_AUTOCONF) @$(call touch, $@) # ---------------------------------------------------------------------------- # Compile # ---------------------------------------------------------------------------- flash_compile: $(STATEDIR)/flash.compile $(STATEDIR)/flash.compile: $(flash_compile_deps_default) @$(call targetinfo, $@) $(FLASH_PATH) $(FLASH_ENV) make -C $(FLASH_DIR) @$(call touch, $@) # ---------------------------------------------------------------------------- # Install # ---------------------------------------------------------------------------- flash_install: $(STATEDIR)/flash.install $(STATEDIR)/flash.install: $(flash_install_deps_default) @$(call targetinfo, $@) # FIXME #@$(call install, FLASH) @$(call touch, $@) # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- flash_targetinstall: $(STATEDIR)/flash.targetinstall $(STATEDIR)/flash.targetinstall: $(flash_targetinstall_deps_default) @$(call targetinfo, $@) @$(call install_init, flash) @$(call install_fixup, flash,PACKAGE,flash) @$(call install_fixup, flash,PRIORITY,optional) @$(call install_fixup, flash,VERSION,$(FLASH_VERSION)) @$(call install_fixup, flash,SECTION,base) @$(call install_fixup, flash,AUTHOR,"Robert Schwebel ") @$(call install_fixup, flash,DEPENDS,) @$(call install_fixup, flash,DESCRIPTION,missing) @$(call install_copy, flash, 0, 0, 0755, $(FLASH_DIR)/flash, /usr/bin/flash) # FIMXE: RSC: permissions? @$(call install_copy, flash, 0, 0, 0755, $(FLASH_DIR)/modules/alarms, /usr/lib/flash/alarms) @$(call install_copy, flash, 0, 0, 0755, $(FLASH_DIR)/modules/background, /usr/lib/flash/background) @$(call install_copy, flash, 0, 0, 0755, $(FLASH_DIR)/modules/countdown, /usr/lib/flash/countdown) @$(call install_finish, flash) @$(call touch, $@) # ---------------------------------------------------------------------------- # Clean # ---------------------------------------------------------------------------- flash_clean: rm -fr $(STATEDIR)/flash.* rm -fr $(IMAGEDIR)/flash_* rm -fr $(FLASH_DIR) # vim: syntax=make