2010-05-11 22:54:46 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Slackware build script for filezilla
|
|
|
|
|
2010-05-13 00:36:26 +02:00
|
|
|
# Copyright 2007-2009 Grigorios Bouzakis <grbzks@xsmail.com>
|
2014-02-10 12:41:36 +01:00
|
|
|
# Copyright 2010-2014 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
|
2010-05-13 00:36:26 +02:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Permission to use, copy, modify, and distribute this software for any purpose
|
|
|
|
# with or without fee is hereby granted, provided that the above copyright
|
|
|
|
# notice and this permission notice appear in all copies.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
|
|
|
|
# AUTHORS AND COPYRIGHT HOLDERS AND THEIR CONTRIBUTORS 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.
|
2010-05-11 22:54:46 +02:00
|
|
|
|
|
|
|
PRGNAM=filezilla
|
2014-06-02 05:09:47 +02:00
|
|
|
VERSION=${VERSION:-3.8.1}
|
2010-05-11 22:54:46 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
2010-05-12 17:43:17 +02:00
|
|
|
|
2010-06-04 07:12:45 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-11 22:54:46 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
2010-05-13 00:36:26 +02:00
|
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 22:54:46 +02:00
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
2010-05-13 00:36:26 +02:00
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 22:54:46 +02:00
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
2010-05-13 00:36:26 +02:00
|
|
|
SLKCFLAGS="-O2 -fPIC"
|
|
|
|
LIBDIRSUFFIX="64"
|
2010-06-04 07:12:45 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 22:54:46 +02:00
|
|
|
fi
|
|
|
|
|
2010-07-16 03:01:23 +02:00
|
|
|
DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README GPL.html"
|
2011-05-08 06:40:33 +02:00
|
|
|
|
2010-08-16 01:39:16 +02:00
|
|
|
# Check if we have tinyxml package
|
|
|
|
if [ "${TINYXML:-no}" = "yes" ]; then
|
|
|
|
tinyxml=""
|
|
|
|
else
|
|
|
|
tinyxml="--with-tinyxml=builtin"
|
|
|
|
fi
|
2010-05-11 22:54:46 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
tar xvf $CWD/FileZilla_${VERSION}_src.tar.bz2
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
2013-11-06 02:07:52 +01:00
|
|
|
find -L . \
|
2014-02-10 12:41:36 +01:00
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
|
|
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
2013-11-06 02:07:52 +01:00
|
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
2010-05-11 22:54:46 +02:00
|
|
|
|
2011-09-06 03:47:52 +02:00
|
|
|
# Added LDFLAGS to make it compileable, thanks to LQ
|
2011-06-20 18:31:13 +02:00
|
|
|
# http://www.linuxquestions.org/questions/slackware-14/libsndfile-from-slackbuilds-org-fails-to-build-695456/
|
|
|
|
LDFLAGS="-ldl" \
|
2010-05-11 22:54:46 +02:00
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2010-05-13 00:36:26 +02:00
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
2010-05-11 22:54:46 +02:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
2010-05-12 17:43:17 +02:00
|
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
2010-05-13 00:36:26 +02:00
|
|
|
--disable-static \
|
2010-05-12 17:43:17 +02:00
|
|
|
--disable-manualupdatecheck \
|
2010-07-16 03:01:23 +02:00
|
|
|
--disable-autoupdatecheck \
|
|
|
|
--enable-locales \
|
2011-09-06 03:47:52 +02:00
|
|
|
$tinyxml \
|
|
|
|
--build=$ARCH-slackware-linux
|
2010-05-11 22:54:46 +02:00
|
|
|
|
|
|
|
make
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
2014-04-13 01:53:54 +02:00
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
2010-05-13 00:36:26 +02:00
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2010-05-11 22:54:46 +02:00
|
|
|
|
2010-07-16 03:01:23 +02:00
|
|
|
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
|
2010-05-11 22:54:46 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
|
2010-05-13 00:36:26 +02:00
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
2010-05-11 22:54:46 +02:00
|
|
|
mv $PKG/usr/share/filezilla/docs/fzdefaults.xml.example $PKG/usr/doc/$PRGNAM-$VERSION
|
2011-09-06 03:47:52 +02:00
|
|
|
# remove empty docdir
|
|
|
|
rmdir $PKG/usr/share/filezilla/docs
|
2010-05-11 22:54:46 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2010-05-12 17:43:17 +02:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2010-05-11 22:54:46 +02:00
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:36:26 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|