diff options
author | Hunter Sezen <orbea@fredslev.dk> | 2018-03-30 23:45:12 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2018-03-31 07:41:41 +0700 |
commit | 4c27112e99eca81702d437826aa4ede040899fe8 (patch) | |
tree | 33cc37b60015faf4076b1e1458d8027673460a2c /desktop | |
parent | 155c5c812e833b0320f2288893713ed8652dbf7d (diff) |
desktop/myGtkMenu: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/myGtkMenu/README | 7 | ||||
-rw-r--r-- | desktop/myGtkMenu/cflags.diff | 25 | ||||
-rw-r--r-- | desktop/myGtkMenu/doinst.sh | 5 | ||||
-rw-r--r-- | desktop/myGtkMenu/myGtkMenu.SlackBuild | 30 |
4 files changed, 54 insertions, 13 deletions
diff --git a/desktop/myGtkMenu/README b/desktop/myGtkMenu/README index 9ce9f9813bd8..901a453feed2 100644 --- a/desktop/myGtkMenu/README +++ b/desktop/myGtkMenu/README @@ -1 +1,6 @@ -The purpose of myGtkMenu is to read a description file and display a menu. +The purpose of myGtkMenu is to read a description file and display a +menu. + +myGtkMenu can be used by setting a configuration file as an argument. +An example configuration file is installed to the myGtkMenu +documentation directory. diff --git a/desktop/myGtkMenu/cflags.diff b/desktop/myGtkMenu/cflags.diff new file mode 100644 index 000000000000..1d1d68cfcbdc --- /dev/null +++ b/desktop/myGtkMenu/cflags.diff @@ -0,0 +1,25 @@ +--- Makefile.orig 2018-03-29 09:57:17.598456271 -0700 ++++ Makefile 2018-03-29 09:58:53.390396527 -0700 +@@ -1,18 +1,20 @@ + + CC = gcc + +-CFLAGS = -Wall \ ++DEF_FLAGS = -Wall \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ + -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED + ++CFLAGS = -O2 ++ + GKT = `pkg-config gtk+-2.0 --cflags --libs` + + all: myGtkMenu + + myGtkMenu: main.c +- $(CC) main.c -o myGtkMenu $(CFLAGS) $(GKT) ++ $(CC) main.c -o myGtkMenu $(CFLAGS) $(DEF_FLAGS) $(GKT) + + clean: + rm -f *.o myGtkMenu diff --git a/desktop/myGtkMenu/doinst.sh b/desktop/myGtkMenu/doinst.sh new file mode 100644 index 000000000000..4110f5514d7c --- /dev/null +++ b/desktop/myGtkMenu/doinst.sh @@ -0,0 +1,5 @@ +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/desktop/myGtkMenu/myGtkMenu.SlackBuild b/desktop/myGtkMenu/myGtkMenu.SlackBuild index caaadf163c5c..e30cdc737d61 100644 --- a/desktop/myGtkMenu/myGtkMenu.SlackBuild +++ b/desktop/myGtkMenu/myGtkMenu.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for myGtkMenu -# Copyright 2015 Hunter Sezen California, USA +# Copyright 2015, 2018 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,12 +24,12 @@ PRGNAM=myGtkMenu VERSION=${VERSION:-1.3} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -54,7 +54,7 @@ else LIBDIRSUFFIX="" fi -set -e +set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -71,21 +71,27 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; rm -f $PRGNAM -make + +patch -p0 < $CWD/cflags.diff + +make CFLAGS="$SLKCFLAGS" + +install -Dm0755 $PRGNAM $PKG/usr/bin/$PRGNAM +install -Dm0644 icons/$PRGNAM.png \ + $PKG/usr/share/icons/hicolor/32x32/apps/$PRGNAM.png +install -Dm0644 icons/$PRGNAM.svg \ + $PKG/usr/share/icons/hicolor/scalable/apps/$PRGNAM.svg 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 $PKG/usr/bin/ +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a License.txt README TestMenu.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -cp -a $PRGNAM $PKG/usr/bin/$PRGNAM - -mkdir -p $PKG/usr/share/pixmaps -cp -rf icons/* gnome-icons/* $PKG/usr/share/pixmaps 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} |