#!/bin/sh # Heavily based on the Slackware 12.2 SlackBuild # http://autoq3d.ecuadra.com # Packager Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.it # Required: Qt4 CWD=`pwd` TMP=${TMP:-/tmp/tgz} PKG=$TMP/package/autoq3d NAME=autoq3d VERSION=1-39 PKGVERSION=1.39 CHOST=i486 ARCH=${ARCH:-i686} BUILD=1as SOURCE=http://switch.dl.sourceforge.net/sourceforge/autoq3d/AutoQ3DCommunity"$VERSION"qt4source.zip if [ ! -e AutoQ3DCommunity"$VERSION"qt4source.zip ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP unzip -o $CWD/AutoQ3DCommunity"$VERSION"qt4source.zip echo -e "\E[0;32m+--------------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild $NAME-$VERSION |\E[0;0m" echo -e "\E[0;32m+--------------------------------+\E[0;0m" cd AutoQ3DCommunity"$VERSION"qt4source find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; chown -R root:root . /opt/qt4/bin/qmake -unix -o Makefile AutoQ3D.pro make mkdir -p $PKG/usr/bin cat << EOF > $PKG/usr/bin/AutoQ3D #!/bin/bash cd /usr/share/AutoQ3D-Community exec /usr/share/AutoQ3D-Community/AutoQ3D EOF chmod 755 $PKG/usr/bin/* mkdir -p $PKG/usr/share/pixmaps install -m 644 AutoQ3D.png $PKG/usr/share/pixmaps mkdir -p $PKG/usr/share/AutoQ3D-Community install -m 755 AutoQ3D $PKG/usr/share/AutoQ3D-Community cp -a -r {docs,images,*.htm} $PKG/usr/share/AutoQ3D-Community mkdir -p $PKG/usr/share/applications cat << EOF > $PKG/usr/share/applications/$NAME.desktop [Desktop Entry] Type=Application Encoding=UTF-8 Name=AutoQ3D GenericName=3D CAD Comment=3D modeling application for computing aided drafting in three dimensions Icon=AutoQ3D Exec=AutoQ3D Terminal=false Categories=Qt;Graphics; StartupNotify=true EOF mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a *.txt $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild strip --strip-unneeded $PKG/usr/share/AutoQ3D-Community/AutoQ3D cd $PKG requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$PKGVERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi