volumeicon.SlackBuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #!/bin/sh
  2. # Slackware build script for volumeicon
  3. # Written by Daniel Cash
  4. PRGNAM=volumeicon
  5. VERSION=${VERSION:-0.4.5}
  6. BUILD=${BUILD:-1}
  7. TAG=${TAG:-_SBo}
  8. CWD=$(pwd)
  9. TMP=${TMP:-/tmp/SBo}
  10. PKG=$TMP/package-$PRGNAM
  11. OUTPUT=${OUTPUT:-/tmp}
  12. if [ -z "$ARCH" ]; then
  13. case "$( uname -m )" in
  14. i?86) export ARCH=i486 ;;
  15. arm*) export ARCH=arm ;;
  16. *) export ARCH=$( uname -m ) ;;
  17. esac
  18. fi
  19. if [ "$ARCH" = "i486" ]; then
  20. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  21. LIBDIRSUFFIX=""
  22. elif [ "$ARCH" = "i686" ]; then
  23. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  24. LIBDIRSUFFIX=""
  25. elif [ "$ARCH" = "x86_64" ]; then
  26. SLKCFLAGS="-O2 -fPIC"
  27. LIBDIRSUFFIX="64"
  28. else
  29. SLKCFLAGS="-O2"
  30. LIBDIRSUFFIX=""
  31. fi
  32. set -e
  33. oss_params="" ; [ "${OSS:-no}" != "no" ] && oss_params="--enable-oss"
  34. notify_params="" ; [ "${NOTIFY:-no}" != "no" ] && notify_params="--enable-notify"
  35. rm -rf $PKG
  36. mkdir -p $TMP $PKG $OUTPUT
  37. cd $TMP
  38. rm -rf $PRGNAM-$VERSION
  39. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  40. cd $PRGNAM-$VERSION
  41. chown -R root:root .
  42. find . \
  43. \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  44. -exec chmod 755 {} \; -o \
  45. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  46. -exec chmod 644 {} \;
  47. CFLAGS="$SLKCFLAGS" \
  48. CXXFLAGS="$SLKCFLAGS" \
  49. ./configure \
  50. --prefix=/usr \
  51. --libdir=/usr/lib${LIBDIRSUFFIX} \
  52. --sysconfdir=/etc \
  53. --localstatedir=/var \
  54. --mandir=/usr/man \
  55. --docdir=/usr/doc/$PRGNAM-$VERSION \
  56. --build=$ARCH-slackware-linux \
  57. $oss_params $notify_params
  58. make
  59. make install-strip DESTDIR=$PKG
  60. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  61. cp -a \
  62. AUTHORS COPYING ChangeLog NEWS README \
  63. $PKG/usr/doc/$PRGNAM-$VERSION
  64. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  65. mkdir -p $PKG/install
  66. cat $CWD/slack-desc > $PKG/install/slack-desc
  67. cd $PKG
  68. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}