2011-05-17 21:32:48 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for libpst
|
|
|
|
|
2012-05-01 04:19:36 +02:00
|
|
|
# Copyright 2011-2012 Roberto Neri, Palermo, Italy
|
|
|
|
#
|
|
|
|
# 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.
|
2011-05-17 21:32:48 +02:00
|
|
|
|
2018-09-17 20:24:55 +02:00
|
|
|
# 20180917 bkw: upgrade to 0.6.72
|
|
|
|
|
2017-01-22 17:19:58 +01:00
|
|
|
# 20170122 bkw:
|
|
|
|
# - upgrade to 0.6.69
|
|
|
|
|
2016-10-18 02:42:18 +02:00
|
|
|
# 20161017 bkw:
|
|
|
|
# - upgrade to 0.6.68
|
|
|
|
|
2016-08-03 08:02:24 +02:00
|
|
|
# 20160803 bkw:
|
|
|
|
# - upgrade to 0.6.67
|
|
|
|
|
2015-05-13 09:05:23 +02:00
|
|
|
# 20150513 bkw:
|
|
|
|
# - upgrade to 0.6.64
|
|
|
|
|
2014-03-14 10:41:22 +01:00
|
|
|
# 20140314 bkw
|
|
|
|
# - took over maintenance
|
|
|
|
# - upgrade to 0.6.63
|
|
|
|
# - make install-strip instead of slow find stuff
|
|
|
|
|
2011-05-17 21:32:48 +02:00
|
|
|
PRGNAM=libpst
|
2018-09-17 20:24:55 +02:00
|
|
|
VERSION=${VERSION:-0.6.72}
|
2011-05-17 21:32:48 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2016-08-19 11:00:10 +02:00
|
|
|
i?86) ARCH=i586 ;;
|
2011-05-17 21:32:48 +02:00
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2016-08-19 11:00:10 +02:00
|
|
|
if [ "$ARCH" = "i586" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
2011-05-17 21:32:48 +02:00
|
|
|
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 .
|
2018-09-17 20:24:55 +02:00
|
|
|
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
|
|
|
|
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
|
|
|
|
|
|
|
|
# 20180917 bkw: libpst supposedly supports python3 now, but python3
|
|
|
|
# builds fail. Not tried to diagnose it, just reverting to python2,
|
|
|
|
# like previous versions of libpst used.
|
|
|
|
# ./configure --help claims that I can set PYTHON_VERSION in the environment
|
|
|
|
# and it'll use that, but it doesn't work. So I have to use this abomination:
|
|
|
|
sed -i 's,\<python3\..\>,,g' m4/ax_python.m4
|
|
|
|
|
|
|
|
autoreconf -if
|
2011-05-17 21:32:48 +02:00
|
|
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--enable-dii \
|
|
|
|
--disable-static \
|
|
|
|
--enable-libpst-shared \
|
|
|
|
--enable-python \
|
|
|
|
--build=$ARCH-slackware-linux
|
|
|
|
|
|
|
|
make
|
2012-12-02 18:34:08 +01:00
|
|
|
# ./configure options --docdir and --htmldir have no effect,
|
2011-05-17 21:32:48 +02:00
|
|
|
# it is necessary to override "htmldir" and "htmldeveldir"
|
2014-03-14 10:41:22 +01:00
|
|
|
make install-strip DESTDIR=$PKG \
|
2011-05-17 21:32:48 +02:00
|
|
|
htmldir=/usr/doc/$PRGNAM-$VERSION \
|
|
|
|
htmldeveldir=/usr/doc/$PRGNAM-$VERSION/devel
|
|
|
|
|
2018-09-17 20:24:55 +02:00
|
|
|
gzip -9 $PKG/usr/man/man?/*.?
|
2011-05-17 21:32:48 +02:00
|
|
|
|
2013-11-22 08:34:22 +01:00
|
|
|
# Package documentation has aready been copied
|
2011-05-17 21:32:48 +02:00
|
|
|
# into $PKG/usr/doc/$PRGNAM-$VERSION by "make install"
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|