summaryrefslogtreecommitdiffstats
path: root/system/xorgxrdp/xorgxrdp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/xorgxrdp/xorgxrdp.SlackBuild')
-rw-r--r--system/xorgxrdp/xorgxrdp.SlackBuild94
1 files changed, 94 insertions, 0 deletions
diff --git a/system/xorgxrdp/xorgxrdp.SlackBuild b/system/xorgxrdp/xorgxrdp.SlackBuild
new file mode 100644
index 0000000000..de59d724ad
--- /dev/null
+++ b/system/xorgxrdp/xorgxrdp.SlackBuild
@@ -0,0 +1,94 @@
+#!/bin/bash
+
+# Slackware build script for xorgxrdp
+# Inspired by Phillip Warner <pc_warner@yahoo.com>
+# Written by David Allen <david.a58@optusnet.com.au>
+
+# 20220414 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - add SlackBuild to doc dir.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=xorgxrdp
+VERSION=${VERSION:-0.2.12}
+BUILD=${BUILD:-2}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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}
+
+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 {} \+
+
+# uses autoreconf now
+autoreconf -vfi
+
+CFLAGS="$SLKCFLAGS" \
+CPPFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --disable-static
+
+make
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README.md $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
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+# Let's not clobber existing config
+mv etc/X11/xrdp/xorg.conf etc/X11/xrdp/xorg.conf.new
+
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE