summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorNiels Horn <niels.horn@gmail.com>2010-05-13 01:00:50 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 01:00:50 +0200
commit9de55a8d377188eb3c2d5644f84cbc0177c66a63 (patch)
tree09b1831227a845e5e3aab34e15e610a9ec22367e /system
parent8e11779e5235ee6f96600dc90b701e876c7efd12 (diff)
downloadslackbuilds-9de55a8d377188eb3c2d5644f84cbc0177c66a63.tar.gz
system/hercules: Added to 13.0 repository
Diffstat (limited to 'system')
-rw-r--r--system/hercules/README7
-rw-r--r--system/hercules/doinst.sh19
-rw-r--r--system/hercules/hercules.SlackBuild100
-rw-r--r--system/hercules/hercules.desktop10
-rw-r--r--system/hercules/hercules.info10
-rw-r--r--system/hercules/hercules.pngbin0 -> 317 bytes
-rw-r--r--system/hercules/moddir.patch11
-rw-r--r--system/hercules/slack-desc19
8 files changed, 176 insertions, 0 deletions
diff --git a/system/hercules/README b/system/hercules/README
new file mode 100644
index 0000000000..8b85852494
--- /dev/null
+++ b/system/hercules/README
@@ -0,0 +1,7 @@
+Hercules: The System/370, ESA/390 and z/Architecture Emulator
+
+Hercules is an open source software implementation of the mainframe
+System/370 and ESA/390 architectures, in addition to the new 64-bit
+z/Architecture.
+
+Hercules can be used to run Slack/390.
diff --git a/system/hercules/doinst.sh b/system/hercules/doinst.sh
new file mode 100644
index 0000000000..aa581e5aa4
--- /dev/null
+++ b/system/hercules/doinst.sh
@@ -0,0 +1,19 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/hercules.cnf.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/system/hercules/hercules.SlackBuild b/system/hercules/hercules.SlackBuild
new file mode 100644
index 0000000000..63dea84a6a
--- /dev/null
+++ b/system/hercules/hercules.SlackBuild
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Slackware build script for Hercules:
+# the System/370, ESA/390 and z/Architecture emulator
+
+# Written by Niels Horn - niels.horn@gmail.com
+# revision date 2009/12/19
+
+set -e
+
+PRGNAM=hercules
+VERSION=${VERSION:-svn_20091219}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+rm -rf $TMP/$PRGNAM-$VERSION $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Apply patch to resolve directory of Hercules modules in x86_64
+patch -p1 < $CWD/moddir.patch
+
+# Generate configure etc. first...
+sh autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-external-gui \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
+)
+
+# Copy standard configuration file to /etc
+mkdir -p $PKG/etc
+cat hercules.cnf > $PKG/etc/hercules.cnf.new
+
+# Copy icon & desktop file to package
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/hercules.desktop > $PKG/usr/share/applications/hercules.desktop
+cat $CWD/hercules.png > $PKG/usr/share/pixmaps/hercules.png
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
+cp -a \
+ ABOUT-NLS CHANGES COPYRIGHT INSTALL README.* RELEASE.NOTES \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# The hercules Makefile does not accept the docdir correctly for the html files
+# so we move them manually
+mv $PKG/usr/share/hercules/*.{html,css} $PKG/usr/doc/$PRGNAM-$VERSION/html/
+mv $PKG/usr/share/hercules/images $PKG/usr/doc/$PRGNAM-$VERSION/html/
+mv $PKG/usr/share/hercules/include $PKG/usr/doc/$PRGNAM-$VERSION/html/
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/hercules/hercules.desktop b/system/hercules/hercules.desktop
new file mode 100644
index 0000000000..69b4e4b414
--- /dev/null
+++ b/system/hercules/hercules.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Hercules
+Comment=Hercules System/370, ESA/390 and z/Architecture Emulator
+Categories=System;
+Exec=xterm -e hercules -f /etc/hercules.cnf
+Icon=hercules
+Terminal=false
+StartupNotify=false
diff --git a/system/hercules/hercules.info b/system/hercules/hercules.info
new file mode 100644
index 0000000000..fa3a0b4dec
--- /dev/null
+++ b/system/hercules/hercules.info
@@ -0,0 +1,10 @@
+PRGNAM="hercules"
+VERSION="svn_20091219"
+HOMEPAGE="http://www.hercules-390.org/"
+DOWNLOAD="http://www.nielshorn.net/_download/hercules-svn_20091219.tar.gz"
+MD5SUM="1f48dbcfedcb098e7223dddc82915b9b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Niels Horn"
+EMAIL="niels.horn@gmail.com"
+APPROVED="dsomero"
diff --git a/system/hercules/hercules.png b/system/hercules/hercules.png
new file mode 100644
index 0000000000..feae70b4c4
--- /dev/null
+++ b/system/hercules/hercules.png
Binary files differ
diff --git a/system/hercules/moddir.patch b/system/hercules/moddir.patch
new file mode 100644
index 0000000000..ade0662da4
--- /dev/null
+++ b/system/hercules/moddir.patch
@@ -0,0 +1,11 @@
+--- hercules-svn_20091219.orig/configure.ac 2009-12-19 09:41:19.000000000 -0200
++++ hercules-svn_20091219/configure.ac 2009-12-19 13:35:17.000000000 -0200
+@@ -1809,7 +1809,7 @@
+ fi
+ fi
+
+-MODULESDIR="${DESTPREFIX}/lib/${PACKAGE}"
++MODULESDIR="${libdir}/${PACKAGE}"
+ PKGDATADIR="${DESTPREFIX}/share/${PACKAGE}"
+ HERC_LOCALEDIR="${DESTPREFIX}/share/locale"
+
diff --git a/system/hercules/slack-desc b/system/hercules/slack-desc
new file mode 100644
index 0000000000..27a07cf78f
--- /dev/null
+++ b/system/hercules/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+hercules: Hercules (System/370, ESA/390 and z/Architecture Emulator)
+hercules:
+hercules: Hercules is an open source software implementation of the mainframe
+hercules: System/370 and ESA/390 architectures, in addition to the new 64-bit
+hercules: z/Architecture.
+hercules:
+hercules: http://www.hercules-390.org/
+hercules:
+hercules:
+hercules:
+hercules: