musicmanager.SlackBuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/sh
  2. # Slackware build script for Goggles Music Manager
  3. # Modified by disturbed1976@gmail.com
  4. #
  5. PRGNAM=musicmanager
  6. VERSION=0.9.15
  7. ARCH=${ARCH:-i486}
  8. BUILD=${BUILD:-1}
  9. TAG=${TAG:-_SBo}
  10. CWD=$(pwd)
  11. TMP=${TMP:-/tmp/SBo}
  12. PKG=$TMP/package-$PRGNAM
  13. OUTPUT=${OUTPUT:-/tmp}
  14. if [ "$ARCH" = "i486" ]; then
  15. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  16. elif [ "$ARCH" = "i686" ]; then
  17. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  18. elif [ "$ARCH" = "x86_64" ]; then
  19. SLKCFLAGS="-O2 -fPIC"
  20. fi
  21. set -e
  22. rm -rf $PKG
  23. mkdir -p $TMP $PKG $OUTPUT
  24. cd $TMP
  25. rm -rf $PRGNAM-$VERSION
  26. tar xvjf $CWD/$PRGNAM-$VERSION.tar.bz2
  27. cd $PRGNAM-$VERSION
  28. chown -R root.root .
  29. find . \
  30. \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  31. -exec chmod 755 {} \; -o \
  32. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  33. -exec chmod 644 {} \;
  34. CFLAGS="$SLKCFLAGS" \
  35. CXXFLAGS="$SLKCFLAGS" \
  36. ./configure \
  37. --prefix=/usr
  38. # Makefile will attempt to run gtk-update-icon-cache on make install.
  39. # This will remove that issue.
  40. patch Makefile <<EOF
  41. 194d193
  42. < gtk-update-icon-cache \$(INSTALLDIR)/share/icons/hicolor
  43. EOF
  44. make
  45. make install DESTDIR=$PKG
  46. ( cd $PKG
  47. find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  48. find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  49. )
  50. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  51. cp -a AUTHORS ChangeLog COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
  52. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  53. find $PKG/usr/doc -type f -exec chmod 0644 {} \;
  54. mkdir -p $PKG/install
  55. cat $CWD/slack-desc > $PKG/install/slack-desc
  56. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  57. cd $PKG
  58. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz