diff options
author | Eric Fernandes Ferreira <candelabrus@gmail.com> | 2015-07-15 07:58:15 +0700 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2015-07-16 10:57:24 -0500 |
commit | b9f31d66109169c0716a3d5e0272804f98e9df75 (patch) | |
tree | da26c5e9766680114586ec10a8731821f5530509 /system/cpu-g/cpu-g.SlackBuild | |
parent | 126592b2bb278dd47814faa4929d04a10bf58cd1 (diff) |
system/cpu-g: Added (hardware information).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/cpu-g/cpu-g.SlackBuild')
-rw-r--r-- | system/cpu-g/cpu-g.SlackBuild | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/system/cpu-g/cpu-g.SlackBuild b/system/cpu-g/cpu-g.SlackBuild new file mode 100644 index 000000000000..28a4a405701d --- /dev/null +++ b/system/cpu-g/cpu-g.SlackBuild @@ -0,0 +1,77 @@ +#!/bin/sh + +# Slackware build script for cpu-g +# Written by Eric Fernandes Ferreira <candelabrus@gmail.com> +# Copyright 2015 Eric Fernandes Ferreira, Ponta Grossa - PR, Brazil +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "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 COPYRIGHT +# OWNER OR CONTRIBUTORS 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. + +PRGNAM=cpu-g +VERSION=${VERSION:-0.9.0} +ARCH=noarch +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + + +mkdir -p $PKG/usr/{bin,share/applications} +mkdir -p $PKG/usr/share/$PRGNAM/data/logos + +cp $CWD/cpu-g $PKG/usr/bin +cp $TMP/$PRGNAM-$VERSION/{COPYING,README,cpu-g.glade,cpu-g} $PKG/usr/share/$PRGNAM/ +cp $TMP/$PRGNAM-$VERSION/data/cpu-g.png $PKG/usr/share/$PRGNAM/data +cp $TMP/$PRGNAM-$VERSION/data/logos/* $PKG/usr/share/$PRGNAM/data/logos + +sed -i "s_^Icon=cpu-g\$_Icon=/usr/share/$PRGNAM/data/cpu-g.png_" "$TMP/$PRGNAM-$VERSION/data/cpu-g.desktop" +cp $TMP/$PRGNAM-$VERSION/data/cpu-g.desktop $PKG/usr/share/applications/ + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/usr/share/$PRGNAM/{COPYING,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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |