]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/bin/package-zip32.sh
release: 1.1.60
[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 #
42 # Maybe we can get away without reconfiguring
43 #
44 # rm -f ${srcdir}/config.cache
45 # PYTHON=${PYTHON:-python} ${srcdir}/configure --prefix=${distdir} \
46 #     --srcdir=${srcdir}
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 WWW ; then
62     echo "make -C documentation/man WWW failed"
63     exit 1
64 fi
65
66 #
67 # Post install clean up
68 #
69 CYGWIN_LIB=$PACKAGE_ROOTDIR/distfiles/winnt/cygwin1.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 ASH_EXE=$PACKAGE_ROOTDIR/distfiles/winnt/ash.exe
81 if [ ! -e $ASH_EXE ]; then
82     echo "Unable to locate $ASH_EXE"
83     exit 1
84 fi
85
86 #
87 # copy ash into bin
88 #
89 cp $ASH_EXE $distdir/bin
90
91 GUILE_SCM=$PACKAGE_ROOTDIR/distfiles/winnt/ice-9
92 if [ ! -e $GUILE_SCM ]; then
93     echo "Unable to locate $GUILE_SCM"
94     exit 1
95 fi
96
97 #
98 # copy guile init files into share/lilypond
99 #
100 echo "copy $GUILE_SCM to $distdir/share/lilypond"
101 cp -r $GUILE_SCM $distdir/share/lilypond
102
103 #
104 # Rename python files to <filename>.py
105 #
106 mv $distdir/bin/ly2dvi $distdir/bin/ly2dvi.py
107 mv $distdir/bin/convert-mudela $distdir/bin/convert-mudela.py
108 mv $distdir/bin/mudela-book $distdir/bin/mudela-book.py
109
110 #
111 # copy man documentation to doc directory
112 #
113 mkdir $distdir/doc
114 cp Documentation/man/out/*.html $distdir/doc
115
116 #
117 # copy web documentation to web directory
118 #
119 mkdir $distdir/web
120 for i in index.html guile.patch angels.ly
121 do
122   cp Documentation/ntweb/out/$i $distdir/web || exit 1
123 done
124
125 #
126 # Zip it up
127 #
128 cd $distdir/..
129 $ZIP_CMD $ZIP_FILE $name
130 echo "Wrote $ZIP_FILE"
131 rm -rf $name
132 exit 0
133
134