aboutsummaryrefslogtreecommitdiff
path: root/business/trytond/trytond.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'business/trytond/trytond.SlackBuild')
-rw-r--r--business/trytond/trytond.SlackBuild61
1 files changed, 29 insertions, 32 deletions
diff --git a/business/trytond/trytond.SlackBuild b/business/trytond/trytond.SlackBuild
index fe3ebae9dd59e..a8ec4b99fc039 100644
--- a/business/trytond/trytond.SlackBuild
+++ b/business/trytond/trytond.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for Tryton ERP server
+# Slackware build script for trytond
-# Copyright 2014, Ken Roberts, California, USA
+# Copyright 2014 Ken Roberts
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -11,19 +11,19 @@
# 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 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.
PRGNAM=trytond
-VERSION=${VERSION:-3.0.3}
+VERSION=${VERSION:-3.0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -41,10 +41,13 @@ 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"
@@ -68,24 +71,10 @@ find -L . \
python setup.py install --root=$PKG
-mkdir -p $PKG/etc/{rc.d,trytond}
-cp -f $CWD/rc.trytond $PKG/etc/rc.d/rc.trytond.new
-cp -f $TMP/$PRGNAM-$VERSION/etc/trytond.conf $PKG/etc/trytond/trytond.conf.new
-
-mkdir -p $PKG/var/{spool,log}/trytond
-
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 COPYRIGHT CHANGELOG INSTALL LICENSE README TODO $PKG/usr/doc/$PRGNAM-$VERSION/
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
-
-# Don't fail if sphinx not installed
if [ -x /usr/bin/sphinx-build ] ; then
( cd $TMP/$PRGNAM-$VERSION/doc
make html
@@ -93,13 +82,21 @@ if [ -x /usr/bin/sphinx-build ] ; then
make json
make htmlhelp
make qthelp
- PAPER=letter make latex
- mv ./_build/* $PKG/usr/doc/$PRGNAM-$VERSION/
+ PAPER=${PAPER:-letter} make latex
+ cp -a _build_/* $PKG/usr/doc/$PRGNAM-$VERSION
)
-else
- echo "Sphinx documenting program not found"
- echo "Skipping document building"
fi
+cp -a COPYRIGHT CHANGELOG INSTALL LICENSE README TODO $PKG/usr/doc/$PRGNAM-$VERSION/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+# Install the rc.trydond startup file
+install -D -m644 $CWD/rc.trytond $PKG/etc/rc.d/rc.trytond.new
+# Install the trytond.conf file
+install -D -m644 $TMP/$PRGNAM-$VERSION/etc/trytond.conf $PKG/etc/trytond.conf.new
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}