2010-05-11 20:01:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for Pure Data
|
|
|
|
|
2011-10-23 19:50:55 +02:00
|
|
|
# Modified by by Ilya Dmitrichenko <errordeveloper-AT-gmail-DOT-com>
|
2010-05-11 20:01:23 +02:00
|
|
|
# Modified by Robby Workman <rworkman@slackbuilds.org> with minor stuff:
|
|
|
|
# -fix makefile patch to use DESTDIR correctly
|
|
|
|
# -miscellanous script tweaks
|
|
|
|
# No additional license terms
|
2011-10-23 19:50:55 +02:00
|
|
|
# Modified by Michales Michaloudes <korgie@gmail.com> (2011)
|
|
|
|
# - version bump
|
|
|
|
# - desktop icon
|
|
|
|
# - enable jack and portmidi
|
2011-12-12 00:54:57 +01:00
|
|
|
# - include all .h files
|
2010-05-11 20:01:23 +02:00
|
|
|
|
|
|
|
PRGNAM=pd
|
2011-12-12 00:54:57 +01:00
|
|
|
VERSION=${VERSION:-0.43.0}
|
|
|
|
BUILD=${BUILD:-2}
|
2010-05-11 20:01:23 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2011-10-25 03:03:33 +02:00
|
|
|
|
2011-12-12 00:54:57 +01:00
|
|
|
SRCVERSION=0.43-0
|
|
|
|
|
2010-06-04 07:00:29 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
2011-10-25 03:03:33 +02:00
|
|
|
|
2010-05-11 20:01:23 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
2010-05-13 00:21:57 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 20:01:23 +02:00
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
2010-05-13 00:21:57 +02:00
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
|
|
SLKCFLAGS="-O2 -fPIC"
|
|
|
|
LIBDIRSUFFIX="64"
|
2010-06-04 07:00:29 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 20:01:23 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
2011-12-12 00:54:57 +01:00
|
|
|
rm -rf $PRGNAM-$SRCVERSION
|
|
|
|
tar xvf $CWD/$PRGNAM-$SRCVERSION.src.tar.gz
|
|
|
|
cd $PRGNAM-$SRCVERSION
|
2010-05-11 20:01:23 +02:00
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
|
|
|
cd src
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2010-05-13 00:21:57 +02:00
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
2010-05-11 20:01:23 +02:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share/pd \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--enable-alsa \
|
2011-10-23 19:50:55 +02:00
|
|
|
--enable-setuid \
|
|
|
|
--enable-jack \
|
|
|
|
--disable-portaudio \
|
|
|
|
--enable-portmidi
|
2011-12-12 00:54:57 +01:00
|
|
|
make
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
cd ..
|
2010-05-11 20:01:23 +02:00
|
|
|
|
2011-10-23 19:50:55 +02:00
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
2010-05-19 08:31:24 +02:00
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2010-05-11 20:01:23 +02:00
|
|
|
|
2011-10-23 19:50:55 +02:00
|
|
|
# create and cp KDE desktop icon
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
|
|
mkdir -p $PKG/usr/share/$PRGNAM
|
|
|
|
cp -a $CWD/$PRGNAM.desktop $PKG/usr/share/applications
|
2011-12-12 00:54:57 +01:00
|
|
|
convert $TMP/$PRGNAM-$SRCVERSION/src/pd.ico $TMP/${PRGNAM}_48.xpm
|
|
|
|
cp $TMP/${PRGNAM}_48-3.xpm $PKG/usr/share/$PRGNAM
|
2011-10-23 19:50:55 +02:00
|
|
|
|
|
|
|
# For 0.43-0 version
|
|
|
|
mkdir -p $PKG/usr/lib/pd/tcl/
|
2011-12-12 00:54:57 +01:00
|
|
|
cp -a $TMP/$PRGNAM-$SRCVERSION/tcl/*.tcl $PKG/usr/lib/pd/tcl/
|
|
|
|
|
|
|
|
# copy all header files (for pd_mrpeach)
|
|
|
|
cp -p $TMP/$PRGNAM-$SRCVERSION/src/*.h $PKG/usr/include/
|
2011-10-23 19:50:55 +02:00
|
|
|
|
|
|
|
mv $PKG/usr/share/man $PKG/usr/man
|
|
|
|
|
2011-12-12 00:54:57 +01:00
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2010-05-11 20:01:23 +02:00
|
|
|
cp -a INSTALL.txt README.txt LICENSE.txt src/CHANGELOG.txt \
|
2011-12-12 00:54:57 +01:00
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
ln -s /usr/lib/pd/doc/ $PKG/usr/doc/$PRGNAM-$VERSION/docs
|
2010-05-11 20:01:23 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2012-09-28 02:49:06 +02:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2010-05-11 20:01:23 +02:00
|
|
|
|
|
|
|
cd $PKG
|
2011-12-12 00:54:57 +01:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|