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=$?;