From 3d984cfd668418106988704c5ce9f4854d61654a Mon Sep 17 00:00:00 2001 From: Charles Daniels Date: Thu, 27 Feb 2020 22:18:00 +0700 Subject: games/roll: Added (Dice game). Signed-off-by: Willy Sudiarto Raharjo --- games/roll/README | 6 +++ games/roll/roll.SlackBuild | 103 +++++++++++++++++++++++++++++++++++++++++++++ games/roll/roll.info | 10 +++++ games/roll/slack-desc | 18 ++++++++ 4 files changed, 137 insertions(+) create mode 100644 games/roll/README create mode 100644 games/roll/roll.SlackBuild create mode 100644 games/roll/roll.info create mode 100644 games/roll/slack-desc (limited to 'games') diff --git a/games/roll/README b/games/roll/README new file mode 100644 index 0000000000..1c18407a0c --- /dev/null +++ b/games/roll/README @@ -0,0 +1,6 @@ +roll is a program to roll dices specified in a simple and intuitive way. + +Rolls a user-defined dice sequence. The dices to roll are defined using +dN where N is the number of sides. Dices can be rolled multiple times by +prepending the number of repetitions (e.g., 3d6) and used in simple +mathematical expressions (e.g., 2d8+4). diff --git a/games/roll/roll.SlackBuild b/games/roll/roll.SlackBuild new file mode 100644 index 0000000000..272b5dd23c --- /dev/null +++ b/games/roll/roll.SlackBuild @@ -0,0 +1,103 @@ +#!/bin/sh + +# Slackware build script for roll + +# Copyright 2020, Charles Daniels, 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=roll +VERSION=${VERSION:-2.5.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +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 $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +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 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +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 + +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 + + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING COPYRIGHT ChangeLog INSTALL NEWS README TODO \ + $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/roll/roll.info b/games/roll/roll.info new file mode 100644 index 0000000000..cf6e5340db --- /dev/null +++ b/games/roll/roll.info @@ -0,0 +1,10 @@ +PRGNAM="roll" +VERSION="2.5.0" +HOMEPAGE="http://matteocorti.github.io/roll/" +DOWNLOAD="https://github.com/matteocorti/roll/releases/download/v2.5.0/roll-2.5.0.tar.gz" +MD5SUM="0f52ff33c95d36dcbbcef2d4943227b6" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Charles Daniels" +EMAIL="charles@cdaniels.net" diff --git a/games/roll/slack-desc b/games/roll/slack-desc new file mode 100644 index 0000000000..94ea7bdee1 --- /dev/null +++ b/games/roll/slack-desc @@ -0,0 +1,18 @@ +# 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 ':'. + + |-----handy-ruler------------------------------------------------------| +roll: roll (program to roll dices specified in a simple and intuitive way) +roll: +roll: Rolls a user-defined dice sequence. The dices to roll are defined +roll: using dN where N is the number of sides. Dices can be rolled multiple +roll: times by prepending the number of repetitions (e.g., 3d6) and used +roll: in simple mathematical expressions (e.g., 2d8+4). +roll: +roll: Homepage: http://matteocorti.github.io/roll/ +roll: +roll: -- cgit v1.2.3