#!/bin/bash set -x CWD=$(pwd) PRGNAM=$(basename $CWD) BUILD=1 VERSION=1 ARCH="noarch" TAG=gwh TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp PREFIX=/usr # Cleaning rm -fr $PKG mkdir -p $PKG$PREFIX/share/games/quake3/baseq3 # Installation cp $CWD/{*.pk3,q3*} $PKG$PREFIX/share/games/quake3/baseq3/ chmod 0644 $PKG$PREFIX/share/games/quake3/baseq3/* # Cleaning chown -R root:root $PKG find $PKG -type f -exec chmod 644 {} \; chmod +x $PKG$PREFIX/bin/* # Packaging cd $PKG mkdir install cat < install/slack-desc $PRGNAM: $PRGNAM (Official data for ioquake3) $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: https://ioquake3.org/ $PRGNAM: EOF rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la /sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/$PRGNAM-$(echo $VERSION | tr -d '-')-$ARCH-$BUILD$TAG.txz