aboutsummaryrefslogtreecommitdiff
path: root/libraries/librcd/librcd.SlackBuild
diff options
context:
space:
mode:
authorgshep <shepelev.georgy@googlemail.com>2010-05-13 00:58:57 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:58:57 +0200
commit8a9b7ce9f039fc66bd39e846be8dc8a18bcf2ea2 (patch)
tree88ee630e7e79d3679c9e8cb6aeae0610abcae747 /libraries/librcd/librcd.SlackBuild
parent263f3afadbaff78652c9a577c218ca5de6547bba (diff)
libraries/librcd: Added to 13.0 repository
Diffstat (limited to 'libraries/librcd/librcd.SlackBuild')
-rw-r--r--libraries/librcd/librcd.SlackBuild73
1 files changed, 73 insertions, 0 deletions
diff --git a/libraries/librcd/librcd.SlackBuild b/libraries/librcd/librcd.SlackBuild
new file mode 100644
index 000000000000..df5f505c7bdd
--- /dev/null
+++ b/libraries/librcd/librcd.SlackBuild
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Slackware build script for librcd (Russian Charset Detection Library)
+
+# Copyright 2009 Georgy Shepelev <shepelev.georgy@googlemail.com>
+# Redistribution and use of this script are under GNU GPL, version 2 or newer.
+
+PRGNAM=librcd
+VERSION=${VERSION:-0.1.11}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+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"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-static=${WITHSTATIC:-no} \
+ --build=$ARCH-slackware-linux
+
+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 || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
+cp -a \
+ AUTHORS COPYING ChangeLog INSTALL NEWS README VERSION \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ examples/example.c examples/input.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION/examples
+find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \;
+
+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}