diff options
Diffstat (limited to 'system/cpu-g/cpu-g.SlackBuild')
-rw-r--r-- | system/cpu-g/cpu-g.SlackBuild | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/system/cpu-g/cpu-g.SlackBuild b/system/cpu-g/cpu-g.SlackBuild index 28a4a40570..d065f4cc77 100644 --- a/system/cpu-g/cpu-g.SlackBuild +++ b/system/cpu-g/cpu-g.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for cpu-g # Written by Eric Fernandes Ferreira <candelabrus@gmail.com> @@ -24,13 +24,24 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220301 bkw: Modified by SlackBuilds.org, BUILD=2: +# - fix permissions: binary wasn't executable (!), .desktop was (?). +# - remove deprecated Encoding from .desktop. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=cpu-g VERSION=${VERSION:-0.9.0} ARCH=noarch -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi -CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -46,24 +57,22 @@ 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 \ + -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 {} \; - + -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 +install -m0755 $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 +sed -i -e "s_^Icon=cpu-g\$_Icon=/usr/share/$PRGNAM/data/cpu-g.png_" \ + -e '/^Encoding/d' \ + "$TMP/$PRGNAM-$VERSION/data/cpu-g.desktop" +install -m0644 $TMP/$PRGNAM-$VERSION/data/cpu-g.desktop $PKG/usr/share/applications/ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/share/$PRGNAM/{COPYING,README} $PKG/usr/doc/$PRGNAM-$VERSION @@ -74,4 +83,4 @@ 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} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |