public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
To: Mailing List: CygWin-Apps <cygwin-apps@cygwin.com>
Subject: Re: cygport-0.9.2 in release-2
Date: Wed, 17 Sep 2008 16:47:00 -0000	[thread overview]
Message-ID: <48D13449.3020208@cwilson.fastmail.fm> (raw)
In-Reply-To: <2uv1d494rdg4ui0aepbp8o10uah163jvtl@4ax.com>

[-- Attachment #1: Type: text/plain, Size: 624 bytes --]

Andrew Schulman wrote:

> For a long time now I've patched every release of cygport with the attached
> patch, that adds the src_prep_fini_hook(), src_install_init_hook(), and
> src_install_fini_hook() hook functions.  Charles Wilson originally posted a
> patch for this about 2 years ago
> (http://www.cygwin.com/ml/cygwin/2007-01/msg00110.html).

Current versions of cygport have a modified form of (some) of these hooks.

check out 'src_patch_hook', 'src_unpack_hook'.  The only remaining hook
that I currently use, but which is not in stock cygport, is
src_postinst_hook. Patch (against old 3.10) attached.

--
Chuck




[-- Attachment #2: cygport-postinst-hook.patch --]
[-- Type: text/plain, Size: 2691 bytes --]

Index: bin/cygport.in
===================================================================
RCS file: /cvsroot/cygwin-ports/cygport/bin/cygport.in,v
retrieving revision 1.106
diff -u -r1.106 cygport.in
--- bin/cygport.in	23 Apr 2008 14:43:48 -0000	1.106
+++ bin/cygport.in	27 Apr 2008 01:22:43 -0000
@@ -1179,6 +1179,7 @@
 # mutable:
 #	USE_DESTDIR
 #	src_install
+#	src_postinst_hook
 #
 # public:
 #	cyginstall
@@ -1193,6 +1194,7 @@
 #	_exeinto_dir
 #	_insinto_dir
 #	__prepinstalldirs
+#	__src_postinst_hook_exec
 #
 ################################################################################
 
@@ -1296,6 +1298,20 @@
 	esac
 }
 
+# src_postinst_hook is an optional function that may be
+# defined to modify the cygport 'install' sequence. If defined,
+# it is called after the automatic "postinst" function. This 
+# can be useful if, for instance, the default docdir:
+#    usr/share/doc/${PN}-${PV}
+# is not appropriate, and should be "corrected" prior to 
+# packaging. See the rxvt-unicode-X cygport for an example.
+__src_postinst_hook_exec() {
+	if __check_function src_postinst_hook
+	then
+		__check_unstable src_postinst_hook
+	fi
+}
+
 # provides a default src_install
 # will be overridden by cygclasses or cygports as necessary
 src_install() {
@@ -2209,11 +2225,11 @@
 			;;
 		inst*)
 			__stage Installing;
-			(__prepinstalldirs && src_install && __src_postinst) 2>&1 | tee ${installlog};
+			(__prepinstalldirs && src_install && __src_postinst && __src_postinst_hook_exec) 2>&1 | tee ${installlog};
 			_status=$?;
 			;;
 		postinst*)
-			__src_postinst;
+			__src_postinst && __src_postinst_hook_exec;
 			_status=$?;
 			;;
 		list)
@@ -2244,14 +2260,14 @@
 		almostall)
 			__stage Preparing && __src_prep && \
 			__stage Compiling && src_compile 2>&1 | tee ${compilelog} && \
-			__stage Installing && (__prepinstalldirs && src_install && __src_postinst) 2>&1 | tee ${installlog} && \
+			__stage Installing && (__prepinstalldirs && src_install && __src_postinst && __src_postinst_hook_exec) 2>&1 | tee ${installlog} && \
 			__stage Packaging && (__pkg_binpkg && __pkg_pkgcheck && __pkg_srcpkg && __pkg_dist) 2>&1 | tee ${pkglog}
 			_status=$?;
 			;;
 		all)
 			__stage Preparing && __src_prep && \
 			__stage Compiling && src_compile 2>&1 | tee ${compilelog} && \
-			__stage Installing && (__prepinstalldirs && src_install && __src_postinst) 2>&1 | tee ${installlog} && \
+			__stage Installing && (__prepinstalldirs && src_install && __src_postinst && __src_postinst_hook_exec) 2>&1 | tee ${installlog} && \
 			__stage Packaging && (__pkg_binpkg && __pkg_pkgcheck && __pkg_srcpkg && __pkg_dist) 2>&1 | tee ${pkglog} && \
 			__finish;
 			_status=$?;

  reply	other threads:[~2008-09-17 16:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17  1:04 Yaakov (Cygwin Ports)
2008-09-17 13:19 ` Andrew Schulman
2008-09-17 16:47   ` Charles Wilson [this message]
2008-09-17 16:54     ` Andrew Schulman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48D13449.3020208@cwilson.fastmail.fm \
    --to=cygwin@cwilson.fastmail.fm \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).