From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17923 invoked by alias); 18 Jul 2007 12:14:00 -0000 Received: (qmail 17911 invoked by uid 22791); 18 Jul 2007 12:13:59 -0000 X-Spam-Check-By: sourceware.org Received: from alnrmhc15.comcast.net (HELO alnrmhc15.comcast.net) (206.18.177.55) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 18 Jul 2007 12:13:57 +0000 Received: from [192.168.0.103] (c-67-166-125-73.hsd1.co.comcast.net[67.166.125.73]) by comcast.net (alnrmhc15) with ESMTP id <20070718121355b15003ontse>; Wed, 18 Jul 2007 12:13:55 +0000 Message-ID: <469E0433.9070401@byu.net> Date: Wed, 18 Jul 2007 12:14:00 -0000 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070604 Thunderbird/2.0.0.4 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin-apps@cygwin.com Subject: Re: Emacs is coming back - 2nd try References: <469BC6D1.2030608@zone42.org> <469CB976.4070404@byu.net> <469D3145.1040309@zone42.org> <469D6387.5040301@byu.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2007-07/txt/msg00105.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Steffen Sledz on 7/18/2007 12:13 AM: > On Tue, 17 Jul 2007, Eric Blake wrote: >>> Another newbie question at this point: What's the right way to create >>> the postinstall script? Currently there is one generated by cygport >>> containing the install-info stuff. >> Simply create a file named postinstall.sh inside the CYGWIN-PATCHES >> directory, alongside the readme files. Cygport will automatically append >> its postinstall stuff after the contents of your file. > > What's the right naming here? I need two of them, one for emacs and one > for emacs-X11. Hmm, you're right - cygport is currently hardcoded to only outputting postinstall information for the primary ${PN}, regardless of how many additional packages get created during the process. This seems like a cygport limitation - maybe Yaakov has some more insight? But I think you are still okay - you only need the cygport postinstall additions appended in the primary emacs package, for two reasons - the cygport additions only install info files, which are already limited to the primary emacs package; and the emacs-X11 package depends on emacs, so that part of the postinstall will get run regardless of which of the two packages the user selected. So I think the answer is as follows - for creating /etc/postinstall/emacs.sh, simply put your prefix into CYGWIN_PATCHES/postinstall.sh, and let cygport append its trailer and do the renaming. For creating /etc/postinstall/emacs-X11.sh, put your entire file in CYGWIN_PATCHES/emacs-X11-post.sh, then have your .cygport file do the following as part of src_install: dodir /etc/postinstall cp ${C}/emacs-X11-post.sh ${D}/etc/postinstall/emacs-X11.sh Oh, and don't forget the corresponding preremoves. Again, using /etc/preremove/automake.sh as a guide, you will need something similar to this for your two preremoves: prefix=/usr bindir=${prefix}/bin sbindir=${prefix}/sbin ${sbindir}/update-alternatives --remove emacs ${bindir}/emacs-nox.exe Again, cygport makes the emacs preremove easy, but you will have to do the same trick as for the postinstall to get the emacs-X11 preremove installed. - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGngQz84KuGfSFAYARAvHPAKCdLFLfN48+5cmxRTrkxw6xEqDX0QCdHTyA 3FI/FzrKOp9gfbAtcvA+cQA= =1MpX -----END PGP SIGNATURE-----