#!/bin/sh # Heavily based on the Slackware 13.1 SlackBuild # Written by Bertolotti ( www.slacky.eu ) # Last build from Tommaso D'Anna aka tasodan ( www.slacky.eu ) # Slackware build script for vym # Official Site: http://www.insilmaril.de/vym # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. set -e # Catching variables PKGNAME=${PKGNAME:-vym} VERSION=${VERSION:-1.12.7} BUILD=${BUILD:-1} TAG=${TAG:-sl} ARCH=${ARCH:-i486} SOURCE="http://downloads.sourceforge.net/sourceforge/$PKGNAME/$PKGNAME-$VERSION.tar.bz2" CWD=${CWD:-`pwd`} TMP=${TMP:-/tmp/buildpkgs/$PKGNAME} PKG=${PKG:-$TMP/package-$PKGNAME} OUTPUT=${OUTPUT:-$CWD} CHOST="i486" if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" SLKLDFLAGS="" LIBDIRSUFFIX="" elif [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" SLKLDFLAGS="" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" SLKLDFLAGS="" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64" LIBDIRSUFFIX="64" CHOST="x86_64" fi # Source file avaiability if [ ! -e $CWD/$PKGNAME-$VERSION.tar.bz2 ] ; then wget $SOURCE fi # Create working directories: rm -rf $TMP mkdir -p $TMP $PKG $OUTPUT # Package building cd $TMP tar xvjf $CWD/$PKGNAME-$VERSION.tar.bz2 cd $PKGNAME-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . qmake -unix PREFIX=/usr QMAKE_LIBS="$SLKLDFLAGS" QMAKE_CFLAGS="$SLKCFLAGS" \ QMAKE_CXXFLAGS="$SLKCFLAGS" -o Makefile vym.pro LDFLAGS="$SLKLDFLAGS" CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make make INSTALL_ROOT=$PKG install mkdir -p $PKG/usr/share/applications cat << EOF > $PKG/usr/share/applications/$PKGNAME.desktop [Desktop Entry] Type=Application Exec=vym Icon=vym MimeType=application/x-vym; Categories=Qt;KDE;Education; Name=VYM - View Your Mind Name[de]=VYM - View Your Mind Name[fi]=VYM - ohjelma miellekarttojen (MindMap) tekemiseksi Name[hu]=VYM - Gondolatmegjelenítő Name[nb]=VYM - Vis tankene dine Name[pa]=VYM - ਵਿਊ ਯੂਅਰ ਮਾਈਡ Name[ru]=VYM - загляни в себя Name[uk]=VYM - Перегляд вашого розуму Name[zh_CN]=VYM - 绘制你的思维 Comment=Create mind maps Comment[ca]=Creeu mapes mentals Comment[de]=Mindmap erstellen Comment[es]=Crear mapas mentales Comment[fr]=Créez des cartes d'associations d'idées Comment[it]=Crea mappe mentali GenericName=Planning Tool GenericName[ca]=Eina de planificació GenericName[da]=Planlægnings- og brainstormværktøj GenericName[de]=Planungs- und Brainstorming-Tool GenericName[es]=Herramienta de planificación GenericName[fi]=Suunnittelu- ja aivoriihityökalu GenericName[fr]=Outil de plannification GenericName[hu]=Tervező- és ötletgyűjtési eszköz GenericName[it]=Strumento di pianificazione e brainstorming GenericName[km]=ឧបករណ៍​ធ្វើ​ផែនការ និង​បំផុស​គំនិត GenericName[nb]=Planleggings- og idéverktøy GenericName[nl]=Programma voor plannen en brainstormen GenericName[pl]=Planowanie i burze mózgów GenericName[pt]=Ferramenta de Planeamento e Tempestades de Ideias GenericName[ru]=Срелдство для планирования и проведения "мозгового штурма" GenericName[uk]=Засіб планування і занотовування ідей GenericName[zh_CN]=规划和头脑风暴工具 EOF install -m 644 -p -D $PKG/usr/share/vym/icons/vym.png \ $PKG/usr/share/pixmaps/vym.png # Adding documentation mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION cp -a \ INSTALL.txt LICENSE.txt README.txt \ $PKG/usr/doc/$PKGNAME-$VERSION cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild cat $CWD/slack-desc > $PKG/usr/doc/$PKGNAME-$VERSION/slack-desc # Stripping binaries cd $PKG chown -R root:root $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true # Adding slack-desc, doinst.sh and slack-required mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh if [ -x "$(which requiredbuilder 2>/dev/null)" ];then requiredbuilder -y -v -s $CWD $PKG fi # Make the package /sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} # Clean up the extra stuff if [ "$1" = "--cleanup" ]; then rm -rf $TMP $PKG fi