diff options
-rw-r--r-- | desktop/myGtkMenu/README | 9 | ||||
-rw-r--r-- | desktop/myGtkMenu/cflags.diff | 25 | ||||
-rw-r--r-- | desktop/myGtkMenu/myGtkMenu.SlackBuild | 86 | ||||
-rw-r--r-- | desktop/myGtkMenu/myGtkMenu.info | 12 | ||||
-rw-r--r-- | desktop/myGtkMenu/slack-desc | 2 |
5 files changed, 55 insertions, 79 deletions
diff --git a/desktop/myGtkMenu/README b/desktop/myGtkMenu/README index 901a453fee..fa30e3e01b 100644 --- a/desktop/myGtkMenu/README +++ b/desktop/myGtkMenu/README @@ -1,6 +1,11 @@ +myGtkMenu (standalone Gtk+3 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. + +An example configuration file is installed as part of the package. To +use it, run this command: + + myGtkMenu /usr/share/myGtkMenu/examples/TestMenu.txt diff --git a/desktop/myGtkMenu/cflags.diff b/desktop/myGtkMenu/cflags.diff deleted file mode 100644 index 1d1d68cfcb..0000000000 --- a/desktop/myGtkMenu/cflags.diff +++ /dev/null @@ -1,25 +0,0 @@ ---- 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/myGtkMenu.SlackBuild b/desktop/myGtkMenu/myGtkMenu.SlackBuild index 9a9d085fe5..505ad9cadb 100644 --- a/desktop/myGtkMenu/myGtkMenu.SlackBuild +++ b/desktop/myGtkMenu/myGtkMenu.SlackBuild @@ -2,31 +2,23 @@ # Slackware build script for myGtkMenu -# Copyright 2015, 2018 Hunter Sezen California, USA -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "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 AUTHOR 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. +# Original author: Hunter Sezen. +# Modified and now maintained by B. Watson <urchlay@slackware.uk>. + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20240903 bkw: +# - new maintainer. +# - update for v1.4 (fork by a different dev). +# - have to host the 1.4 tarball myself, since it's on google drive, which +# isn't exactly wget/curl friendly. +# - update README and slack-desc: this has been Gtk+3 since v1.3. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=myGtkMenu -VERSION=${VERSION:-1.3} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.4} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -38,9 +30,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -52,16 +41,12 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -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 -eu @@ -71,20 +56,14 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION mkdir -p $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -C $PRGNAM-$VERSION +# 20240904 bkw: exclude the precompiled binary. +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 --exclude="$PRGNAM-$VERSION/$PRGNAM" 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 {} \; - -rm -f $PRGNAM +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + -patch -p0 < $CWD/cflags.diff - -make CFLAGS="$SLKCFLAGS" +make CFLAGS="$SLKCFLAGS -Wl,-s" install -Dm0755 $PRGNAM $PKG/usr/bin/$PRGNAM install -Dm0644 icons/$PRGNAM.png \ @@ -92,12 +71,29 @@ install -Dm0644 icons/$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 -cp -a License.txt README TestMenu.txt $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a License.txt README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +# 20240903 bkw: the example menu expects to be run from the source dir, +# massage it into working correctly as part of a package. It's +# *completely stupid* to include icons in the package just for +# the example, so make it use icons that are in Slackware already. +mkdir -p $PKG/usr/share/$PRGNAM/examples +GI="gnome-icons" +EX="/usr/share/icons/elementary-xfce" +sed -e "s,$GI/access.png,$EX/apps/32/access.png," \ + -e "s,$GI/folder.png,$EX/places/32/folder.png," \ + -e "s,$GI/gnome-folder.png,$EX/places/32/gnome-folder.png," \ + -e "s,$GI/media-optical.png,$EX/devices/32/media-optical.png," \ + -e "s,$GI/sound.png,$EX/mimes/32/sound.png," \ + -e "s,$GI/gnome-calc2.png,$EX/apps/32/accessories-calculator.png," \ + -e "s,$GI/gnome-gimp.png,$EX/apps/32/gimp.png," \ + -e "s,$GI/gnome-gmenu.png,$EX/apps/32/alacarte.png," \ + -e "s,$GI/text-editor.png,$EX/apps/32/text-editor.png," \ + < TestMenu.txt \ + > $PKG/usr/share/$PRGNAM/examples/TestMenu.txt mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/desktop/myGtkMenu/myGtkMenu.info b/desktop/myGtkMenu/myGtkMenu.info index 5b78fce714..6ec16d190d 100644 --- a/desktop/myGtkMenu/myGtkMenu.info +++ b/desktop/myGtkMenu/myGtkMenu.info @@ -1,10 +1,10 @@ PRGNAM="myGtkMenu" -VERSION="1.3" -HOMEPAGE="https://sites.google.com/site/jvinla/mygtkmenu" -DOWNLOAD="https://sites.google.com/site/jvinla/myGtkMenu-1.3.tar.gz" -MD5SUM="3044ad5bf99bad67af64e4c8b3981dea" +VERSION="1.4" +HOMEPAGE="https://sites.google.com/site/jvinla/home" +DOWNLOAD="https://slackware.uk/~urchlay/src/myGtkMenu-1.4.tar.bz2" +MD5SUM="f7973c557c26c05c4e5464a581de5534" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Hunter Sezen" -EMAIL="orbea@riseup.net" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/desktop/myGtkMenu/slack-desc b/desktop/myGtkMenu/slack-desc index be977b2b9a..532d178647 100644 --- a/desktop/myGtkMenu/slack-desc +++ b/desktop/myGtkMenu/slack-desc @@ -6,7 +6,7 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -myGtkMenu: myGtkMenu (Stand alone gtk2 menu) +myGtkMenu: myGtkMenu (standalone Gtk+3 menu) myGtkMenu: myGtkMenu: The purpose of myGtkMenu is to read a description file and display myGtkMenu: a menu. |