ripit.SlackBuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #!/bin/bash
  2. # Slackware build script for ripit
  3. # Formerly maintained by Ryan P.C. McQuen <email removed>
  4. # Now maintained by B. Watson <yalhcru@gmail.com>
  5. # Copyright 2011 Grigorios Bouzakis <email removed>
  6. # All rights reserved.
  7. #
  8. # Permission to use, copy, modify, and distribute this software for any purpose
  9. # with or without fee is hereby granted, provided that the above copyright
  10. # notice and this permission notice appear in all copies.
  11. #
  12. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  13. # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  14. # FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  15. # AUTHORS AND COPYRIGHT HOLDERS AND THEIR CONTRIBUTORS BE LIABLE FOR ANY
  16. # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  17. # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  18. # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  20. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  21. # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. # 20170326 bkw:
  23. # - take over maintenance.
  24. # - fix the REQUIRES. faac and ffmpeg are optional, perl-CDDB-get is
  25. # mandatory, id3 and mpc were spurious.
  26. # - document the optional deps in README_SBo.txt.
  27. # - update README.
  28. # - BUILD=2.
  29. cd $(dirname $0) ; CWD=$(pwd)
  30. PRGNAM=ripit
  31. VERSION=${VERSION:-3.9.0}
  32. ARCH=noarch
  33. BUILD=${BUILD:-2}
  34. TAG=${TAG:-_SBo}
  35. PKGTYPE=${PKGTYPE:-tgz}
  36. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  37. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  38. exit 0
  39. fi
  40. TMP=${TMP:-/tmp/SBo}
  41. PKG=$TMP/package-$PRGNAM
  42. OUTPUT=${OUTPUT:-/tmp}
  43. DOCS="HISTORY LICENSE README"
  44. set -e
  45. rm -rf $PKG
  46. mkdir -p $TMP $PKG $OUTPUT
  47. cd $TMP
  48. rm -rf $PRGNAM-$VERSION
  49. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  50. cd $PRGNAM-$VERSION
  51. chown -R root:root .
  52. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  53. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  54. make INSTALL=/bin/install \
  55. prefix=$PKG/usr \
  56. mandir=$PKG/usr/man/man1 \
  57. etcdir=$PKG/etc/ripit install
  58. mv $PKG/etc/ripit/config $PKG/etc/ripit/config.new
  59. gzip -9 $PKG/usr/man/man1/*.*
  60. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  61. cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
  62. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  63. mkdir -p $PKG/install
  64. cat $CWD/slack-desc > $PKG/install/slack-desc
  65. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  66. cd $PKG
  67. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE