diff options
Diffstat (limited to 'graphics/FreeCAD/FreeCAD.SlackBuild')
-rw-r--r-- | graphics/FreeCAD/FreeCAD.SlackBuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/graphics/FreeCAD/FreeCAD.SlackBuild b/graphics/FreeCAD/FreeCAD.SlackBuild new file mode 100644 index 0000000000000..a9c9ae9205296 --- /dev/null +++ b/graphics/FreeCAD/FreeCAD.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/sh + +# Slackware build script for FreeCAD +# Maintained by Niels Horn <niels.horn@gmail.com> +# revision date: 2010/05/05 + +PRGNAM=FreeCAD +VERSION=0.9.2646 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCVERSION=${VERSION}.5 + +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 -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# For newer boost versions (as in Slackware -current since 2009/12/17), +# correct names of libs (w/o -mt) +#patch -p1 < $CWD/boost_current.patch + +./autogen.sh + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/opt/$PRGNAM \ + --libdir=/opt/$PRGNAM/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --with-occ-lib=/usr/lib${LIBDIRSUFFIX} \ + --with-occ-include=/usr/include/OpenCASCADE \ + --with-qt4-dir=$QT4DIR \ + --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 + +# Move icon & copy desktop file +mkdir -p $PKG/usr/share/{applications,pixmaps} +mv $PKG/opt/$PRGNAM/share/FCIcon.xpm $PKG/usr/share/pixmaps/ +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + README.Linux ChangeLog.txt \ + $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} |