Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. #!/bin/sh
  2. # Build and install MySQL on Slackware
  3. # by: David Cantrell <david@slackware.com>
  4. # Modified by plue
  5. # Currently maintained by: Patrick Volkerding <volkerdi@slackware.com>
  6.  
  7. VERSION=5.1.50
  8. ARCH=${ARCH:-x86_64}
  9. BUILD=${BUILD:-1}
  10.  
  11. CWD=$(pwd)
  12. TMP=${TMP:-/tmp}
  13. PKG=$TMP/package-mysql
  14.  
  15. if [ "$ARCH" = "i486" ]; then
  16. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  17. LIBDIRSUFFIX=""
  18. elif [ "$ARCH" = "s390" ]; then
  19. SLKCFLAGS="-O2"
  20. LIBDIRSUFFIX=""
  21. elif [ "$ARCH" = "x86_64" ]; then
  22. SLKCFLAGS="-O2 -m64 -fPIC"
  23. LIBDIRSUFFIX="64"
  24. fi
  25.  
  26. rm -rf $PKG
  27. mkdir -p $TMP $PKG
  28. cd $TMP
  29. rm -rf mysql-$VERSION
  30. tar xvf $CWD/mysql-$VERSION.tar.?z* || exit 1
  31. cd mysql-$VERSION
  32.  
  33. CFLAGS="$SLKCFLAGS -march=core2 -mtune=core2 -mfpmath=sse -mmmx -msse4.2 -fomit-frame-pointer -fPIC" \
  34. CXXFLAGS="$SLKCFLAGS -march=core2 -mtune=core2 -mfpmath=sse -mmmx -msse4.2 -fomit-frame-pointer -fPIC" \
  35. ./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} \
  36. --datadir=/usr/share --sysconfdir=/etc/mysql \
  37. --libexecdir=/usr/sbin --localstatedir=/var/lib/mysql \
  38. --without-docs --without-man --without-server \
  39. --with-embedded-server --without-innodb \
  40. --without-berkeley-db --without-row-based-replication \
  41. --without-readline --disable-shared --with-charset=utf8 \
  42. --without-debug --with-pthread --without-ssl --without-query-cache \
  43. --without-geometry --with-pic
  44.  
  45. make -j3 || make || exit 1
  46.  
  47. cp libmysqld/libmysqld.a /usr/lib${LIBDIRSUFFIX}/mysql/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement