diff options
Diffstat (limited to 'development/ddd/ddd.SlackBuild')
-rw-r--r-- | development/ddd/ddd.SlackBuild | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/development/ddd/ddd.SlackBuild b/development/ddd/ddd.SlackBuild new file mode 100644 index 0000000000..145ee037a2 --- /dev/null +++ b/development/ddd/ddd.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/sh + +# Slackware build script for ddd +# Written by Ferenc Deak <ferenc.deak@gmail.com> + +# Slight modifications by the SlackBuilds projects +# Modified by Ken Milmore 2009 + +PRGNAM=ddd +VERSION=3.3.12 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# http://savannah.gnu.org/bugs/?26726 +patch -p0 < $CWD/strclass.C.diff + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# DDD installs a .desktop file, but not an icon... +mkdir -p $PKG/usr/share/pixmaps +cat $CWD/ddd.png > $PKG/usr/share/pixmaps/ddd.png + +find $PKG/usr/man -type f -exec gzip -9 {} \; + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/* + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING* CREDITS NEWS PROBLEMS README TIPS TODO \ + doc/ddd.pdf doc/ddd-paper.ps doc/html/ddd.html \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |