diff options
Diffstat (limited to 'desktop/openbox-menu/openbox-menu.SlackBuild')
-rw-r--r-- | desktop/openbox-menu/openbox-menu.SlackBuild | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/desktop/openbox-menu/openbox-menu.SlackBuild b/desktop/openbox-menu/openbox-menu.SlackBuild index 0f08f121c2..956ad7bb91 100644 --- a/desktop/openbox-menu/openbox-menu.SlackBuild +++ b/desktop/openbox-menu/openbox-menu.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # # Slackware build script for openbox-menu. # -# Copyright 2015 Edinaldo P. Silva, Rio de Janeiro, Brazil. +# Copyright 2015-2023 Edinaldo P. Silva, Rio de Janeiro, Brazil. # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,10 +22,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=openbox-menu -VERSION=${VERSION:-0.8.0} +VERSION=${VERSION:-0.8.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -35,7 +38,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -60,7 +70,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -69,26 +79,24 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -rm -rf {archlinux,.hg*} +patch -p1 < $CWD/openbox-menu-0.8.1-gtk3.patch +patch -p1 < $CWD/openbox-menu-0.8.1-build.patch +patch -p1 < $CWD/openbox-menu-0.8.1-makefile.patch CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -patch -p1 < $CWD/debian_build.patch - make PREFIX=/usr -make install DESTDIR=$PKG +make install-strip DESTDIR=$PKG 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 -rm -rf $PKG/bin install -d $PKG/usr/bin -install -D -m755 openbox-menu $PKG/usr/bin/openbox-menu +install -Dm755 openbox-menu $PKG/usr/bin/openbox-menu install -d $PKG/usr/man/man1 -install -D -m644 $CWD/openbox-menu.1 $PKG/usr/man/man1/openbox-menu.1 - +install -Dm644 $CWD/openbox-menu.1 $PKG/usr/man/man1/openbox-menu.1 find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done @@ -96,7 +104,7 @@ DOCS="AUTHORS ChangeLog COPYING README.md THANKS TODO" mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION -cp $CWD/menu.xml-sample $PKG/usr/doc/$PRGNAM-$VERSION/menu.xml-sample +install -Dm644 $CWD/menu.xml-sample $PKG/usr/doc/$PRGNAM-$VERSION/menu.xml-sample cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install @@ -104,4 +112,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 |