#!/bin/sh # polymer.SlackBuild by luc3kpoczta.fm # polymer got from http://static.int.pl/~mig21/dev/releases/polymer/ set -e # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKGNAME=polymer VERSION=0.3.2 ARCH=i686 BUILD=1X QTVER=3.3.6 export CFLAGS="-O2 -march=i686" export CXXFLAGS="${CFLAGS}" # prepare directories PKG=$TMP/package-$PKGNAME rm -rf $PKG if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi cd $TMP rm -rf $PKGNAME-$VERSION # unpack sources tar xjvf $CWD/$PKGNAME-$VERSION.tar.bz2 cd $PKGNAME-$VERSION chown -R root:root . #compile ./configure --prefix=/usr make -j2 # end compile # install mkdir -p $PKG/usr/lib/qt-$QTVER/plugins/styles cp -a $TMP/$PKGNAME-$VERSION/style/libpolymer.so.1.0.0 \ $PKG/usr/lib/qt-$QTVER/plugins/styles/polymer.so mkdir -p $PKG/usr/bin cp -a $TMP/$PKGNAME-$VERSION/config/polymer-config \ $PKG/usr/bin # Strip binaries: ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ xargs strip --strip-unneeded 2> /dev/null ) # set ownership of /usr/bin scripts find $PKG/usr/bin -perm 755 -print0 | \ xargs -0 chown root:bin # make doc mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION cp -a AUTHORS README COPYING INSTALL TODO ChangeLog \ $PKG/usr/doc/$PKGNAME-$VERSION -r # make slack-desc mkdir -p $PKG/install cat << EOF > $PKG/install/slack-desc polymer: polymer (port of plastik style) polymer: polymer: Polymer (formerly known as Plastique) is a port of KDE style polumer: Plastik, which does not depend on any KDE libraries. This means, polymer: that you only need QT 3.x to make your QT applications look as if polymer: you had KDE installed. Full source code is released under GPL polymer: license. polymer: polymer: polymer: polymer: Package created by luc3kpoczta.fm EOF # Build the package: cd $PKG makepkg -l y -c n $TMP/$PKGNAME-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PKGNAME-$VERSION rm -rf $PKG fi