ncmpc.SlackBuild 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/bin/sh
  2. # Slackware build script for ncmpc
  3. # Copyright 2006 Andrew Brouwers <abrouwers@gmail.com>
  4. # All rights reserved.
  5. #
  6. # Redistribution and use of this script, with or without modification, is
  7. # permitted provided that the following conditions are met:
  8. #
  9. # 1. Redistributions of this script must retain the above copyright
  10. # notice, this list of conditions and the following disclaimer.
  11. #
  12. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
  13. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  15. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  17. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  18. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  19. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  20. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  21. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. # Modified by the SlackBuilds.org project
  23. PRGNAM=ncmpc
  24. VERSION=0.11.1
  25. ARCH=${ARCH:-i486}
  26. BUILD=${BUILD:-1}
  27. TAG=${TAG:-_SBo}
  28. CWD=$(pwd)
  29. TMP=${TMP:-/tmp/SBo}
  30. PKG=$TMP/package-$PRGNAM
  31. OUTPUT=${OUTPUT:-/tmp}
  32. if [ "$ARCH" = "i486" ]; then
  33. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  34. elif [ "$ARCH" = "i686" ]; then
  35. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  36. elif [ "$ARCH" = "s390" ]; then
  37. SLKCFLAGS="-O2"
  38. elif [ "$ARCH" = "x86_64" ]; then
  39. SLKCFLAGS="-O2"
  40. fi
  41. rm -rf $PKG
  42. mkdir -p $TMP $PKG $OUTPUT
  43. cd $TMP || exit 1
  44. rm -rf $PRGNAM-$VERSION
  45. tar xvfz $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
  46. cd $PRGNAM-$VERSION || exit 1
  47. chown -R root:root .
  48. chmod -R u+w,go+r-w,a-s .
  49. CFLAGS="$SLKCFLAGS" \
  50. CXXFLAGS="$SLKCFLAGS" \
  51. ./configure \
  52. --prefix=/usr \
  53. || exit 1
  54. make || exit 1
  55. make install-strip DESTDIR=$PKG || exit 1
  56. gzip -9 $PKG/usr/man/man?/*
  57. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  58. cp -a AUTHORS COPYING ChangeLog NEWS README doc/config.sample \
  59. doc/keys.sample doc/ncmpc.lirc $PKG/usr/doc/$PRGNAM-$VERSION
  60. rm -rf $PKG/usr/share/{doc,ncmpc}
  61. mkdir -p $PKG/install
  62. cat $CWD/slack-desc > $PKG/install/slack-desc
  63. cd $PKG
  64. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz