diff options
author | B. Watson <urchlay@slackware.uk> | 2023-07-01 14:09:33 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-07-08 16:42:06 +0700 |
commit | 90f23af3d250ed89b78c3227445b92db339d8516 (patch) | |
tree | e6aa87e86dfbb913ddca201378fe9175ab495e62 /games/zaz/zaz.SlackBuild | |
parent | b24d78348a5675c8971499d148b9b4dd01e89f00 (diff) |
games/zaz: Man page, leftie mousing, new-style icons.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/zaz/zaz.SlackBuild')
-rw-r--r-- | games/zaz/zaz.SlackBuild | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/games/zaz/zaz.SlackBuild b/games/zaz/zaz.SlackBuild index b6ff797b11d61..66bbc814d1f4a 100644 --- a/games/zaz/zaz.SlackBuild +++ b/games/zaz/zaz.SlackBuild @@ -22,11 +22,19 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230701 bkw: Modified by SlackBuilds.org, BUILD=2: +# - move binary to /usr/games. +# - new-style (prescaled) icons. +# - write and add man page. +# - patch for left-handed mouse users (disable SDL DGA mouse by default). +# - remove junk from doc dir. +# All this stuff is being done with the approval of the maintainer (MLanden). + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=zaz VERSION=${VERSION:-1.0.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -38,9 +46,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 @@ -50,7 +55,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} - if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -74,31 +78,47 @@ rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20230703 bkw: SDL 1.x apps don't always play nice with left-handed +# mouse users. This makes SDL respect the button mappings set with +# xmodmap. It doesn't cause any harm for righties, either. Thanks +# to redruM on libera ##slackware for pointing this out. +patch -p1 < $CWD/disable_sdl_dga_mouse.diff + +# 20230703 bkw: In case someone doesn't have /usr/games in $PATH: +sed -i '/Exec=/s,zaz,/usr/games/zaz,' extra/zaz.desktop LDFLAGS="-lvorbis" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --bindir=/usr/games \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG - -find $PKG | xargs 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 AUTHORS COPYING ChangeLog INSTALL NEWS README \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +make install-strip DESTDIR=$PKG + +mkdir -p $PKG/usr/man/man6 +gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz + +# 20230703 bkw: prescaled new-style icons. +for px in 16 22 32 48 64; do + size="${px}x${px}" + dir=$PKG/usr/share/icons/hicolor/$size/apps + mkdir -p $dir + convert -resize $size extra/zaz.xpm $dir/zaz.png +done + +# 20230701 bkw: docs already installed. INSTALL is generic GNU "how to +# run configure" and NEWS is a 0-byte placeholder, don't need. +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +rm $PKGDOC/{INSTALL,NEWS} +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |