[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PATCH: install hooks



Hi,

(In order get the Finnish spellchecking and hyphenation package finally out,)
I propose the attached patch for openoffice.org-debian-files. It implements 
the install hooks.

- Jarno
diff -Naur openoffice.org-debian-files-1.0.1/debian/dirs new/debian/dirs
--- openoffice.org-debian-files-1.0.1/debian/dirs	2002-12-01 19:30:23.000000000 +0000
+++ new/debian/dirs	2002-12-17 12:43:12.000000000 +0000
@@ -2,4 +2,4 @@
 usr/share/doc/openoffice.org
 etc/openoffice
 usr/share/lintian/overrides
-
+usr/lib/openoffice.org-debian-files
diff -Naur openoffice.org-debian-files-1.0.1/debian/rules new/debian/rules
--- openoffice.org-debian-files-1.0.1/debian/rules	2002-12-01 19:59:44.000000000 +0000
+++ new/debian/rules	2002-12-17 14:03:53.000000000 +0000
@@ -35,7 +35,11 @@
 		$(CURDIR)/debian/openoffice.org-debian-files/usr/bin
 	install -m755 bin/spadmin \
 		$(CURDIR)/debian/openoffice.org-debian-files/usr/bin/oopadmin
-	
+
+	# install hook file
+	install -m755 lib/install-hook \
+            $(CURDIR)/debian/openoffice.org-debian-files/usr/lib/openoffice.org-debian-files
+
 	# install response file
 	install -m644 etc/autoresponse.conf \
             $(CURDIR)/debian/openoffice.org-debian-files/etc/openoffice
diff -Naur openoffice.org-debian-files-1.0.1/lib/install-hook new/lib/install-hook
--- openoffice.org-debian-files-1.0.1/lib/install-hook	1970-01-01 00:00:00.000000000 +0000
+++ new/lib/install-hook	2002-12-17 13:01:43.000000000 +0000
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+PACKAGE=$1
+SCRIPT=$2
+ALLARGS=$3
+
+HOOKDIR="/usr/lib/openoffice.org-debian-files/hooks/$PACKAGE/$SCRIPT"
+
+if [ -d $HOOKDIR ]; then
+  RUNPARTSCMD="/bin/run-parts "
+  for x in $@; do
+    RUNPARTSCMD="$RUNPARTSCMD --arg $x"
+  done
+  RUNPARTSCMD="$RUNPARTSCMD \"$HOOKDIR\""
+  eval $RUNPARTSCMD
+fi

Reply to: