#!/bin/bash

# Do cygwin build

# this creates: joe-3.3-1.tar.bz2 and joe-3.3-1-src.tar.bz2
# you also need setup.hint

JOEVERSION=3.5
CYGVERSION=3.5-1

./autojoe

# Force use of /etc/termcap file because Cygwin's tgoto() is broken

# Install aspell first!

./configure --prefix=/usr --sysconfdir=/usr/share --libexecdir=/usr/sbin \
--localstatedir=/var --datadir=/usr/share --mandir=/usr/share/man \
--infodir=/usr/share/info --disable-curses --disable-termcap

make clean

make

make install

(cd /; tar cf - usr/share/joe usr/bin/joe.exe usr/bin/jmacs.exe usr/bin/jstar.exe \
usr/bin/jpico.exe usr/bin/rjoe.exe `cd /; find usr/share/man -name 'joe.1'`) | bzip2 >joe-$CYGVERSION.tar.bz2

make dist

gunzip <joe-$JOEVERSION.tar.gz | bzip2 >joe-$CYGVERSION-src.tar.bz2
