we need a port to CYGWIN!
	also, look at http://www.commalg.org/m2win.shtml
	  it includes emacs
	  make M2 compatible with the emacs there, which uses _emacs instead
	   of .emacs as the name of its init file

we have to get rid of util/overlay.h if we are to do a cross-compile

=============================================================================

porting machines:

	Linux octopus.math.cornell.edu 2.6.9-34.ELlargesmp #1 SMP Fri Feb 24 17:06:55 EST 2006 x86_64 x86_64 x86_64 GNU/Linux
	CYGWIN_NT-5.0 niobium 1.5.20(0.156/4/2) 2006-07-01 02:22 i686 Cygwin
	SunOS u24.math.uiuc.edu 5.8 Generic_117350-34 sun4u sparc
	Linux u123.math.uiuc.edu 2.4.22-1.2199.4.legacy.nptl #1 Sun Feb 20 18:21:21 EST 2005 i686 i686 i386 GNU/Linux
-----------------------------------------------------------------------------
systems to port to:

	debian
	suse
	cygwin
	freebsd

-----------------------------------------------------------------------------

Here is some information on packaging M2 as a deb file:

http://www.debian.org/doc/devel-manuals#maint-guide

-----------------------------------------------------------------------------

http://www.debian.org/doc/manuals/distribute-deb/distribute-deb.html

says this good way to do it:

    Converting a package from another format to DEB

    If you want to package a product you've already packaged in another format,
    that might ease your task, especially if the package is simple.

    There's a program called alien which can convert packages between different
    formats; as of this writing it supports Redhat RPM, Debian DEB, Stampede SLP,
    Slackware TGZ and Solaris PKG. You can use it to convert your package to DEB,
    but probably you'll have to do some editing by hand until it works correctly.

    Of course, using alien on a well-working package in another format is no excuse
    not to test the Debian package you generated and not to read the appropriate
    documentation; alien is and will always be experimental software.

    Alien was originally written for Debian and is available as Debian package, but
    it was ported to other platforms too.

-----------------------------------------------------------------------------
Date: Tue, 03 Oct 2006 12:44:35 -0500
From: Matt Proud <matt@ima.umn.edu>
Reply-To: sys@ima.umn.edu
To: mike@math.cornell.edu, dan@math.uiuc.edu
Subject: Macaulay2 Debianization

Hello,

I will forward more details to you when I have them---along with
instructions and explanation---when I have some time.

The debianization is available
http://www.ima.umn.edu/~matt/macaulay2-debianization.tar.bz2 I would
e-mail it, but it is quite large.

=============================================================================

Here's how to make a debian package from our tar file:

    tar xzf Macaulay2-0.9.91-i686-Linux.tgz
    mv Macaulay2-0.9.91 usr
    fakeroot chown -R root usr
    tar cfz Macaulay2-0.9.91-i686-Linux-usr.tgz usr
    fakeroot alien --to-deb Macaulay2-0.9.91-i686-Linux-usr.tgz 

Here's how to fix the deb file so it doesn't have *.gz files inside it:

    mkdir contents
    cd contents
    ar x ../macaulay2-0.9.91_i686-Linux-usr-2_all.deb
    tar xzfp data.tar.gz
    find usr -name \*.gz | xargs gunzip
    tar czf data.tar.gz usr
    ar r ../macaulay2-0.9.91_i686-Linux-usr-2_all.deb debian-binary control.tar.gz data.tar.gz

Here's how to upload it to the M2 download site:

    scp macaulay2-0.9.91_i686-Linux-usr-2_all.deb ssh.math.uiuc.edu:~/local/to/Macaulay2/Downloads/

Here's how to install it, as root:

    dpkg -i macaulay2-0.9.91_i686-Linux-usr-2_all.deb

Here's how to remove it:

    dpkg -r macaulay2-0.9.91

Here's how to get rid of the cached data file that dpkg refuses to remove.
Where should we put it?

    rm -rf /usr/lib/Macaulay2

See also

    deb-control

for the contents of the control file.  The one alien makes is:

    Package: macaulay2-0.9.91
    Version: i686-Linux-usr-2
    Section: alien
    Priority: extra
    Architecture: all
    Depends: libc6 (>= 2.3.4-1), libgcc1 (>= 1:4.0.2)
    Installed-Size: 45652
    Maintainer: root <root@ytterbium.math.uiuc.edu>
    Description: Converted Slackware tgz package
     Converted Slackware tgz package
     .
     (Converted from a tgz package by alien version 8.64.)
