summaryrefslogtreecommitdiffstats
path: root/source/a/mcelog/mcelog.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/mcelog/mcelog.SlackBuild')
-rwxr-xr-xsource/a/mcelog/mcelog.SlackBuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/source/a/mcelog/mcelog.SlackBuild b/source/a/mcelog/mcelog.SlackBuild
index 1f5e1d7b8..54e992f49 100755
--- a/source/a/mcelog/mcelog.SlackBuild
+++ b/source/a/mcelog/mcelog.SlackBuild
@@ -1,7 +1,6 @@
+#!/bin/bash
-#!/bin/sh
-
-# Copyright 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,10 +20,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=mcelog
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -36,9 +36,16 @@ 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -59,11 +66,14 @@ find . \
zcat $CWD/mcelog.init.diff.gz | patch -p1 --verbose || exit 1
+# Include a commit from upstream git
+zcat $CWD/0001-mcelog-Change-name-of-skylake-interconnect-from-QPI-.patch.gz | patch -p1 --verbose || exit 1
+
make $NUMJOBS DOCDIR=/usr/doc/mcelog-$VERSION MANDIR=/usr/man \
|| make DOCDIR=/usr/doc/mcelog-$VERSION MANDIR=/usr/man \
|| exit 1
-make install DOCDIR=/usr/doc/mcelog-$VERSION MANDIR=/usr/man DESTDIR=$PKG
+make install DOCDIR=/usr/doc/mcelog-$VERSION MANDIR=/usr/man DESTDIR=$PKG || exit 1
mv $PKG/etc/mcelog/mcelog.conf $PKG/etc/mcelog/mcelog.conf.new
rm -f $PKG/etc/mcelog/*~