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

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 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/, simply put your prefix into
CYGWIN_PATCHES/, and let cygport append its trailer and do
the renaming.  For creating /etc/postinstall/, put your entire
file in CYGWIN_PATCHES/, then have your .cygport file do
the following as part of src_install:

dodir /etc/postinstall
cp ${C}/ ${D}/etc/postinstall/

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:


${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   
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


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