desktop/myGtkMenu: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Hunter Sezen 2018-03-30 23:45:12 +07:00 committed by Willy Sudiarto Raharjo
parent 155c5c812e
commit 4c27112e99
4 changed files with 54 additions and 13 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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}