2 # cygwin/mknetrel - LilyPond mknetrel overrides
4 # This script should be used to package LilyPond for Cygwin.
5 # It can be used to build LilyPond on Cygwin, but also on GNU/Linux.
7 # See http://lilypond.org/web/devel/packaging.html for more information,
8 # report bugs to bug-lilypond@gnu.org.
11 # Get mknetrel from here:
13 # cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/cygwin-apps co mknetrel
15 # To build the package do:
18 wget -P/var/tmp ftp://lilypond.org/pub/LilyPond/v1.9/lilypond-1.9.8.tar.gz
19 rm -rf /netrel/src/lilypond-*
20 mkdir -p /netrel/src && cd /home/netrel/src
21 tar xzf /var/tmp/lilypond-*
22 mv lilypond-1.9.8 lilypond-1.9.8-1
25 ./bin/mknetrel -xX lilypond
32 patch=$mknetrel_root/patch
34 # for cross-compiling LilyPond:
36 uploads=$here/uploads/$base && mkdir -p $uploads/
37 tarstem=$uploads/$package
40 # copy and include extra mknetrel stuff
41 extras="doc patch auto cross split"
44 [ -r $extra/$f ] && cp -pv $extra/$f $src/cygwin/$f
58 # for cross-compiling LilyPond:
62 cat > guile-config <<EOF
63 [ "\$1" == "--version" ] && echo "guile-config - Guile version $GUILE"
64 [ "\$1" == "compile" ] && echo "-I$cygwin_prefix/include"
65 [ "\$1" == "link" ] && echo "-L$cygwin_prefix/lib -lguile"
68 chmod 755 guile-config
74 # cross-compiling: configure for build-host
79 if [ "$ABI" != "1.5" ]; then
82 (cd $src && ln -s GNUmakefile.in GNUmakefile)
85 PATH="$HOME/usr/pkg/guile-1.6/bin:$PATH" \
89 $src/configure --prefix=/usr --enable-config=for-build)
94 for i in $sub_packages; do
96 mkdir -p $inst-$i || exit 1
99 # cross-compiling: build for build-host, generate doc
103 PATH=/bin:/usr/bin:$PATH \
104 PYTHONPATH=$build/python/out-for-build:$PYTHONPATH \
105 make conf=for-build all doc web || exit 1
107 # as of 1.9.9, this should no longer be necessary:
108 for i in $(find . -path ".*out-for-build/*.1"); do
109 o=$(dirname $(dirname $i))/out
111 cp -pv $i $o/$(basename $i)
115 cp -pv mf/out-for-build/* mf/out
118 addmakeflags MAKE_PFA_FILES=1 ' ' LDFLAGS="$cygwin_prefix/bin/libpython2.3.dll" ' ' 'target=i686-pc-cygwin'
123 # cross-compiling: fix manual pages
125 # as of 1.9.9, this should no longer be necessary:
127 cp -v scripts/out-for-build/midi2ly.1 scripts/out
128 cp -v lily/out-for-build/lilypond.1 lily/out
131 addmakeflags MAKE_PFA_FILES=1 ' ' LDFLAGS="$cygwin_prefix/bin/libpython2.3.dll" ' ' 'target=i686-pc-cygwin'
137 mkdir -p $inst-doc/$docprefix
140 make conf=for-build webdir=$inst-doc/$packagedocdir web-install
145 install -d -m755 $inst/$packagedocdir
148 find . -maxdepth 1 -type f -exec cp -pv \{\} $inst/$packagedocdir \;
153 install -d -m755 $inst/$cygdocdir
154 install -m644 $cygwin/changelog $inst/$cygdocdir/changelog.Cygwin
157 install -m644 $cygwin/out/README $inst/$packagedocdir/README.Cygwin
158 install -m644 $cygwin/out/README $inst/$cygdocdir/$package.README
162 cp -prv input $inst/$packagedocdir
164 cd $inst-doc/$packagedocdir &&
165 ln -s $(find html/Documentation -name '*.ps.gz') .