summaryrefslogtreecommitdiffstats
path: root/source/xap/gnuchess/gnuchess.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsource/xap/gnuchess/gnuchess.SlackBuild176
-rw-r--r--source/xap/gnuchess/gnuchess.SlackBuild.diff89
2 files changed, 265 insertions, 0 deletions
diff --git a/source/xap/gnuchess/gnuchess.SlackBuild b/source/xap/gnuchess/gnuchess.SlackBuild
new file mode 100755
index 000000000..2b236ae40
--- /dev/null
+++ b/source/xap/gnuchess/gnuchess.SlackBuild
@@ -0,0 +1,176 @@
+#!/bin/sh
+
+# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, 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.
+
+
+VERGNUCHESS=5.07
+VERSJENG=11.2
+VEREBOARD=1.0.3
+VERXBOARD=4.2.7
+ARCH=${ARCH:-x86_64}
+BUILD=${BUILD:-4}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=/tmp/package-gnuchess
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+### gnuchess
+cd $TMP
+rm -rf gnuchess-$VERGNUCHESS
+tar xvf $CWD/gnuchess-$VERGNUCHESS.tar.bz2 || exit 1
+cd gnuchess-$VERGNUCHESS || exit 1
+# make gnuchess compile with gcc4
+zcat $CWD/gnuchess.gcc4_fix.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ $ARCH-slackware-linux
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/gnuchess-$VERGNUCHESS
+cp -a \
+ doc/README \
+ AUTHORS COPYING INSTALL NEWS TODO \
+ $PKG/usr/doc/gnuchess-$VERGNUCHESS
+
+### Sjeng
+cd $TMP
+rm -rf Sjeng-Free-$VERSJENG
+tar xvf $CWD/Sjeng-Free-$VERSJENG.tar.bz2 || exit 1
+cd Sjeng-Free-$VERSJENG || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ $ARCH-slackware-linux
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/Sjeng-Free-$VERSJENG
+cp -a \
+ AUTHORS BUGS COPYING NEWS README THANKS TODO \
+ $PKG/usr/doc/Sjeng-Free-$VERSJENG
+
+### eboard
+cd $TMP
+rm -rf eboard-$VEREBOARD
+tar xvf $CWD/eboard-$VEREBOARD.tar.bz2 || exit 1
+cd eboard-$VEREBOARD || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+./configure \
+ --prefix=/usr \
+ --extra-flags=$(echo $SLKCFLAGS | sed -e "y/ /:/")
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/eboard-$VEREBOARD
+cp -a \
+ AUTHORS COPYING README TODO Documentation/*.txt \
+ $PKG/usr/doc/eboard-$VEREBOARD
+
+### XBoard
+cd $TMP
+rm -rf xboard-$VERXBOARD
+tar xvf $CWD/xboard-$VERXBOARD.tar.bz2 || exit 1
+cd xboard-$VERXBOARD || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# --infodir is fubar.
+zcat $CWD/xboard.infodir.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+# Taken from Debian to fix CVE-2004-2552
+# FOR WHICH THERE IS NO ATTACK VECTOR!!!
+zcat $CWD/xboard.buffer_overflow_fix.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --infodir=/usr/info \
+ --enable-zippy \
+ --build=$ARCH-slackware-linux
+make $NUMJOBS || make || exit 1
+install -c -s xboard $PKG/usr/bin/xboard
+install -c -s zic2xpm $PKG/usr/bin/zic2xpm
+install -c cmail $PKG/usr/bin/cmail
+install -c ./pxboard $PKG/usr/bin/pxboard
+install -c -m 644 ./xboard.man $PKG/usr/man/man6/xboard.6
+install -c -m 644 ./zic2xpm.man $PKG/usr/man/man6/zic2xpm.6
+mkdir -p $PKG/usr/info
+install -c -m 644 xboard.info $PKG/usr/info/xboard.info
+mkdir -p $PKG/usr/doc/xboard-$VERXBOARD
+cp -a \
+ AUTHORS COPYING COPYRIGHT FAQ FAQ.html NEWS READ_ME \
+ $PKG/usr/doc/xboard-$VERXBOARD
+
+### Finish up...
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+gzip -9 $PKG/usr/info/*.info
+mkdir -p $PKG/usr/share/pixmaps
+cat $CWD/chess.png > $PKG/usr/share/pixmaps/chess.png
+mkdir -p $PKG/usr/share/applications
+cat $CWD/eboard.desktop > $PKG/usr/share/applications/eboard.desktop
+cat $CWD/xboard.desktop > $PKG/usr/share/applications/xboard.desktop
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gnuchess-$VERGNUCHESS-$ARCH-$BUILD.txz
+
diff --git a/source/xap/gnuchess/gnuchess.SlackBuild.diff b/source/xap/gnuchess/gnuchess.SlackBuild.diff
new file mode 100644
index 000000000..0112a9d22
--- /dev/null
+++ b/source/xap/gnuchess/gnuchess.SlackBuild.diff
@@ -0,0 +1,89 @@
+--- gnuchess.SlackBuild 2006-04-04 03:47:10.000000000 +0300
++++ gnuchess.SlackBuild 2007-05-08 17:06:11.000000000 +0300
+@@ -4,10 +4,10 @@
+
+ VERGNUCHESS=5.07
+ VERSJENG=11.2
+-VEREBOARD=0.9.5
++VEREBOARD=1.0.3
+ VERXBOARD=4.2.7
+ ARCH=${ARCH:-i486}
+-BUILD=${BUILD:-2}
++BUILD=${BUILD:-3}
+
+ if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+@@ -27,6 +27,8 @@
+ rm -rf gnuchess-$VERGNUCHESS
+ tar xjvf $CWD/gnuchess-$VERGNUCHESS.tar.bz2
+ cd gnuchess-$VERGNUCHESS
++# make gnuchess compile with gcc4
++zcat $CWD/gnuchess.gcc4_fix.diff.gz | patch -p1 --verbose --backup --suffix=.orig
+ chown -R root:root .
+ find . -perm 664 -exec chmod 644 {} \;
+ find . -perm 600 -exec chmod 644 {} \;
+@@ -93,33 +95,13 @@
+ find . -perm 511 -exec chmod 755 {} \;
+ find . -perm 711 -exec chmod 755 {} \;
+ find . -perm 555 -exec chmod 755 {} \;
+-CFLAGS="$SLKCFLAGS" \
+ ./configure \
+- --prefix=/usr
++ --prefix=/usr --extra-flags=`echo $SLKCFLAGS | sed -e "y/ /:/"`
+ make -j3
+-#make install DESTDIR=$PKG
+-install -d $PKG/usr/bin
+-install -m 0755 eboard $PKG/usr/bin/eboard
+-install -m 0755 eboard-config $PKG/usr/bin/eboard-config
+-install -m 0755 eboard-addtheme $PKG/usr/bin/eboard-addtheme
+-install -d $PKG/usr/man/man1
+-install -d $PKG/usr/man/man6
+-install -m 0644 eboard.6 $PKG/usr/man/man6
+-install -m 0644 eboard-addtheme.1 $PKG/usr/man/man1
+-install -m 0644 eboard-config.1 $PKG/usr/man/man1
+-install -d $PKG/usr/share/eboard
+-install -m 0644 classic.png $PKG/usr/share/eboard/classic.png
+-install -m 0644 ghouls.png $PKG/usr/share/eboard/ghouls.png
+-install -m 0644 plastic.png $PKG/usr/share/eboard/plastic.png
+-install -m 0644 eboard_themes.conf $PKG/usr/share/eboard/eboard_themes.conf
+-install -m 0644 NAG.en.txt $PKG/usr/share/eboard/NAG.en.txt
+-( cd multilang
+- install -d $PKG/usr/share/eboard
+- install -m 0644 eboard.cs.dict eboard.de.dict eboard.es.dict eboard.it.dict eboard.pt_BR.dict $PKG/usr/share/eboard
+-)
++make install DESTDIR=$PKG
+ mkdir -p $PKG/usr/doc/eboard-$VEREBOARD
+ cp -a \
+- AUTHORS COPYING README TODO \
++ AUTHORS COPYING README TODO Documentation/*.txt \
+ $PKG/usr/doc/eboard-$VEREBOARD
+
+ ### XBoard
+@@ -140,6 +122,8 @@
+ find . -perm 555 -exec chmod 755 {} \;
+ # --infodir is fubar.
+ zcat $CWD/xboard.infodir.diff.gz | patch -p1 --verbose --backup --suffix=.orig
++# Taken from Debian to fix CVE-2004-2552
++zcat $CWD/xboard.buffer_overflow_fix.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+ CFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+@@ -153,6 +137,7 @@
+ install -c ./pxboard $PKG/usr/bin/pxboard
+ install -c -m 644 ./xboard.man $PKG/usr/man/man6/xboard.6
+ install -c -m 644 ./zic2xpm.man $PKG/usr/man/man6/zic2xpm.6
++mkdir -p $PKG/usr/info
+ install -c -m 644 xboard.info $PKG/usr/info/xboard.info
+ mkdir -p $PKG/usr/doc/xboard-$VERXBOARD
+ cp -a \
+@@ -165,8 +150,9 @@
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ )
+ gzip -9 $PKG/usr/man/man?/*.?
++gzip -9 $PKG/usr/info/*.info
+ mkdir -p $PKG/usr/share/pixmaps
+-cat $CWD/chess.png > $PKG/usr/share/pixmaps/chess.png
++cp $CWD/chess.png $PKG/usr/share/pixmaps/chess.png
+ mkdir -p $PKG/usr/share/applications
+ cat $CWD/eboard.desktop > $PKG/usr/share/applications/eboard.desktop
+ cat $CWD/xboard.desktop > $PKG/usr/share/applications/xboard.desktop