2021-07-03 19:48:15 +02:00
|
|
|
#!/bin/bash
|
2010-09-17 06:52:31 +02:00
|
|
|
|
2017-03-13 23:59:47 +01:00
|
|
|
# Slackware build script for dropbox
|
|
|
|
|
|
|
|
# Copyright 2017 cmyster amit.ugol@gmail.com
|
2022-01-14 02:15:33 +01:00
|
|
|
# Copyright 2019-2022 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
|
2010-09-17 06:52:31 +02:00
|
|
|
# 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.
|
|
|
|
|
2017-03-13 23:59:47 +01:00
|
|
|
|
2017-04-18 18:47:20 +02:00
|
|
|
# Public changelog can be found in: https://www.dropboxforum.com
|
2019-11-01 05:04:48 +01:00
|
|
|
# Source for x86: https://www.dropbox.com/download?plat=lnx.x86
|
|
|
|
# Source for x86_64: https://www.dropbox.com/download?plat=lnx.x86_64
|
2010-09-17 06:52:31 +02:00
|
|
|
|
2021-07-04 11:41:06 +02:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2010-09-17 06:52:31 +02:00
|
|
|
PRGNAM=dropbox
|
2022-01-14 02:15:33 +01:00
|
|
|
VERSION=${VERSION:-139.4.4896}
|
2010-09-17 06:52:31 +02:00
|
|
|
BUILD=${BUILD:-1}
|
2013-04-24 13:14:16 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 12:23:38 +02:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2010-09-17 06:52:31 +02:00
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2016-08-06 01:24:38 +02:00
|
|
|
i?86) ARCH=i586 ;;
|
2010-09-17 06:52:31 +02:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2021-07-04 12:23:38 +02:00
|
|
|
# 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
|
|
|
|
|
2010-09-17 06:52:31 +02:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2017-03-13 23:59:47 +01:00
|
|
|
case "$ARCH" in
|
|
|
|
x86_64) EXTPACKNAME="_64" ;;
|
|
|
|
*) EXTPACKNAME="" ;;
|
|
|
|
esac
|
2015-02-06 12:54:43 +01:00
|
|
|
|
2010-09-17 06:52:31 +02:00
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
2017-03-13 23:59:47 +01:00
|
|
|
mkdir -p $TMP $PKG
|
2010-09-17 06:52:31 +02:00
|
|
|
cd $TMP
|
2017-03-13 23:59:47 +01:00
|
|
|
rm -rf $PRGNAM
|
|
|
|
mkdir $PRGNAM
|
|
|
|
cd $PRGNAM
|
|
|
|
tar xvf $CWD/$PRGNAM-lnx.x86$EXTPACKNAME-$VERSION.tar.gz
|
|
|
|
cd .dropbox-dist
|
2010-09-17 06:52:31 +02:00
|
|
|
chown -R root:root .
|
2013-11-22 08:37:19 +01:00
|
|
|
find -L . \
|
2014-05-24 02:17:30 +02:00
|
|
|
\( -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 \
|
2014-09-16 07:44:12 +02:00
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
2010-09-17 06:52:31 +02:00
|
|
|
|
2017-03-13 23:59:47 +01:00
|
|
|
mkdir -p $PKG/opt/dropbox $PKG/usr/bin
|
|
|
|
cp -R . $PKG/opt/dropbox
|
2011-12-18 06:40:06 +01:00
|
|
|
ln -s /opt/dropbox/dropboxd $PKG/usr/bin/dropboxd
|
2010-09-17 06:52:31 +02:00
|
|
|
install -D -m 644 $CWD/dropbox.desktop $PKG/usr/share/applications/dropbox.desktop
|
|
|
|
install -D -m 644 $CWD/dropbox.png $PKG/usr/share/pixmaps/dropbox.png
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
2016-07-06 07:15:26 +02:00
|
|
|
cp $CWD/policies $PKG/usr/doc/$PRGNAM-$VERSION/
|
2017-03-13 23:59:47 +01:00
|
|
|
cp $CWD/folders $PKG/usr/doc/$PRGNAM-$VERSION/
|
2014-05-24 02:17:30 +02:00
|
|
|
cp $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION/
|
2010-09-17 06:52:31 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
2021-07-04 12:23:38 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|