|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2009 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2009,2010 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -26,8 +26,8 @@ |
|
|
|
|
# <http://www.rosegardenmusic.com/>. |
|
|
|
|
# |
|
|
|
|
# Depends: l/fftw |
|
|
|
|
# Recommends: ap/jack, l/liblo, l/liblrdf, l/dssi |
|
|
|
|
# Optional: ap/lilypond, l/lirc |
|
|
|
|
# Recommends: ap/jack, l/liblo, l/liblrdf, l/dssi, l/lirc |
|
|
|
|
# Optional: ap/lilypond |
|
|
|
|
# |
|
|
|
|
# Notes: Lilypond is a runtime dependency for the notation editor. |
|
|
|
|
# Another runtime dependency is XML::Twig, needed to import |
|
|
|
@ -37,20 +37,21 @@ |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-rosegarden} |
|
|
|
|
VERSION=${VERSION:-1.7.3} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2} |
|
|
|
|
VERSION=${VERSION:-10.02_beta} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-${VERSION//_/-}.tar.bz2} |
|
|
|
|
WGET=${WGET:-http://surfnet.dl.sourceforge.net/sourceforge/rosegarden/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMETGZ=${NAMETGZ:-rosegarden} |
|
|
|
|
BUILD=${BUILD:-2GGD} |
|
|
|
|
NAMEPKG=${NAMEPKG:-rosegarden} |
|
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
|
ARCH=${ARCH:-i486} |
|
|
|
|
JOBS=${JOBS:-1} |
|
|
|
|
EXT=${EXT:-txz} |
|
|
|
|
|
|
|
|
|
# Directories |
|
|
|
|
TMP=${TMP:-/tmp} |
|
|
|
|
OUT=${OUT:-$TMP/build} |
|
|
|
|
PKG=${PKG:-$OUT/$NAMETGZ} |
|
|
|
|
PKG=${PKG:-$OUT/$NAMEPKG} |
|
|
|
|
CWD=$(pwd) |
|
|
|
|
|
|
|
|
|
set -e # Quit if a command returns non-zero |
|
|
|
@ -66,12 +67,14 @@ if [ ! -d $TMP ]; then |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Compilation flags |
|
|
|
|
LIBDIRSUFFIX="" |
|
|
|
|
case "$ARCH" in |
|
|
|
|
i?86) |
|
|
|
|
CPUOPT="-O2 -march=$ARCH -mtune=i686" |
|
|
|
|
;; |
|
|
|
|
x86_64) |
|
|
|
|
CPUOPT="-O2 -fPIC" |
|
|
|
|
LIBDIRSUFFIX="64" |
|
|
|
|
;; |
|
|
|
|
*) |
|
|
|
|
CPUOPT="-O2" |
|
|
|
@ -93,29 +96,38 @@ tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
|
cmake . \ |
|
|
|
|
-DWANT_LIRC=NO \ |
|
|
|
|
-DCMAKE_INSTALL_PREFIX=$(kde-config --prefix) |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=/usr \ |
|
|
|
|
--with-qtdir=/usr/lib$LIBDIRSUFFIX/qt |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install DESTDIR=$PKG |
|
|
|
|
|
|
|
|
|
# Strip binaries |
|
|
|
|
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \ |
|
|
|
|
xargs strip --strip-unneeded 2> /dev/null |
|
|
|
|
# Don't strip binary for beta release |
|
|
|
|
# find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \ |
|
|
|
|
# xargs strip --strip-unneeded 2> /dev/null |
|
|
|
|
|
|
|
|
|
# Remove auto-generated MIME database file |
|
|
|
|
# (to be rebuilt by doinst.sh, once installed in /) |
|
|
|
|
( |
|
|
|
|
cd $PKG/usr/share/mime |
|
|
|
|
rm XMLnamespaces aliases generic-icons globs globs2 icons magic \ |
|
|
|
|
mime.cache subclasses treemagic types |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 AUTHORS COPYING INSTALL README TRANSLATORS $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 AUTHORS CONTRIBUTING COPYING README $PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
|
# Copy slack-desc and doinst.sh files |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
install -D -m 755 $CWD/doinst.sh $PKG/install/doinst.sh |
|
|
|
|
|
|
|
|
|
# Package the tree |
|
|
|
|
cd $PKG |
|
|
|
|
mkdir -p $OUT |
|
|
|
|
PACKAGING=" |
|
|
|
|
chown root:root . -R |
|
|
|
|
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz |
|
|
|
|
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT |
|
|
|
|
rm -rf $PKG |
|
|
|
|
rm -rf $TMP/$NAME |
|
|
|
|
" |
|
|
|
|