podget.SlackBuild 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/sh
  2. # Slackware build script for podget
  3. # Copyright (c) 2008-2010, Antonio Hernández Blas <hba.nihilismus@gmail.com>
  4. # All rights reserved.
  5. #
  6. # Redistribution and use in source and binary forms, with or without
  7. # modification, are permitted provided that the following conditions are met:
  8. # 1.- Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. #
  11. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
  12. # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  13. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  14. # DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  15. # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  16. # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  17. # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  19. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  20. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21. PRGNAM=podget
  22. VERSION=0.6.7
  23. BUILD=${BUILD:-1}
  24. TAG=${TAG:-_SBo}
  25. ARCH=noarch
  26. CWD=$(pwd)
  27. TMP=${TMP:-/tmp/SBo}
  28. PKG=$TMP/package-$PRGNAM
  29. OUTPUT=${OUTPUT:-/tmp}
  30. set -e
  31. rm -rf $PKG
  32. mkdir -p $TMP $PKG $OUTPUT
  33. cd $TMP
  34. rm -rf $PRGNAM-$VERSION
  35. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  36. cd $PRGNAM-$VERSION
  37. chown -R root:root .
  38. chmod -R u+w,go+r-w,a-s .
  39. make
  40. prefix=/usr make DESTDIR=$PKG install
  41. mv $PKG/usr/share/man $PKG/usr/man
  42. rm -rf $PKG/usr/share
  43. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/scripts
  44. cp -a COPYING Changelog INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
  45. cp -r SCRIPTS/* $PKG/usr/doc/$PRGNAM-$VERSION/scripts
  46. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  47. mkdir -p $PKG/install
  48. cat $CWD/slack-desc > $PKG/install/slack-desc
  49. cd $PKG
  50. /sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}