]> git.donarmstrong.com Git - lilypond.git/blobdiff - cygwin/mknetrel
* cygwin/changelog:
[lilypond.git] / cygwin / mknetrel
index 2f4ba12b66bd5ad23dd5405164167446fe649ae6..36255076cd80051577fa4790e8a8d1dc6904aeec 100644 (file)
@@ -1,18 +1,18 @@
 # -*- shell-script -*-
 
-# stable LilyPond releases: lilypond-1.4
-# archive=ftp://lilypond.org/pub/LilyPond/v1.4
+# stable LilyPond releases: lilypond-1.6
+# archive=ftp://lilypond.org/pub/LilyPond/v1.6
 
-# LilyPond development: lilypond-1.5
-# archive=ftp://lilypond.org/pub/LilyPond/v1.5
+# LilyPond development: lilypond-1.7
+# archive=ftp://lilypond.org/pub/LilyPond/v1.7
 
-# Guile specific mknetrel overrides
+# LilyPond mknetrel overrides
 # To use this, do something like:
 cat >/dev/null <<EOC
 
-   wget -P/var/tmp ftp://lilypond.org/pub/LilyPond/v1.5/lilypond-1.5.68.tar.gz
-   rm -rf /home/mknetrel/netrel/src/lilypond-*
-   mkdir -p /home/mknetrel/netrel/src && cd /home/mknetrel/netrel/src
+   wget -P/var/tmp ftp://lilypond.org/pub/LilyPond/v1.7/lilypond-1.7.29.tar.gz
+   rm -rf /home/netrel/src/lilypond-*
+   mkdir -p /home/netrel/src && cd /home/netrel/src
    ## TODO: look at pimport
    tar xzf /var/tmp/lilypond-*
    mv lilypond-* $(echo lilypond-*)-1
@@ -21,14 +21,19 @@ cat >/dev/null <<EOC
 
 EOC
 
-
-BUILD=1
 # sover=14
 
 patch=$mknetrel_root/patch
-iscygwin || (uploads=$here/uploads/$base && mkdir -p $uploads)
+if iscygwin; then
+    true
+else    
+    uploads=$here/uploads/$base && mkdir -p $uploads
+    [ "$ABI" = "1.5" ] && uploads=$here/uploads-development/$base && mkdir -p $uploads
+    tarstem=$uploads/$package
+fi
 
 sub_packages="doc"
+old_path=$PATH
 
 
 
@@ -44,6 +49,8 @@ sub_packages="doc"
 # Patching and configuring
 #
 
+presplit () { true; }
+
 # Maybe add to mknetrel or pimport.
 dopatchsrc () {
     cd $src
@@ -137,6 +144,8 @@ doc_name () {
 lib_split () {
     mkdir -p ./$prefix/bin || exit 1
     mv $inst/$prefix/bin/*.dll ./$prefix/bin
+    mkdir -p ./$prefix/lib || exit 1
+    mv $inst/$prefix/lib/*.la ./$prefix/lib
     mkdir -p ./$prefix/share || exit 1
     mv $inst/$prefix/share/$base ./$prefix/share
     true
@@ -144,11 +153,9 @@ lib_split () {
    
 devel_split () {
     mkdir -p ./$prefix/bin || exit 1
-    mv $inst/$prefix/bin/guile-* ./$prefix/bin
     mv $inst/$prefix/include ./$prefix/include
     mkdir -p ./$prefix/lib || exit 1
     mv $inst/$prefix/lib/*.a ./$prefix/lib
-    mv $inst/$prefix/lib/*.la ./$prefix/lib
     mkdir -p ./$prefix/share || exit 1
     mv $inst/$prefix/share/aclocal ./$prefix/share
     true
@@ -160,6 +167,13 @@ doc_split () {
     true
 }
 
+prebuild () {
+    for i in $sub_packages; do
+       rm -rf $inst-$i
+       mkdir -p $inst-$i || exit 1
+    done
+}
+    
 domkdist() {
     #
     # Fix up installation slightly
@@ -185,9 +199,7 @@ domkdist() {
 
     for i in $sub_packages; do
        subname=$(${i}_name)
-        rm -rf $inst-$i
-       mkdir -p $inst-$i || exit 1
-       cd $inst-$i
+       cd $inst-$i || exit 1
        ${i}_split || exit 1
     done
     
@@ -235,8 +247,7 @@ needdevoflags () {
     return 1
 }
 
-# do I have a broken setup, do the Guile developers not know how to
-# write configure.in and Makefile.am, or are automake/libtool broken?
+
 preconfig () { # aka libtool_woes ()
 
     # Add to mknetrel?
@@ -246,31 +257,37 @@ preconfig () { # aka libtool_woes ()
 
     cd $build || exit 1
 
-    GUILE=1.5.6
+    GUILE=1.6.0
     cat > guile-config <<EOF
-#/bin/sh
+#!/bin/sh
 [ "\$1" == "--version" ] && echo "guile-config - Guile version $GUILE"
-[ "\$1" == "compile" ] && echo "-I$PREFIX/include"
-[ "\$1" == "link" ] && echo "-L$PREFIX/lib -lguile"
+[ "\$1" == "compile" ] && echo "-I$cygwin_prefix/include"
+[ "\$1" == "link" ] && echo "-L$cygwin_prefix/lib -lguile"
 exit 0
 EOF
 
     chmod 755 guile-config
-    old_path=$PATH
     PATH=$(pwd):$PATH
-    
-    LDFLAGS="$PREFIX/bin/libpython2.2.dll"
+
+    ##opt='-O2 -g' LDFLAGS='"$cygwin_prefix/bin/libpython2.2.dll"
+    rm -f config.cache  
 }
 
 postconfig () {
     # Configure for build, for generating doc
     rm -f config.cache
     (PATH="$old_path" \
+       PATH="$HOME/usr/pkg/guile-1.6.0/bin:$PATH" \
        CFLAGS="-O2 -g" \
        $src/configure --prefix=/usr --enable-config=for-build)
 }
 
 prebuild () {
+    for i in $sub_packages; do
+       rm -rf $inst-$i
+       mkdir -p $inst-$i || exit 1
+    done
+    
     # Build for build, generating doc
     cd $build || exit 1
     
@@ -278,49 +295,69 @@ prebuild () {
     cd $src && ln -s GNUmakefile.in GNUmakefile
 
     cd $build || exit 1
-    PATH=/bin:/usr/bin:$PATH make conf=for-build all doc html-doc
+    #PATH=/bin:/usr/bin:$PATH make conf=for-build all doc html-doc || exit 1
+    PATH=/bin:/usr/bin:$PATH make conf=for-build all doc web || exit 1
     for i in $(find . -path "out-for-build/*.1"); do
        cp -pv $i $(dirname $(dirname $i))/$(basename $i)
     done
+
+    mkdir -p mf/out
+    cp -pv mf/out-for-build/* mf/out
+    
+    addmakeflags MAKE_PFA_FILES=1 ' ' LDFLAGS="$cygwin_prefix/bin/libpython2.2.dll" ' ' 'target=i686-pc-cygwin'
+}
+
+preinstall () {
+    cd $build || exit 1
+    cp -v scripts/out-for-build/midi2ly.1 scripts/out
+    cp -v lily/out-for-build/lilypond.1 lily/out
+    
+    addmakeflags MAKE_PFA_FILES=1 ' ' LDFLAGS="$cygwin_prefix/bin/libpython2.2.dll" ' ' 'target=i686-pc-cygwin'
 }
 
 postinstall () {
     mkdir -p $inst-doc/$prefix
-    cd $src || exit 1
-    make conf=for-build prefix=$inst-doc/$prefix install-html-doc
+    cd $build || exit 1
+    docdir=$prefix/share/doc/$base-$ver
+    
+    #make conf=for-build docdir=$inst-doc/$docdir install-html-doc
+    make conf=for-build docdir=$inst-doc/$docdir web-install
 
 
     ## copy READMEs etc
 
     cd $src || exit 1
-    docdir=$prefix/share/doc/$name-$version
-    
-    mkdir -p $inst/$docdir
+    install -d -m755 $inst/$docdir
 
     ## Generic READMEs
     find . -maxdepth 1 -type f -exec cp -pv \{\} $inst/$docdir \;
 
-    ## Windows readmes
-    cd Documentation/windows || exit 1
-    cp -p README $inst/$docdir/README.Cygwin
-    cp -p changelog $inst/$docdir/changelog.Cygwin
-    mkdir -p $inst/$prefix/doc/Cygwin
-    cp -p README $inst/$prefix/doc/Cygwin/$cygpack.README
+    ## Cygwin readmes
+    cygwin=cygwin
+    cd $src || exit 1
+    #install -m644 $cygwin/README $inst/$docdir/README.Cygwin
+    install -m644 $cygwin/changelog $inst/$docdir/changelog.Cygwin
+    install -d -m755 $inst/$prefix/doc/Cygwin
+    #install -m644 $cygwin/README $inst/$prefix/doc/Cygwin/$package.README
+
+    cd $build || exit 1
+    install -m644 $cygwin/out/README $inst/$docdir/README.Cygwin
+    install -m644 $cygwin/out/README $inst/$prefix/doc/Cygwin/$package.README
 
     ## copy examples
     cd $src || exit 1
     cp -prv input $inst/$docdir
 
-    cd $inst-doc/$prefix/share/doc/$name-$version &&
+    cd $inst-doc/$prefix/share/doc/$base-$ver &&
     ln -s $(find html/Documentation -name '*.ps.gz') .
 
     ## Cygwin doesn't adhere to FHS (and why should they?)
-    cd $inst/$prefix && mv share/doc .
-    cd $inst-doc/$prefix && mv share/doc .
+    cd $inst/$prefix/share && tar cf - doc | (cd ..; tar xf -) && rm -rf doc
+    cd $inst-doc/$prefix/share && tar cf - doc | (cd ..; tar xf -) && rm -rf doc
 }
 
 #presplit () {
-#    docdir=$prefix/share/doc/$name-$version
+#    docdir=$prefix/share/doc/$base-$ver
 #    mkdir -p $inst-doc/$docdir || exit 1
 #}