From 9a525b587862fd62bb23b1cb4ebcf586ec2ac5fd Mon Sep 17 00:00:00 2001
From: Carsten Schlote <c.schlote@konzeptpark.de>
Date: Mon, 16 Jul 2007 19:06:12 +0200
Subject: [PATCH] [gawk] Updated and targetinstall completed

Simply completes the gawk configuration and installation.
Package now usable.

Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
---
 rules/gawk.in   |   23 ++++++++++++++++++-----
 rules/gawk.make |   28 ++++++++++++++++++++++++++--
 2 files changed, 44 insertions(+), 7 deletions(-)
 mode change 100644 => 100755 rules/gawk.in

diff --git a/rules/gawk.in b/rules/gawk.in
old mode 100644
new mode 100755
index 3d0316a..d476968
--- a/rules/gawk.in
+++ b/rules/gawk.in
@@ -1,8 +1,21 @@
-config GAWK
+
+menuconfig GAWK
 	bool "gawk"
 	help
-	  Gawk  is the GNU Project's implementation of 
-	  the AWK programming language.  It conforms to 
-	  the definition of the language in the 
-	  POSIX 1003.2 Command Language And Utilities 
+	  Gawk  is the GNU Project's implementation of
+	  the AWK programming language.  It conforms to
+	  the definition of the language in the
+	  POSIX 1003.2 Command Language And Utilities
 	  Standard.
+
+if GAWK
+
+config GAWK_PGAWK
+	bool "Install pgawk"
+	default n
+
+config GAWK_AWKLIB
+	bool "Install awklib"
+	default n
+
+endif
diff --git a/rules/gawk.make b/rules/gawk.make
index b1e0fbd..6068f5b 100644
--- a/rules/gawk.make
+++ b/rules/gawk.make
@@ -2,7 +2,7 @@
 # $Id$
 #
 # Copyright (C) 2003 by Ixia Corporation, By Milan Bobde
-#          
+#
 # See CREDITS for details about who has contributed to this project.
 #
 # For further information about the PTXdist project and license conditions
@@ -104,7 +104,31 @@ gawk_targetinstall: $(STATEDIR)/gawk.targetinstall
 
 $(STATEDIR)/gawk.targetinstall: $(gawk_targetinstall_deps_default)
 	@$(call targetinfo, $@)
-	# FIXME: RSC: ipkgize
+
+	@$(call install_init, gawk)
+	@$(call install_fixup, gawk,PACKAGE,gawk)
+	@$(call install_fixup, gawk,PRIORITY,optional)
+	@$(call install_fixup, gawk,VERSION,$(GAWK_VERSION))
+	@$(call install_fixup, gawk,SECTION,base)
+	@$(call install_fixup, gawk,AUTHOR,"Carsten Schlote <schlote\@konzeptpark.de>")
+	@$(call install_fixup, gawk,DEPENDS,)
+	@$(call install_fixup, gawk,DESCRIPTION,missing)
+
+	@$(call install_copy, gawk, 0, 0, 0755, $(GAWK_DIR)/gawk, /usr/bin/gawk)
+	$(call install_link, gawk, /usr/bin/gawk, /usr/bin/awk)
+
+  ifdef PTXCONF_GAWK_PGAWK
+	@$(call install_copy, gawk, 0, 0, 0755, $(GAWK_DIR)/pgawk, /usr/bin/pgawk)
+  endif
+
+  ifdef PTXCONF_GAWK_AWKLIB
+	@$(call install_copy, gawk, 0, 0, 0755, $(GAWK_DIR)/awklib/igawk, /usr/bin/igawk)
+	@$(call install_copy, gawk, 0, 0, 0755, $(GAWK_DIR)/awklib/pwcat, /usr/libexec/gawk/pwcat)
+	@$(call install_copy, gawk, 0, 0, 0755, $(GAWK_DIR)/awklib/grcat, /usr/libexec/gawk/grcat)
+  endif
+
+	@$(call install_finish, gawk)
+
 	@$(call touch, $@)
 
 # ----------------------------------------------------------------------------
-- 
1.5.3.1

