summaryrefslogtreecommitdiff
path: root/libraries/xapian-core/xapian-core.SlackBuild
diff options
context:
space:
mode:
authortitopoquito <titopoquito@cooltoad.com>2010-05-11 14:56:26 +0200
committerEric Hameleers <alien@slackbuilds.org>2010-05-11 14:56:26 +0200
commit980d781ba20bf8ca79a3e72daaa964fce4d611b9 (patch)
tree4b0d1bdf87d78b325c34dd96aa78cfb3a2230e0d /libraries/xapian-core/xapian-core.SlackBuild
parenta48fedc767c3d8f729ba75d76e273a4929183df9 (diff)
downloadslackbuilds-980d781ba20bf8ca79a3e72daaa964fce4d611b9.tar.gz
libraries/xapian-core: Initial import
Diffstat (limited to 'libraries/xapian-core/xapian-core.SlackBuild')
-rw-r--r--libraries/xapian-core/xapian-core.SlackBuild87
1 files changed, 87 insertions, 0 deletions
diff --git a/libraries/xapian-core/xapian-core.SlackBuild b/libraries/xapian-core/xapian-core.SlackBuild
new file mode 100644
index 0000000000..75864991a6
--- /dev/null
+++ b/libraries/xapian-core/xapian-core.SlackBuild
@@ -0,0 +1,87 @@
+#!/bin/sh
+# Slackware build script for xapian-core
+# Copyright 2007 by titopoquito (titopoquito@cooltoad.com)
+# 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.
+# ---------------------------------------------------------------------------
+# Modified by the SlackBuilds.org Project
+
+# Exit on most errors
+set -e
+
+PRGNAM=xapian-core # replace with name of program
+VERSION=0.9.10 # replace with version of program
+ARCH=${ARCH:-i486} # this should not change
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo} # the "_SBo" is required
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS HACKING PLATFORMS README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# some doc files have been copied to $PKG/usr/share/doc, move them over to
+# /usr/doc so that they will be in $PRGNAM-$VERSION and not in $PRGNAM
+mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/doc
+
+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.tgz