]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/bin/package-zip32.sh
patch::: 1.0.8.jcn3: png
[lilypond.git] / stepmake / bin / package-zip32.sh
1 #!/bin/sh
2 # package-zip32.sh --- make a windoze formated distribution
3
4 set -x
5
6 if [ $# -lt 1 ]; then
7         echo "Usage: $0 PACKAGE_SOURCEDIR"
8         exit 2
9 fi
10
11 srcdir=$1
12 shift
13
14 . $srcdir/VERSION
15
16 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
17 if [ "x$MY_PATCH_LEVEL" != "x" ]; then
18     VERSION=$VERSION.$MY_PATCH_LEVEL
19 fi
20
21 package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
22 name=$package-$VERSION
23 ZIP_CMD="zip -r -9"
24
25 here=`pwd`
26 cd $srcdir/.. 
27 PACKAGE_ROOTDIR=`pwd` 
28 export PACKAGE_ROOTDIR 
29 cd $here
30
31 RELEASE_DIR="$PACKAGE_ROOTDIR/bin.releases/winnt"
32 ZIP_FILE="$RELEASE_DIR/$name.bin.zip"
33
34
35 if [ ! -e $RELEASE_DIR ]; then
36     mkdir -p $RELEASE_DIR
37 fi
38
39 distdir=/tmp/${name}
40
41 rm -f ${srcdir}/config.cache
42 ${srcdir}/configure --prefix=${distdir} \
43     --srcdir=${srcdir} \
44     --enable-tex-prefix=${distdir}/texmf \
45     --enable-tex-dir=${distdir}/texmf/tex \
46     --enable-mf-dir=${distdir}/texmf/mf
47
48 if ! make ; then
49     echo "make failed"
50     exit 1
51 fi
52
53 # failure allowed
54 make -C Documentation info
55
56 if ! make install ; then
57     echo "make install failed"
58     exit 1
59 fi
60
61 if ! make -C Documentation/man doc ; then
62     echo "make -C documentation/man doc failed"
63     exit 1
64 fi
65
66 #
67 # Post install clean up
68 #
69 CYGWIN_LIB=$PACKAGE_ROOTDIR/distfiles/winnt/cygwinb19.dll
70 if [ ! -e $CYGWIN_LIB ]; then
71     echo "Unable to locate $CYGWIN_LIB"
72     exit 1
73 fi
74
75 #
76 # copy cygwin lib into bin
77 #
78 cp $CYGWIN_LIB $distdir/bin
79
80 #
81 # Rename ly2dvi32 to ly2dvi.py
82 #
83 mv $distdir/bin/ly2dvi32 $distdir/bin/ly2dvi.py
84
85 #
86 # copy man documentation to doc directory
87 #
88 mkdir $distdir/doc
89 cp Documentation/man/out/*.txt $distdir/doc
90 mv $distdir/doc/ly2dvi32.txt $distdir/doc/ly2dvi_py.txt
91 cd $distdir/..
92 $ZIP_CMD $ZIP_FILE $name
93 echo "Wrote $ZIP_FILE"
94 rm -rf $name
95 exit 0
96
97