Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Build and install MySQL on Slackware
- # by: David Cantrell <david@slackware.com>
- # Modified by plue
- # Currently maintained by: Patrick Volkerding <volkerdi@slackware.com>
- VERSION=5.1.50
- ARCH=${ARCH:-x86_64}
- BUILD=${BUILD:-1}
- CWD=$(pwd)
- TMP=${TMP:-/tmp}
- PKG=$TMP/package-mysql
- if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -m64 -fPIC"
- LIBDIRSUFFIX="64"
- fi
- rm -rf $PKG
- mkdir -p $TMP $PKG
- cd $TMP
- rm -rf mysql-$VERSION
- tar xvf $CWD/mysql-$VERSION.tar.?z* || exit 1
- cd mysql-$VERSION
- CFLAGS="$SLKCFLAGS -march=core2 -mtune=core2 -mfpmath=sse -mmmx -msse4.2 -fomit-frame-pointer -fPIC" \
- CXXFLAGS="$SLKCFLAGS -march=core2 -mtune=core2 -mfpmath=sse -mmmx -msse4.2 -fomit-frame-pointer -fPIC" \
- ./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} \
- --datadir=/usr/share --sysconfdir=/etc/mysql \
- --libexecdir=/usr/sbin --localstatedir=/var/lib/mysql \
- --without-docs --without-man --without-server \
- --with-embedded-server --without-innodb \
- --without-berkeley-db --without-row-based-replication \
- --without-readline --disable-shared --with-charset=utf8 \
- --without-debug --with-pthread --without-ssl --without-query-cache \
- --without-geometry --with-pic
- make -j3 || make || exit 1
- cp libmysqld/libmysqld.a /usr/lib${LIBDIRSUFFIX}/mysql/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement