diff options
author | David Melik <davidnchmelik@gmail.com> | 2017-05-04 11:20:37 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-05-06 07:03:37 +0700 |
commit | 9bb6e2827e9e10737f33bca50be75f90626588ad (patch) | |
tree | 82d916c5dd6c3dc665c70fa8342945cf57fdd3cc | |
parent | 984023f6c51f44a98a3a560156c7c351d0c232f0 (diff) | |
download | slackbuilds-9bb6e2827e9e10737f33bca50be75f90626588ad.tar.gz |
games/larn: Added (adventure game).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r-- | games/larn/README | 5 | ||||
-rw-r--r-- | games/larn/larn-fixups.patch | 67 | ||||
-rw-r--r-- | games/larn/larn.SlackBuild | 94 | ||||
-rw-r--r-- | games/larn/larn.info | 10 | ||||
-rw-r--r-- | games/larn/slack-desc | 19 |
5 files changed, 195 insertions, 0 deletions
diff --git a/games/larn/README b/games/larn/README new file mode 100644 index 0000000000..c979de04c2 --- /dev/null +++ b/games/larn/README @@ -0,0 +1,5 @@ +LARN is a dungeon type adventure game similar in concept to HACK, ROGUE +or MORIA, but with a different feel and winning criteria. LARN was +released for the UNIX environment in 1986 by Noah Morgan. It was +subsequently ported to the MS-DOS environment by Don Kneller. Kevin +Routley worked on enhancements to LARN. diff --git a/games/larn/larn-fixups.patch b/games/larn/larn-fixups.patch new file mode 100644 index 0000000000..3f9d6a26d8 --- /dev/null +++ b/games/larn/larn-fixups.patch @@ -0,0 +1,67 @@ +diff -u -r larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/larn.sh larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/larn.sh +--- larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/larn.sh 2014-06-09 18:11:59.000000000 +0100 ++++ larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/larn.sh 2017-05-04 11:28:35.200638538 +0100 +@@ -1,5 +1,5 @@ + #!/bin/bash +-LARNDIR="/usr/local/share/games/larn/lib/file/" ++LARNDIR="/usr/share/games/larn/lib/file/" + SAVEDIR="$HOME/.larn/save/" + SCOREDIR="$HOME/.larn/score/" + TMPDIR="/tmp/larn" +diff -u -r larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/src/makefile larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/src/makefile +--- larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.old/src/makefile 2014-06-09 18:11:59.000000000 +0100 ++++ larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.new/src/makefile 2017-05-04 11:27:48.542897675 +0100 +@@ -58,13 +58,14 @@ + + else + +-CFLAGS=-Os -Wall -fomit-frame-pointer +-LDFLAGS=-Wl,-O1 -lncurses ++CFLAGS := -Os -Wall -fomit-frame-pointer $(CFLAGS) ++LDFLAGS := -Wl,-O1 -lncurses $(LDLAGS) + + STRIP_BINARY=yes + + endif + ++PREFIX=/usr + + OBJ=$(SRC:.c=.o) + EXE=larn +@@ -79,8 +80,7 @@ + @echo Build complete! + + ifeq ($(STRIP_BINARY),yes) +- @echo Stripping binary.. +- @strip $(EXE) ++ strip $(EXE) + endif + + .PHONY: debug +@@ -96,10 +96,11 @@ + + .PHONY : install + install: +- mkdir -p /usr/local/share/games/larn/lib/file +- cp -R ../lib/file/* /usr/local/share/games/larn/lib/file/ +- cp larn /usr/local/share/games/larn/lib/file/ +- cp ../larn.sh /usr/local/games/ ++ mkdir -p $(DESTDIR)$(PREFIX)/share/games/larn/lib/file ++ cp -R ../lib/file/* $(DESTDIR)$(PREFIX)/share/games/larn/lib/file/ ++ cp larn $(DESTDIR)$(PREFIX)/share/games/larn/lib/file/ ++ mkdir -p $(DESTDIR)$(PREFIX)/games/ ++ cp ../larn.sh $(DESTDIR)$(PREFIX)/games/ + + #.PHONY : distro + #distro: +@@ -112,8 +113,7 @@ + # @$(CP) larn.* ..\\distro\\bin + + %.o: %.c +- @echo Building $< +- @$(CC) $(CFLAGS) -o $@ -c $< ++ $(CC) $(CFLAGS) -o $@ -c $< + + $(EXE): $(OBJ) +- @$(CC) $(OBJ) $(LDFLAGS) -o $@ ++ $(CC) $(OBJ) $(LDFLAGS) -o $@ diff --git a/games/larn/larn.SlackBuild b/games/larn/larn.SlackBuild new file mode 100644 index 0000000000..cdd184e837 --- /dev/null +++ b/games/larn/larn.SlackBuild @@ -0,0 +1,94 @@ +#!/bin/sh + +# Slackware build script for larn + +# Copyright 2017 SlackBuilds.org Project, David Melik, Spokane, WA, 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. + +PRGNAM=larn +VERSION=${VERSION:-3621914} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCNAM=larn-linux +COMMIT=${COMMIT:-36219143703cced4961fdc2a435106c0aa1e0a55} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +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 -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$COMMIT +tar xvf $CWD/$SRCNAM-$COMMIT.tar.gz +cd $SRCNAM-$COMMIT +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 {} \; + +# Handle CFLAGS, DESTDIR and PREFIX in src/makefile and larn.sh +patch -p1 < $CWD/larn-fixups.patch + +cd src + CFLAGS="$SLKCFLAGS" make + make install DESTDIR=$PKG +cd .. + +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 README.md history.txt readme.txt $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/larn/larn.info b/games/larn/larn.info new file mode 100644 index 0000000000..815e00da2b --- /dev/null +++ b/games/larn/larn.info @@ -0,0 +1,10 @@ +PRGNAM="larn" +VERSION="3621914" +HOMEPAGE="https://github.com/Nebula-Mechanica/larn-linux" +DOWNLOAD="https://github.com/Nebula-Mechanica/larn-linux/archive/3621914/larn-linux-36219143703cced4961fdc2a435106c0aa1e0a55.tar.gz" +MD5SUM="fd2be902e73fd8b608034511dd9536ae" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="David Melik" +EMAIL="davidnchmelik@gmail.com" diff --git a/games/larn/slack-desc b/games/larn/slack-desc new file mode 100644 index 0000000000..864d31423e --- /dev/null +++ b/games/larn/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +larn: larn (adventure game) +larn: +larn: LARN is a dungeon type adventure game similar in concept to HACK, ROGUE +larn: or MORIA, but with a different feel and winning criteria. LARN was +larn: released for the UNIX environment in 1986 by Noah Morgan. It was +larn: subsequently ported to the MS-DOS environment by Don Kneller. Kevin +larn: Routley worked on enhancements to LARN. +larn: +larn: homepage: https://github.com/Nebula-Mechanica/larn-linux +larn: +larn: |