CVSROOT:        /cvsroot/lilypond
Module name:    installers
Branch:         
Changes by:     Jan Nieuwenhuizen <[EMAIL PROTECTED]>   05/10/20 19:37:55

Modified files:
        linux/autopackage/specs/pango: default.apspec.in 
        linux/autopackage/specs/lilypond: default.apspec.in GNUmakefile 
        linux/autopackage/specs/libtool: default.apspec.in 
        linux/autopackage/specs/libpng: default.apspec.in 
        linux/autopackage/specs/guile: default.apspec.in 
        linux/autopackage/specs/gmp: default.apspec.in 
        linux/autopackage/specs/glib: default.apspec.in 
        linux/autopackage/specs/ghostscript: default.apspec.in 
        linux/autopackage: GNUmakefile ChangeLog 

Log message:
        Configure for /opt/autopackage
        prefix.  Add hack to redirect installation from /usr to
        /opt/autopackage.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/pango/default.apspec.in.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/lilypond/default.apspec.in.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/lilypond/GNUmakefile.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/libtool/default.apspec.in.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/libpng/default.apspec.in.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/guile/default.apspec.in.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/gmp/default.apspec.in.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/glib/default.apspec.in.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/specs/ghostscript/default.apspec.in.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/GNUmakefile.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/installers/linux/autopackage/ChangeLog.diff?tr1=1.25&tr2=1.26&r1=text&r2=text

Patches:
Index: installers/linux/autopackage/ChangeLog
diff -u installers/linux/autopackage/ChangeLog:1.25 
installers/linux/autopackage/ChangeLog:1.26
--- installers/linux/autopackage/ChangeLog:1.25 Thu Oct  6 09:08:09 2005
+++ installers/linux/autopackage/ChangeLog      Thu Oct 20 19:37:55 2005
@@ -1,3 +1,9 @@
+2005-10-20  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
+
+       * specs/*/default.apspec.in: Configure for /opt/autopackage
+       prefix.  Add hack to redirect installation from /usr to
+       /opt/autopackage.
+
 2005-10-05  Jan Nieuwenhuizen  <[EMAIL PROTECTED]>
 
        * GNUmakefile ($(ghostscript-build)): 
Index: installers/linux/autopackage/GNUmakefile
diff -u installers/linux/autopackage/GNUmakefile:1.25 
installers/linux/autopackage/GNUmakefile:1.26
--- installers/linux/autopackage/GNUmakefile:1.25       Thu Oct  6 09:08:09 2005
+++ installers/linux/autopackage/GNUmakefile    Thu Oct 20 19:37:55 2005
@@ -3,11 +3,15 @@
 ARCH = x86
 ASSUME_OLD = touch -d '1970-1-1 01:00:00'
 
+# apgcc CVS Thu Oct 20 2005 does not work with libtool.
+#TRY_APGCC = 1
+#export TRY_APGCC
+
 # 1.0.3 has a regression leading to 1.0.4; with sudo installs unasked in
 #       /usr, clobbering system packages.
 # 1.0.4 is broken: it does not make sealed packages -- only if 1.0.2 leftovers
 #       are installed.  Be sure to remove all traces of previous installs.
-autopackage-version = 1.0.6
+autopackage-version = 1.0.7
 
 autopackage-gtk-support = 
downloads/autopackage-gtk-$(autopackage-version).$(ARCH).package
 
@@ -32,6 +36,7 @@
 LD_LIBRARY_PATH := $(target-root)/lib:$(LD_LIBRARY_PATH)
 PKG_CONFIG_PATH := $(target-root)/lib/pkgconfig:$(PKG_CONFIG_PATH)
 GUILE_LOAD_PATH := $(target-root)/share/guile/1.6:$(GUILE_LOAD_PATH)
+C_INCLUDE_PATH := $(target-root)/include
 export PATH
 export LD_LIBRARY_PATH
 export PKG_CONFIG_PATH
@@ -60,24 +65,26 @@
 iv = $(i)-$($(i)-version)
 packagesv = $(foreach i, $(packages), $(iv))
 
-.PHONY: all clean nsis-root real-clean target-root upset $(packages)
+.PHONY: all clean nsis-root realclean target-root upset $(packages)
 .PRECIOUS: $(packages:%=specs/%/default.apspec.in)
 .PRECIOUS: $(packagesv:%=specs/%/default.apspec.in)
+
 # FIXME: gratuitous rebuilds, missing dependencies?
 #.PRECIOUS: $(packagesv:%=$(src-dir)/%/.stamp)
 #.PRECIOUS: $(packagesv:%=$(src-dir)/%/autopackage/default.apspec)
 #.PRECIOUS: $(packagesv:%=$(target-root)/etc/autopackage/%.stamp)
-.PRECIOUS: $(packagesv:%=$(upload-dir)/%.$(ARCH).package)
+#.PRECIOUS: $(packagesv:%=$(target-root)/.stamp)
+#.PRECIOUS: $(packagesv:%=$(upload-dir)/%.$(ARCH).package)
 
 default: all
 
 all: lilypond lilypond-upgrade clean-target
 
 clean:
-       rm -rf $(target-root)/etc/autopackage $(src-dir)/*/autopackage 
$(upload-dir)/*package
+       rm -rf $(target-root)/etc/autopackage $(src-dir)/*/autopackage 
$(src-dir)/*/config.cache $(upload-dir)/*package
 
 clean-target:
-       $(target-root)/bin/package remove lilypond guile gmp pango glib libtool 
ghostscript libpng
+       $(target-root)/bin/package remove guile gmp pango glib libtool 
ghostscript libpng
        rm -rf $(target-root)/etc/autopackage
 
 .setup-stamp:
@@ -93,7 +100,8 @@
        find $(target-root)/include -exec $(ASSUME_OLD) '{}' ';'
        touch $@
 
-$(src-dir)/%/.stamp: $(target-root)/.stamp $(download-dir)/%.tar.gz
+#$(src-dir)/%/.stamp: $(target-root)/.stamp $(download-dir)/%.tar.gz
+$(src-dir)/%/.stamp: $(download-dir)/%.tar.gz
        name=$(shell basename $(shell dirname $@));\
        ball=$(download-dir)/$$name.tar.gz;\
        tar -C $(src-dir) -zxf $$ball
@@ -111,7 +119,7 @@
        cp -pv $(autopackage-gtk-support) $(dir $@)/packages
        $(foreach i, $($(shell echo $@ | sed -e '[EMAIL PROTECTED]/@@' -e 
's/-.*//')-dependencies), cp $(upload-dir)/$(i)-$($(i)-version).$(ARCH).package 
$(dir $@)/packages &&) true
        [ -n "$($(shell echo $@ | sed -e '[EMAIL PROTECTED]/@@' -e 
's/-.*//')-dependencies)" ] || rm -rf $(dir $@)/packages
-       test -e $(shell dirname $(shell dirname $@))/config.status || (cd 
$(shell dirname $(shell dirname $@)) && ./configure)
+       test -e $(shell dirname $(shell dirname $@))/config.status || (cd 
$(shell dirname $(shell dirname $@)) && ./configure --prefix=$(PREFIX))
 
 dirdir = $(dir $(patsubst %/, %, $(dir $1)))
 $(upload-dir)/%.$(ARCH).package: src/%/autopackage/default.apspec
Index: installers/linux/autopackage/specs/ghostscript/default.apspec.in
diff -u installers/linux/autopackage/specs/ghostscript/default.apspec.in:1.11 
installers/linux/autopackage/specs/ghostscript/default.apspec.in:1.12
--- installers/linux/autopackage/specs/ghostscript/default.apspec.in:1.11       
Thu Oct  6 09:08:09 2005
+++ installers/linux/autopackage/specs/ghostscript/default.apspec.in    Thu Oct 
20 19:37:55 2005
@@ -27,6 +27,8 @@
 #export programs
 
 [BuildPrepare]
+export PREFIX=/opt/autopackage
+
 if [[ "$APKG_BUILD_SKIP_CONFIGURE" != "1" ]]; then
 
 sed -i~ \
@@ -38,7 +40,18 @@
     Makefile.in
 fi
 
-prepareBuild --without-x
+if [[ -n "$TRY_APGCC" ]]; then
+
+prepareBuild --prefix=$PREFIX --without-x
+
+else
+
+./configure --prefix=$PREFIX --without-x
+make install prefix=$build_root/$PREFIX
+
+fi
+
+mv $build_root/$PREFIX/* $build_root
 
 mkdirs $build_root/bin
 cp -pv bin/gs $build_root/bin/gs-nox
@@ -70,6 +83,7 @@
 #require jpeg, zlib
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
 installExe bin/*
 installData share/ghostscript
 
Index: installers/linux/autopackage/specs/glib/default.apspec.in
diff -u installers/linux/autopackage/specs/glib/default.apspec.in:1.6 
installers/linux/autopackage/specs/glib/default.apspec.in:1.7
--- installers/linux/autopackage/specs/glib/default.apspec.in:1.6       Wed Sep 
 7 21:41:05 2005
+++ installers/linux/autopackage/specs/glib/default.apspec.in   Thu Oct 20 
19:37:55 2005
@@ -1,3 +1,5 @@
+# -*-shell-script-*-
+
 [Meta]
 RootName: @gtk.org/glib:$SOFTWAREVERSION
 SoftwareVersion: @GLIB_VERSION@
@@ -16,10 +18,19 @@
 C library used by projects such as GTK+, GIMP, and GNOME.
 
 [BuildPrepare]
+export PREFIX=/opt/autopackage
+
+if [[ -n "$TRY_APGCC" ]]; then
+
 ## apgcc cannot link with libtool
-## prepareBuild --disable-static --enable-shared
+prepareBuild --prefix=$PREFIX --disable-static --enable-shared
+
+else
+
+if [[ "$APKG_BUILD_SKIP_CONFIGURE" != "1" ]]; then
+   ./configure --prefix=$PREFIX --disable-static --enable-shared
+fi
 
-./configure --disable-static --enable-shared
 if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
     # apgcc cannot link modules, but is potentially better for and old glibc
     make CC=apgcc CCLD=apgcc || :
@@ -27,10 +38,13 @@
     make CC=gcc CCLD=gcc || exit 1
 fi
 
+fi
+
 #libtool: install: error: cannot install `libpangoft2-1.0.la' to a directory 
not ending in /usr/local/lib
 #make install DESTDIR=$build_root prefix= || exit 1
 make install DESTDIR=$build_root || exit 1
 mv $build_root/usr/local/* $build_root
+mv $build_root/$PREFIX/* $build_root
 rm -rf $build_root/usr
 rm -rf $build_root/man
 rm -rf $build_root/share
@@ -56,6 +70,7 @@
 require @gnu.org/libtool 3
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
  [ -d etc ] && copyFiles etc/* "$PREFIX/etc"
  [ -d bin ] && installExe bin/*
  [ -d lib ] && installLib lib/*.so.*.*.*
@@ -68,7 +83,7 @@
  [ -d lib/glib ] && copyFiles lib/glib/* "$PREFIX/lib/glib"
  [ -d lib/glib-2.0 ] && copyFiles lib/glib-2.0/* "$PREFIX/lib/glib-2.0"
  [ -d lib/pkgconfig ] && for i in lib/pkgconfig/*; do
-     safeSed "$i" "s@/usr/[EMAIL PROTECTED]@g"
+     safeSed "$i" "s@/opt/[EMAIL PROTECTED]@g"
  done
  [ -d lib/pkgconfig ] && copyFiles lib/pkgconfig/* "$PREFIX/lib/pkgconfig"
  
Index: installers/linux/autopackage/specs/gmp/default.apspec.in
diff -u installers/linux/autopackage/specs/gmp/default.apspec.in:1.1 
installers/linux/autopackage/specs/gmp/default.apspec.in:1.2
--- installers/linux/autopackage/specs/gmp/default.apspec.in:1.1        Wed Sep 
 7 21:41:05 2005
+++ installers/linux/autopackage/specs/gmp/default.apspec.in    Thu Oct 20 
19:37:55 2005
@@ -1,3 +1,5 @@
+# -*-shell-script-*-
+
 [Meta]
 RootName: @gnu.org/libtool:$SOFTWAREVERSION
 SoftwareVersion: @VERSION@
@@ -15,11 +17,22 @@
 arithmetic (ie, a bignum package).  It can operate on signed
 integer, rational, and floating point numeric types.
 
+#'
+
 [BuildPrepare]
+export PREFIX=/opt/autopackage
+
+if [[ -n "$TRY_APGCC" ]]; then
+
 ## apgcc cannot link with libtool
-## prepareBuild --disable-static --enable-shared
+prepareBuild --prefix=$PREFIX --disable-static --enable-shared
+
+else
+
+if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
+   ./configure --prefix=$PREFIX --disable-static --enable-shared
+fi
 
-./configure --disable-static --enable-shared
 if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
     # apgcc cannot link modules, but is potentially better for and old glibc
     make CC=apgcc CCLD=apgcc || :
@@ -27,10 +40,13 @@
     make CC=gcc CCLD=gcc || exit 1
 fi
 
+fi
+
 #libtool: install: error: cannot install `libpangoft2-1.0.la' to a directory 
not ending in /usr/local/lib
 #make install DESTDIR=$build_root prefix= || exit 1
 make install DESTDIR=$build_root || exit 1
 mv $build_root/usr/local/* $build_root
+mv $build_root/$PREFIX/* $build_root
 rm -rf $build_root/usr
 rm -rf $build_root/man
 rm -rf $build_root/share
@@ -53,6 +69,7 @@
 require @gnu.org/libtool 3
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
  [ -d etc ] && copyFiles etc/* "$PREFIX/etc"
  [ -d bin ] && installExe bin/*
  [ -d lib ] && installLib lib/*.so.*.*.*
@@ -65,7 +82,7 @@
  [ -d lib/glib ] && copyFiles lib/glib/* "$PREFIX/lib/glib"
  [ -d lib/glib-2.0 ] && copyFiles lib/glib-2.0/* "$PREFIX/lib/glib-2.0"
  [ -d lib/pkgconfig ] && for i in lib/pkgconfig/*; do
-     safeSed "$i" "s@/usr/[EMAIL PROTECTED]@g"
+     safeSed "$i" "s@/opt/[EMAIL PROTECTED]@g"
  done
  [ -d lib/pkgconfig ] && copyFiles lib/pkgconfig/* "$PREFIX/lib/pkgconfig"
  
Index: installers/linux/autopackage/specs/guile/default.apspec.in
diff -u installers/linux/autopackage/specs/guile/default.apspec.in:1.5 
installers/linux/autopackage/specs/guile/default.apspec.in:1.6
--- installers/linux/autopackage/specs/guile/default.apspec.in:1.5      Wed Sep 
 7 21:41:05 2005
+++ installers/linux/autopackage/specs/guile/default.apspec.in  Thu Oct 20 
19:37:55 2005
@@ -1,3 +1,5 @@
+# -*-shell-script-*-
+
 [Meta]
 RootName: @gnu.org/guile:$SOFTWAREVERSION
 SoftwareVersion: @[EMAIL PROTECTED]
@@ -24,33 +26,35 @@
 other applications via libguile.
 
 [BuildPrepare]
-if false; then
-##prepareBuild --disable-static --enable-shared --without-threads 
--enable-relocation
-prepareBuild --disable-static --enable-shared --enable-relocation 
--with-threads
+export PREFIX=/opt/autopackage
+
+if [[ -n "$TRY_APGCC" ]]; then
+
+prepareBuild --prefix=$PREFIX --disable-static --enable-shared 
--enable-relocation --with-threads
+
 else
+
 if [[ "$APKG_BUILD_SKIP_CONFIGURE" != "1" ]]; then
         CC=gcc-3.3 ./configure\
-        --prefix=/usr/local\
+        --prefix=$PREFIX\
         --disable-static\
         --enable-shared\
         --enable-relocation\
         --with-threads\
         || exit
 fi
+
+fi
         
 if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
-    # apgcc cannot link, but is potentially better for and old glibc
-    make CC=apgcc CCLD=apgcc || :
-    make CC=gcc-3.3 CCLD=gcc || exit 1
+    make CC=gcc-3.3 CCLD=gcc-3.3 || exit 1
 fi
 
 make install DESTDIR=$build_root || exit 1
 mv $build_root/usr/local/* $build_root
-
-fi
-
+mv $build_root/$PREFIX/* $build_root
 ## FIXME: -doc package
-rm -rf $buibld_root/usr
+rm -rf $build_root/usr
 rm -rf $build_root/man
 #rm -rf $build_root/share
 
@@ -74,6 +78,7 @@
 require @gnu.org/libtool 3
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
  safeSed bin/guile-config "s@/usr/[EMAIL PROTECTED]@g"
  [ -d etc ] && copyFiles etc/* "$PREFIX/etc"
  [ -d bin ] && installExe bin/*
@@ -86,7 +91,7 @@
  [ -d include ] && copyFiles include/* "$PREFIX/include"
  [ -d lib/guile ] && copyFiles lib/guile/* "$PREFIX/lib/guile"
  [ -d lib/pkgconfig ] && for i in lib/pkgconfig/*; do
-     safeSed "$i" "s@/usr/[EMAIL PROTECTED]@g"
+     safeSed "$i" "s@/opt/[EMAIL PROTECTED]@g"
  done
  [ -d lib/pkgconfig ] && copyFiles lib/pkgconfig/* "$PREFIX/lib/pkgconfig"
  mv "$PREFIX/bin/guile" "$PREFIX/bin/guile.orig"
Index: installers/linux/autopackage/specs/libpng/default.apspec.in
diff -u installers/linux/autopackage/specs/libpng/default.apspec.in:1.5 
installers/linux/autopackage/specs/libpng/default.apspec.in:1.6
--- installers/linux/autopackage/specs/libpng/default.apspec.in:1.5     Mon Aug 
22 23:12:58 2005
+++ installers/linux/autopackage/specs/libpng/default.apspec.in Thu Oct 20 
19:37:55 2005
@@ -1,3 +1,5 @@
+# -*-shell-script-*-
+
 [Meta]
 RootName: @libpng.org/libpng:$SOFTWAREVERSION
 ##FIXME: configure reports 1.2.8-automake
@@ -19,6 +21,8 @@
 URL: http://www.libpng.org/pub/png/libpng.html
 
 [BuildPrepare]
+export PREFIX=/opt/autopackage
+
 if [[ "$APKG_BUILD_SKIP_CONFIGURE" != "1" ]]; then
 
 # FIXME: libpng-1.2.8-config wants to install in /usr/lib
@@ -53,18 +57,19 @@
 EOF
 fi
 
-prepareBuild --disable-static --enable-shared
+prepareBuild --prefix=$PREFIX --disable-static --enable-shared
 
 if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
-   make -f version.make DESTDIR=$build_root prefix=$_prefix all
+   make -f version.make DESTDIR=$build_root prefix=$PREFIX all
 fi
 
-make -f version.make DESTDIR=$build_root prefix=$_prefix install
-
-# hmm
-rm -f $build_root${_prefix}/lib/libpng12.so
-rm -f $build_root${_prefix}/lib/libpng12.so.0
-rm -f $build_root${_prefix}/lib/libpng12.so.0.0.0
+make -f version.make DESTDIR=$build_root prefix=$PREFIX install
+mv $build_root/usr/local/* $build_root
+mv $build_root/$PREFIX/* $build_root
+# FIXME: must remove symlinks.
+rm -f $build_root/lib/libpng12.so
+rm -f $build_root/lib/libpng12.so.0
+rm -f $build_root/lib/libpng12.so.0.0.0
 
 [BuildUnprepare]
 unprepareBuild
@@ -92,6 +97,7 @@
 # require "@gtk.org/glib" 1
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
  [ -d etc ] && copyFiles etc/* "$PREFIX/etc"
  [ -d bin ] && installExe bin/*
  [ -d lib ] && installLib lib/*.so.*.*.*
@@ -103,7 +109,7 @@
  [ -d include ] && copyFiles include/* "$PREFIX/include"
  [ -d lib/libpng ] && copyFiles lib/libpng/* "$PREFIX/lib/libpng"
  [ -d lib/pkgconfig ] && for i in lib/pkgconfig/*; do
-     safeSed "$i" "s@/usr/[EMAIL PROTECTED]@g"
+     safeSed "$i" "s@/opt/[EMAIL PROTECTED]@g"
  done
  [ -d lib/pkgconfig ] && copyFiles lib/pkgconfig/* "$PREFIX/lib/pkgconfig"
 
Index: installers/linux/autopackage/specs/libtool/default.apspec.in
diff -u installers/linux/autopackage/specs/libtool/default.apspec.in:1.1 
installers/linux/autopackage/specs/libtool/default.apspec.in:1.2
--- installers/linux/autopackage/specs/libtool/default.apspec.in:1.1    Wed Sep 
 7 21:41:05 2005
+++ installers/linux/autopackage/specs/libtool/default.apspec.in        Thu Oct 
20 19:37:55 2005
@@ -1,3 +1,5 @@
+# -*-shell-script-*-
+
 [Meta]
 RootName: @gnu.org/libtool:$SOFTWAREVERSION
 SoftwareVersion: @PACKAGE_VERSION@
@@ -19,21 +21,30 @@
 building static libraries on all platforms.
 
 [BuildPrepare]
+export PREFIX=/opt/autopackage
+
+if [[ -n "$TRY_APGCC" ]]; then
+
 ## apgcc cannot link with libtool
-## prepareBuild --disable-static --enable-shared
+prepareBuild --prefix=$PREFIX --disable-static --enable-shared
+
+else
+
+if [[ "$APKG_BUILD_SKIP_CONFIGURE" != "1" ]]; then
+   ./configure --prefix=$PREFIX --disable-static --enable-shared
+fi
 
-./configure --disable-static --enable-shared
 if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
-    # apgcc cannot link modules, but is potentially better for and old glibc
-    make CC=apgcc CCLD=apgcc || :
-    make CC=gcc CCLD=gcc || :
     make CC=gcc CCLD=gcc || exit 1
 fi
 
+fi
+
 #libtool: install: error: cannot install `libpangoft2-1.0.la' to a directory 
not ending in /usr/local/lib
 #make install DESTDIR=$build_root prefix= || exit 1
 make install DESTDIR=$build_root || exit 1
 mv $build_root/usr/local/* $build_root
+mv $build_root/$PREFIX/* $build_root
 rm -rf $build_root/usr
 rm -rf $build_root/man
 rm -rf $build_root/share
@@ -56,6 +67,7 @@
 # require "@gtk.org/glib" 1
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
  [ -d etc ] && copyFiles etc/* "$PREFIX/etc"
  [ -d bin ] && installExe bin/*
  [ -d lib ] && installLib lib/*.so.*.*.*
@@ -68,7 +80,7 @@
  [ -d lib/glib ] && copyFiles lib/glib/* "$PREFIX/lib/glib"
  [ -d lib/glib-2.0 ] && copyFiles lib/glib-2.0/* "$PREFIX/lib/glib-2.0"
  [ -d lib/pkgconfig ] && for i in lib/pkgconfig/*; do
-     safeSed "$i" "s@/usr/[EMAIL PROTECTED]@g"
+     safeSed "$i" "s@/opt/[EMAIL PROTECTED]@g"
  done
  [ -d lib/pkgconfig ] && copyFiles lib/pkgconfig/* "$PREFIX/lib/pkgconfig"
  
Index: installers/linux/autopackage/specs/lilypond/GNUmakefile
diff -u installers/linux/autopackage/specs/lilypond/GNUmakefile:1.4 
installers/linux/autopackage/specs/lilypond/GNUmakefile:1.5
--- installers/linux/autopackage/specs/lilypond/GNUmakefile:1.4 Mon Jun 27 
07:50:51 2005
+++ installers/linux/autopackage/specs/lilypond/GNUmakefile     Thu Oct 20 
19:37:55 2005
@@ -22,9 +22,13 @@
 # Cancel the default rule
 $(outdir)/%: %.in $(config_make) $(depth)/VERSION
 
+ifeq ($(top-src-dir),)
+top-src-dir:=$(srcdir)
+endif
+
 $(outdir)/%: %.in #$(config_make) $(depth)/VERSION
        rm -f $@
-       intltool-merge -q -d $(srcdir)/po $< - | sed $(sed-atfiles) 
$(sed-atvariables) > $@
+       intltool-merge -q -d $(top-src-dir)/po $< - | sed $(sed-atfiles) 
$(sed-atvariables) > $@
 
-$(outdir)/%.xpm: $(srcdir)/$(depth)/Documentation/pictures/%.xpm
+$(outdir)/%.xpm: $(top-src-dir)/Documentation/pictures/%.xpm
        cp $< $@                
Index: installers/linux/autopackage/specs/lilypond/default.apspec.in
diff -u installers/linux/autopackage/specs/lilypond/default.apspec.in:1.22 
installers/linux/autopackage/specs/lilypond/default.apspec.in:1.23
--- installers/linux/autopackage/specs/lilypond/default.apspec.in:1.22  Mon Aug 
29 22:41:45 2005
+++ installers/linux/autopackage/specs/lilypond/default.apspec.in       Thu Oct 
20 19:37:55 2005
@@ -1,4 +1,4 @@
-# -*-shell-script-*-# to create the autopackage, do: makeinstaller 
make/out/default.apspec
+# -*-shell-script-*-
 
 [Meta]
 SoftwareVersion: @VERSION@
@@ -34,16 +34,35 @@
 #export programs
 
 [BuildPrepare]
-export CC=gcc
-export CXX=g++
-prepareBuild --prefix=/usr --without-kpathsea --enable-relocation 
--enable-static-gxx
-
-#if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
-    make -C autopackage all;
-#fi
+export PREFIX=/opt/autopackage
+
+if [[ -n "$TRY_APGCC" ]]; then
+
+prepareBuild --prefix=$PREFIX --without-kpathsea --enable-relocation 
--enable-static-gxx
+
+else
+
+if [[ "$APKG_BUILD_SKIP_CONFIGURE" != "1" ]]; then
+    export CC=gcc
+    export CXX=g++
+    ./configure --prefix=$PREFIX --without-kpathsea --enable-relocation 
--enable-static-gxx
+fi
+
+if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
+    make
+fi
+
+fi
+
+make -C autopackage all
+
+make install prefix=$PREFIX DESTDIR=$build_root
+make -C autopackage install prefix=$PREFIX DESTDIR=$build_root
+
+mv $build_root/$PREFIX/* $build_root
 
 # Examples
-lilypond_docdir=$build_root/$prefix/share/doc/lilypond
+lilypond_docdir=$build_root/share/doc/lilypond
 mkdirs $lilypond_docdir
 cp -prv input $lilypond_docdir
 rm -rf $(find $lilypond_docdir -type d -a -name 'CVS')
@@ -51,7 +70,6 @@
 rm -f $(find $lilypond_docdir -name 'SCons*')
 rm -f $(find $lilypond_docdir -name 'GNUmakefile*')
 
-make -C autopackage install prefix= DESTDIR=$build_root;
 
 [BuildUnprepare]
 unprepareBuild
@@ -116,6 +134,7 @@
 #regex
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
 
 image_dir=$(escapeValue "$PREFIX/share/lilypond/@VERSION@/images")
 bin_dir=$(escapeValue "$PREFIX/bin")
Index: installers/linux/autopackage/specs/pango/default.apspec.in
diff -u installers/linux/autopackage/specs/pango/default.apspec.in:1.9 
installers/linux/autopackage/specs/pango/default.apspec.in:1.10
--- installers/linux/autopackage/specs/pango/default.apspec.in:1.9      Wed Sep 
 7 21:41:05 2005
+++ installers/linux/autopackage/specs/pango/default.apspec.in  Thu Oct 20 
19:37:54 2005
@@ -1,3 +1,5 @@
+# -*-shell-script-*-
+
 [Meta]
 RootName: @gtk.org/pango:$SOFTWAREVERSION
 SoftwareVersion: @PANGO_VERSION@
@@ -18,12 +20,18 @@
 and font handling for GTK+-2.0.
 
 [BuildPrepare]
+export PREFIX=/opt/autopackage
+
+if [[ -n "$TRY_APGCC" ]]; then
+
 ## apgcc cannot link modules
-##prepareBuild --disable-static --enable-shared --without-x --without-cairo
+prepareBuild --prefix=$PREFIX --disable-static --enable-shared --without-x 
--without-cairo
+
+else
 
 if [[ "$APKG_BUILD_SKIP_CONFIGURE" != "1" ]]; then
         _ld_extra="`pkg-config --libs libprefixdb`" ./configure\
-        --prefix=/usr/local\
+        --prefix=$PREFIX\
         --disable-static\
         --enable-shared\
         --without-x\
@@ -31,15 +39,16 @@
 fi
         
 if [[ "$APKG_BUILD_SKIP_MAKE" != "1" ]]; then
-    # apgcc cannot link modules, but is potentially better for and old glibc
-    make CC=apgcc CCLD=apgcc || :
     make CC=gcc CCLD=gcc || exit 1
 fi
 
+fi
+
 #libtool: install: error: cannot install `libpangoft2-1.0.la' to a directory 
not ending in /usr/local/lib
 #make install DESTDIR=$build_root prefix= || exit 1
 make install DESTDIR=$build_root || exit 1
 mv $build_root/usr/local/* $build_root
+mv $build_root/$PREFIX/* $build_root
 rm -rf $build_root/usr
 rm -rf $build_root/man
 rm -rf $build_root/share
@@ -67,6 +76,7 @@
 require @gnu.org/libtool 3
 
 [Install]
+ [ "$PREFIX" == "/usr" ] && export PREFIX=/opt/autopackage
  [ -d etc ] && copyFiles etc/* "$PREFIX/etc"
  [ -d bin ] && installExe bin/*
  [ -d lib ] && installLib lib/*.so.*.*.*
@@ -78,7 +88,7 @@
  [ -d include ] && copyFiles include/* "$PREFIX/include"
  [ -d lib/pango ] && copyFiles lib/pango/* "$PREFIX/lib/pango"
  [ -d lib/pkgconfig ] && for i in lib/pkgconfig/*; do
-     safeSed "$i" "s@/usr/[EMAIL PROTECTED]@g"
+     safeSed "$i" "s@/opt/[EMAIL PROTECTED]@g"
  done
  [ -d lib/pkgconfig ] && copyFiles lib/pkgconfig/* "$PREFIX/lib/pkgconfig"
 


_______________________________________________
Lilypond-cvs mailing list
Lilypond-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to