eflite.SlackBuild 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #!/bin/bash
  2. # Slackware build script for eflite
  3. # Written by klaatu at hackerpublicradio dot org
  4. ##
  5. # GNU All-Permissive License
  6. # Copying and distribution of this file, with or without modification,
  7. # are permitted in any medium without royalty provided the copyright
  8. # notice and this notice are preserved. This file is offered as-is,
  9. # without any warranty.
  10. cd $(dirname $0) ; CWD=$(pwd)
  11. PRGNAM=eflite
  12. VERSION=${VERSION:-0.4.1}
  13. BUILD=${BUILD:-1}
  14. TAG=${TAG:-_SBo}
  15. PKGTYPE=${PKGTYPE:-tgz}
  16. if [ -z "$ARCH" ]; then
  17. case "$( uname -m )" in
  18. i?86) ARCH=i486 ;;
  19. arm*) ARCH=arm ;;
  20. *) ARCH=$( uname -m ) ;;
  21. esac
  22. fi
  23. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  24. # the name of the created package would be, and then exit. This information
  25. # could be useful to other scripts.
  26. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  27. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  28. exit 0
  29. fi
  30. TMP=${TMP:-/tmp/SBo}
  31. PKG=$TMP/package-$PRGNAM
  32. OUTPUT=${OUTPUT:-/tmp}
  33. if [ "$ARCH" = "i486" ]; then
  34. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  35. LIBDIRSUFFIX=""
  36. elif [ "$ARCH" = "i686" ]; then
  37. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  38. LIBDIRSUFFIX=""
  39. elif [ "$ARCH" = "x86_64" ]; then
  40. SLKCFLAGS="-O2 -fPIC"
  41. LIBDIRSUFFIX="64"
  42. else
  43. SLKCFLAGS="-O2"
  44. LIBDIRSUFFIX=""
  45. fi
  46. set -e
  47. rm -rf $PKG
  48. mkdir -p $TMP $PKG $OUTPUT
  49. cd $TMP
  50. rm -rf $PRGNAM-$VERSION
  51. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  52. cd $PRGNAM-$VERSION
  53. chown -R root:root .
  54. find -L . \
  55. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  56. -exec chmod 755 {} \; -o \
  57. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  58. -exec chmod 644 {} \;
  59. CFLAGS="$SLKCFLAGS" \
  60. CXXFLAGS="$SLKCFLAGS" \
  61. flite_include_dir=/usr/include/flite/ \
  62. flite_dir=/usr/lib${LIBDIRSUFFIX} \
  63. ./configure \
  64. --prefix=/usr \
  65. --docdir=/usr/doc/$PRGNAM-$VERSION \
  66. --with-audio=ALSA
  67. make
  68. make install prefix=$PKG/usr
  69. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  70. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  71. mkdir -p $PKG/install
  72. cat $CWD/slack-desc > $PKG/install/slack-desc
  73. cd $PKG
  74. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE