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.
10 # To build the package, do:
14 cvs -d:pserver:anoncvs@sources.redhat.com:/cvs/cygwin-apps co -d netrel mknetrel
15 wget -P/var/tmp ftp://lilypond.org/pub/LilyPond/v1.9/lilypond-1.9.9.tar.gz
16 mkdir -p /netrel/src && cd /netrel/src
17 rm -rf /netrel/src/lilypond-*
18 tar xzf /var/tmp/lilypond-*
19 mv lilypond-1.9.9 lilypond-1.9.9-1
20 cp lilypond-1.9.9-1/cygwin/mknetrel /netrel/extra/lilypond
21 /netrel/bin/mknetrel -xX lilypond
28 patch=$mknetrel_root/patch
30 # for cross-compiling LilyPond:
32 uploads=$here/uploads/$base && mkdir -p $uploads/
33 tarstem=$uploads/$package
36 # copy and include extra mknetrel stuff
37 extras="doc patch auto cross split"
40 [ -r $extra/$f ] && cp -pv $extra/$f $src/cygwin/$f
54 # for cross-compiling LilyPond, fake a guile-config
58 cat > guile-config <<EOF
59 [ "\$1" == "--version" ] && echo "guile-config - Guile version $GUILE"
60 [ "\$1" == "compile" ] && echo "-I$cygwin_root/usr/include"
61 [ "\$1" == "link" ] && echo "-L$cygwin_root/usr/lib -lguile"
64 chmod 755 guile-config
70 # cross-compiling: configure for build-host
75 if [ "$ABI" = "1.3" ]; then
78 (cd $src && ln -s GNUmakefile.in GNUmakefile)
81 PATH="$HOME/usr/pkg/guile-1.6/bin:$PATH" \
85 $src/configure --prefix=/usr --enable-config=for-build)
90 for i in $sub_packages; do
92 mkdir -p $inst-$i || exit 1
95 # cross-compiling: build for build-host, generate doc
99 PATH=/bin:/usr/bin:$PATH \
100 make conf=for-build all doc web || exit 1
103 cp -pv mf/out-for-build/* mf/out
106 # set LDFLAGS to find the python library
107 # EXTRABUILDARGS="LDFLAGS=$cygwin_root/usr/bin/libpython2.3.dll"
109 addmakeflags LDFLAGS="$cygwin_root/usr/bin/libpython2.3.dll" ' ' "target=i686-pc-cygwin" ' '
112 # EXTRABUILDARGS="$EXTRABUILDARGS all doc web"
113 addmakeflags all ' ' doc ' ' web ' '
119 # set LDFLAGS to find the python library
120 # addmakeflags LDFLAGS="$cygwin_root/usr/bin/libpython2.3.dll" ' ' "target=i686-pc-cygwin"
121 # if ! iscygwin; then
122 # EXTRAINSTALLARGS="target=i686-pc-cygwin"
125 #EXTRAINSTALLARGS="web-install target=i686-pc-cygwin"
126 addmakeflags webdir="$inst-doc/$packagedocdir" ' ' web-install
133 mkdir -p $inst-doc/$docprefix
137 make conf=for-build webdir=$inst-doc/$packagedocdir web-install
143 install -d -m755 $inst/$packagedocdir
145 install -m644 COPYING ChangeLog DEDICATION THANKS VERSION $inst/$packagedocdir
147 # txt files reside elsewhere
148 cd $build/Documentation/topdocs/out
149 install -m644 AUTHORS.txt INSTALL.txt NEWS.txt README.txt $inst/$packagedocdir
154 install -d -m755 $inst/$cygdocdir
155 install -m644 $cygwin/changelog $inst/$cygdocdir/changelog.Cygwin
158 install -m644 $cygwin/out/README $inst/$packagedocdir/README.Cygwin
159 install -m644 $cygwin/out/README $inst/$cygdocdir/$package.README
163 cp -prv input $inst/$packagedocdir
164 cd $inst/$packagedocdir
165 rm -rf $(find -name 'CVS')
167 #cd $inst-doc/$packagedocdir &&
168 #ln -s $(find html/Documentation -name '*.ps.gz') .
170 install -d -m755 $inst-doc/$infodir/lilypond
171 cd $inst-doc/$infodir/lilypond && ln -sf ../../doc/$base-$ver/Documentation/user/out-www/*png .