diff options
author | Rodrigo Gimenez <estrod@zoho.com> | 2017-05-26 14:03:43 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-05-27 07:31:09 +0700 |
commit | 2f1f6e643488807c94a1b2c4f5f45bca5e2768fc (patch) | |
tree | c32c101db30cd7d7d4af462cebe118b5153edbfa /network/nextcloud-client/nextcloud-client.SlackBuild | |
parent | 0317563f374e762314099b1a55e69ecfdf84b390 (diff) |
network/nextcloud-client: Added (Nextcloud Desktop Client).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/nextcloud-client/nextcloud-client.SlackBuild')
-rw-r--r-- | network/nextcloud-client/nextcloud-client.SlackBuild | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/network/nextcloud-client/nextcloud-client.SlackBuild b/network/nextcloud-client/nextcloud-client.SlackBuild new file mode 100644 index 0000000000000..50dfc1c88d29f --- /dev/null +++ b/network/nextcloud-client/nextcloud-client.SlackBuild @@ -0,0 +1,117 @@ +#!/bin/sh + +# Slackware build script for nextcloud-client + +# Copyright 2013-2016 Christopher Walker Copperas Cove, TX +# Copyright 2016-2017 Chris Abela <kristofru@gmail.com>, Malta +# Copyright 2017 Rodrigo Gimenez <estrod@zoho.com>, Argentina +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This is based on the owncloud-client slackbuild in https://slackbuilds.org + +PRGNAM=nextcloud-client +VERSION=${VERSION:-2.3.1} +OWNCLOUD_VERSION=2.3.1 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +SRCNAM=client_theming + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +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 $SRCNAM +tar xvf $CWD/client_theming-$VERSION.tar.gz +mv $SRCNAM-$VERSION $SRCNAM +cd $SRCNAM +tar xvf $CWD/client-$OWNCLOUD_VERSION.tar.gz +rmdir client +mv client-$OWNCLOUD_VERSION client + +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 {} \; + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \ + -DCMAKE_INSTALL_MANDIR=/usr/man \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc/$PRGNAM \ + -DCMAKE_BUILD_TYPE="Release" \ + -D OEM_THEME_DIR=$(realpath ../nextcloudtheme) \ + ../client + make VERBOSE=1 + make install DESTDIR=$PKG +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +[ -d "$PKG/usr/man" ] && find $PKG/usr/man -type f -exec gzip -9 '{}' \; + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cat $CWD/nextcloud.desktop > $PKG/usr/share/applications/nextcloud.desktop +mv $PKG/etc/Nextcloud/sync-exclude.lst $PKG/etc/Nextcloud/sync-exclude.lst.new + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |