2010-08-14 21:49:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for remmina
|
|
|
|
|
|
|
|
# Written by Luis Henrique <lmello.009@gmail.com>
|
2012-02-19 19:07:03 +01:00
|
|
|
# with contributions for the 1.x branch by Niels Horn <niels.horn@gmail.com>
|
2010-08-14 21:49:34 +02:00
|
|
|
|
|
|
|
PRGNAM=remmina
|
2013-11-19 10:48:30 +01:00
|
|
|
VERSION=${VERSION:-20131008_26b814a}
|
2014-05-02 17:24:32 +02:00
|
|
|
BUILD=${BUILD:-1}
|
2010-08-14 21:49:34 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2012-02-19 19:07:03 +01:00
|
|
|
SRCNAM=Remmina
|
2013-11-19 10:48:30 +01:00
|
|
|
#UNTARDIR=FreeRDP-$SRCNAM-356c033
|
2012-02-19 19:07:03 +01:00
|
|
|
|
2013-11-19 10:48:30 +01:00
|
|
|
AVAHI=${AVAHI:-OFF}
|
|
|
|
TELEPATHY=${TELEPATHY:-OFF}
|
|
|
|
VTE3=${VTE3:-OFF}
|
2012-02-19 19:07:03 +01:00
|
|
|
|
2010-08-14 21:49:34 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
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"
|
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
fi
|
|
|
|
|
2012-02-19 19:07:03 +01:00
|
|
|
set -e
|
2010-08-14 21:49:34 +02:00
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
2013-11-19 10:48:30 +01:00
|
|
|
#rm -rf $UNTARDIR
|
|
|
|
#tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
|
|
|
|
#cd $UNTARDIR
|
|
|
|
rm -rf $SRCNAM-$VERSION
|
|
|
|
tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
|
|
|
|
cd $SRCNAM-$VERSION
|
2010-08-14 21:49:34 +02:00
|
|
|
chown -R root:root .
|
2013-11-19 10:48:30 +01:00
|
|
|
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 {} \;
|
2010-08-14 21:49:34 +02:00
|
|
|
|
2012-02-19 19:07:03 +01:00
|
|
|
# Fix libdirsuffix in CMakeLists.txt
|
2013-11-19 10:48:30 +01:00
|
|
|
sed "s|/lib/remmina|/lib$LIBDIRSUFFIX/remmina|g" -i CMakeLists.txt || exit 1
|
|
|
|
|
|
|
|
# Apply a whole lotta patches (if available)...
|
|
|
|
[ -d $CWD/patches ] && for i in $CWD/patches/*; do patch -p1 -i $i ; done
|
|
|
|
|
|
|
|
# appindicator support must explicitly be disabled because it's detected in
|
|
|
|
# but the version is not high enough.
|
2012-02-19 19:07:03 +01:00
|
|
|
mkdir -p build
|
|
|
|
cd build
|
|
|
|
cmake \
|
|
|
|
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
|
|
|
|
-DWITH_AVAHI=${AVAHI} \
|
|
|
|
-DWITH_TELEPATHY=${TELEPATHY} \
|
2013-11-19 10:48:30 +01:00
|
|
|
-DWITH_VTE=${VTE3} \
|
2012-07-25 13:11:53 +02:00
|
|
|
-DWITH_APPINDICATOR=OFF \
|
2012-02-19 19:07:03 +01:00
|
|
|
-DCMAKE_BUILD_TYPE=Release ..
|
2010-08-14 21:49:34 +02:00
|
|
|
|
2013-06-22 07:30:46 +02:00
|
|
|
make VERBOSE=1
|
2012-02-19 19:07:03 +01:00
|
|
|
make install DESTDIR=$PKG
|
|
|
|
cd ..
|
2010-08-14 21:49:34 +02:00
|
|
|
|
2013-11-19 10:48:30 +01:00
|
|
|
# make install forgot these
|
|
|
|
cp -a remmina/include/remmina/*.h $PKG/usr/include/remmina
|
|
|
|
|
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
2010-08-14 21:49:34 +02:00
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
|
|
|
|
2013-11-19 10:48:30 +01:00
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2010-08-14 21:49:34 +02:00
|
|
|
cp -a \
|
2013-11-19 10:48:30 +01:00
|
|
|
AUTHORS COPYING ChangeLog README \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
2010-08-14 21:49:34 +02:00
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2010-11-24 23:20:18 +01:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2010-08-14 21:49:34 +02:00
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|