diff options
author | Luotao Fu <l.fu@pengutronix.de> | 2008-10-30 12:37:37 +0000 |
---|---|---|
committer | Luotao Fu <l.fu@pengutronix.de> | 2008-10-30 12:37:37 +0000 |
commit | 463ba5f226492467029c14d819e2c286a859283e (patch) | |
tree | 3744904ad7f66c0ece6124a18f5f1a71359e4ee0 /rules/grep.make | |
parent | 4c1a01da8c68993ab83be75bc237b512aac2bc9d (diff) | |
download | ptxdist-463ba5f226492467029c14d819e2c286a859283e.tar.gz ptxdist-463ba5f226492467029c14d819e2c286a859283e.tar.xz |
* added gnu grep
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8996 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/grep.make')
-rw-r--r-- | rules/grep.make | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/rules/grep.make b/rules/grep.make new file mode 100644 index 000000000..39a4ae9ee --- /dev/null +++ b/rules/grep.make @@ -0,0 +1,115 @@ +# -*-makefile-*- +# $Id: template-make 8785 2008-08-26 07:48:06Z wsa $ +# +# Copyright (C) 2008 by Luotao Fu <l.fu@pengutronix.de> +# +# 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_GREP) += grep + +# +# Paths and names +# +GREP_VERSION := 2.5.3 +GREP := grep-$(GREP_VERSION) +GREP_SUFFIX := tar.bz2 +GREP_URL := http://www.de-mirrors.de/gnuftp/grep//$(GREP).$(GREP_SUFFIX) +GREP_SOURCE := $(SRCDIR)/$(GREP).$(GREP_SUFFIX) +GREP_DIR := $(BUILDDIR)/$(GREP) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(GREP_SOURCE): + @$(call targetinfo) + @$(call get, GREP) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +$(STATEDIR)/grep.extract: + @$(call targetinfo) + @$(call clean, $(GREP_DIR)) + @$(call extract, GREP) + @$(call patchin, GREP) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +GREP_PATH := PATH=$(CROSS_PATH) +GREP_ENV := $(CROSS_ENV) + +# +# autoconf +# +GREP_AUTOCONF := $(CROSS_AUTOCONF_USR) + +$(STATEDIR)/grep.prepare: + @$(call targetinfo) + @$(call clean, $(GREP_DIR)/config.cache) + cd $(GREP_DIR) && \ + $(GREP_PATH) $(GREP_ENV) \ + ./configure $(GREP_AUTOCONF) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/grep.compile: + @$(call targetinfo) + cd $(GREP_DIR) && $(GREP_PATH) $(MAKE) $(PARALLELMFLAGS) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/grep.install: + @$(call targetinfo) + @$(call install, GREP) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/grep.targetinstall: + @$(call targetinfo) + + @$(call install_init, grep) + @$(call install_fixup, grep,PACKAGE,grep) + @$(call install_fixup, grep,PRIORITY,optional) + @$(call install_fixup, grep,VERSION,$(GREP_VERSION)) + @$(call install_fixup, grep,SECTION,base) + @$(call install_fixup, grep,AUTHOR,"Luotao Fu <l.fu@pengutronix.de> <your@email.please>") + @$(call install_fixup, grep,DEPENDS,) + @$(call install_fixup, grep,DESCRIPTION,missing) + + @$(call install_copy, grep, 0, 0, 0755, $(GREP_DIR)/src/grep, /bin/grep) + + @$(call install_finish, grep) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +grep_clean: + rm -rf $(STATEDIR)/grep.* + rm -rf $(PKGDIR)/grep_* + rm -rf $(GREP_DIR) + +# vim: syntax=make |