This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Emacs is coming back - 2nd try


-----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<n>.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-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]