summaryrefslogtreecommitdiff
path: root/development/mysqlcc/mysqlcc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/mysqlcc/mysqlcc.SlackBuild')
-rw-r--r--development/mysqlcc/mysqlcc.SlackBuild35
1 files changed, 19 insertions, 16 deletions
diff --git a/development/mysqlcc/mysqlcc.SlackBuild b/development/mysqlcc/mysqlcc.SlackBuild
index 585e9aab55..44bf15bba7 100644
--- a/development/mysqlcc/mysqlcc.SlackBuild
+++ b/development/mysqlcc/mysqlcc.SlackBuild
@@ -11,14 +11,19 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
+TMP=${TMP:-/dev/shm}
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"
fi
set -e # Exit on most errors
@@ -37,30 +42,28 @@ CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
- --localstatedir=/var
+ --mandir=/usr/man \
+ --localstatedir=/var \
+ --with-qt=/opt/kde3/lib/qt3/ \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --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
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
+mkdir -p $PKG/usr/bin
+cp -a mysqlcc $PKG/usr/bin
+strip --strip-unneeded $PKG/usr/bin/mysqlcc
+
+mkdir -p $PKG/usr/share/$PRGNAM
+cp -a *.wav syntax.txt $PKG/usr/share/$PRGNAM
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
-
-# For some reason the install is not.. installing (see the makefile)
-# So... manual copy of executable, wavs, and the syntax.txt
-mkdir -p $PKG/usr/bin/ $PKG/usr/share/$PRGNAM
-cp -p mysqlcc $PKG/usr/bin/mysqlcc
-cp -p *.wav $PKG/usr/share/$PRGNAM/
-
-mv $PKG/usr/doc/$PRGNAM-$VERSION/syntax.txt $PKG/usr/share/$PRGNAM/
+rm -f $PKG/usr/doc/$PRGNAM-$VERSION/syntax.txt
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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}