summaryrefslogtreecommitdiffstats
path: root/games/unnethack/unnethack.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/unnethack/unnethack.SlackBuild')
-rw-r--r--games/unnethack/unnethack.SlackBuild40
1 files changed, 27 insertions, 13 deletions
diff --git a/games/unnethack/unnethack.SlackBuild b/games/unnethack/unnethack.SlackBuild
index f749debd65..5b8d3c440d 100644
--- a/games/unnethack/unnethack.SlackBuild
+++ b/games/unnethack/unnethack.SlackBuild
@@ -22,10 +22,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220221 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - update for v6.0.4_20220203_1f061e93b.
+# - fix build on 15.0.
+# - include man pages.
+# - include Guidebook.txt in doc dir.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=unnethack
-VERSION=${VERSION:-5.2.0}
+VERSION=${VERSION:-6.0.4_20220203_1f061e93b}
SRCVERSION=$(echo $VERSION | tr _ -)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -39,9 +45,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
@@ -67,24 +70,29 @@ fi
set -e
+SRCNAM=UnNetHack
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$SRCVERSION
-tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
-cd $PRGNAM-$SRCVERSION
+rm -rf $SRCNAM-$SRCVERSION
+tar xvf $CWD/$SRCNAM-$SRCVERSION.tar.gz
+cd $SRCNAM-$SRCVERSION
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 \
+ -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+SLKCFLAGS+=" -fcommon"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --bindir=/usr/games \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
@@ -95,14 +103,20 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-curses-graphics \
--build=$ARCH-slackware-linux
-make
+make || make -j1
make install 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
+# 20220221 bkw: TODO: get these binaries out of /usr/share. They belong
+# in /usr/libexec (because they're not architecture-independent).
+strip $PKG/usr/share/$PRGNAM/{$PRGNAM,recover}
+
+mkdir -p $PKG/usr/man/man6
+for i in doc/*.6; do
+ gzip -9c < $i > $PKG/usr/man/man6/$( basename $i ).gz
+done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ChangeLog Files Porting README* $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ChangeLog Porting README* doc/Guidebook.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install