This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: cygport-0.9.2 in release-2
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
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=$?;