diff options
author | Geoff Ritter <geoff dot ritter at gmail dot com> | 2011-03-05 09:38:47 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-03-05 09:38:47 -0300 |
commit | e6655a28afc2261749cdf9e80163881e522315db (patch) | |
tree | f4d7b3de46f52be8f9598d3f58108496e84e37f0 /misc/spotlighter/spotlighter.SlackBuild | |
parent | d08bdbcca6f491f2d511f5225ab6b76cfa940ea5 (diff) | |
download | slackbuilds-e6655a28afc2261749cdf9e80163881e522315db.tar.gz |
misc/spotlighter: Added (show a spot light on the desktop)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'misc/spotlighter/spotlighter.SlackBuild')
-rw-r--r-- | misc/spotlighter/spotlighter.SlackBuild | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/misc/spotlighter/spotlighter.SlackBuild b/misc/spotlighter/spotlighter.SlackBuild new file mode 100644 index 0000000000..7c37a834c2 --- /dev/null +++ b/misc/spotlighter/spotlighter.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Slackware build script for spotlighter + +# Written by Geoff Ritter < geoff dot ritter at gmail dot com > + +# Public Domain + +PRGNAM=spotlighter +VERSION=${VERSION:-0.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) 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" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +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 . +# If you are going to blindly reset permissions, this is a bit more readable. +# However '-perm /111' may only be compatible with only gnu/find. +find . \ + -type d -exec chmod 755 {} \; -o \ + -type f -perm /111 -exec chmod 755 {} \; -o \ + -type f -exec chmod 644 {} \; + +# Note, while there are no library files installed, the Make file apparently +# uses --libdir to decided where to find some of the libraries. + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +# Make sure the Icon parameter is set properly in .desktop file +sed -i 's/Icon=.*/Icon=spotlighter/' $PKG/usr/share/applications/spotlighter.desktop +# Copy the icon to the proper folder +mkdir -p $PKG/usr/share/icons/hicolor/22x22/apps/ +cp $PKG/usr/share/pixmaps/spotlighter.png $PKG/usr/share/icons/hicolor/22x22/apps + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# No Manpages + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README $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 + +# Make the package +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |