summaryrefslogtreecommitdiffstats
path: root/system/virt-viewer/virt-viewer.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/virt-viewer/virt-viewer.SlackBuild')
-rw-r--r--system/virt-viewer/virt-viewer.SlackBuild48
1 files changed, 30 insertions, 18 deletions
diff --git a/system/virt-viewer/virt-viewer.SlackBuild b/system/virt-viewer/virt-viewer.SlackBuild
index 7966171cf5..c0601c673f 100644
--- a/system/virt-viewer/virt-viewer.SlackBuild
+++ b/system/virt-viewer/virt-viewer.SlackBuild
@@ -1,13 +1,16 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for virt-viewer
# Written by Zak B. Elep, <zakame@zakame.net>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=virt-viewer
-VERSION=${VERSION:-7.0}
+VERSION=${VERSION:-10.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -17,7 +20,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -48,7 +58,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
@@ -58,19 +68,21 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux \
- --disable-update-mimedb \
- --enable-static=no \
- $SPICEGTK
-
-make
-make install-strip DESTDIR=$PKG
+mkdir build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --buildtype=release
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
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
@@ -92,4 +104,4 @@ 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}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE