CVSTools.SlackBuild 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #!/bin/bash
  2. # Slackware build script for CVSTools
  3. # Copyright (c) 2011-2013 Christopher Walker <kris240376@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
  8. # met:
  9. #
  10. # * Redistributions of source code must retain the above copyright
  11. # notice, this list of conditions and the following disclaimer.
  12. # * Redistributions in binary form must reproduce the above
  13. # copyright notice, this list of conditions and the following disclaimer
  14. # in the documentation and/or other materials provided with the
  15. # distribution.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. # 20220330 bkw: Modified by SlackBuilds.org, BUILD=3: install cvslib.pl
  29. # to a subdirectory instead of directly to /usr/share.
  30. cd $(dirname $0) ; CWD=$(pwd)
  31. PRGNAM=CVSTools
  32. VERSION=${VERSION:-21.1}
  33. BUILD=${BUILD:-3}
  34. TAG=${TAG:-_SBo}
  35. PKGTYPE=${PKGTYPE:-tgz}
  36. ARCH=noarch
  37. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  38. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  39. exit 0
  40. fi
  41. TMP=${TMP:-/tmp/SBo}
  42. PKG=$TMP/package-$PRGNAM
  43. OUTPUT=${OUTPUT:-/tmp}
  44. set -e
  45. rm -rf $TMP/$PRGNAM-$VERSION $PKG
  46. mkdir -p $TMP $PKG $OUTPUT
  47. cd $TMP
  48. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  49. cd $PRGNAM-$VERSION
  50. chown -R root:root .
  51. chmod 644 *
  52. sed -i '/cvslib\.pl/s,/usr/share,&/cvslib,' *
  53. mkdir -p $PKG/usr/bin
  54. install -o root -g root -m 755 \
  55. checkpoint vers_string cvsver tarup commit cvssync \
  56. $PKG/usr/bin
  57. mkdir -p $PKG/usr/share/cvslib
  58. install -o root -g root -m 644 cvslib.pl $PKG/usr/share/cvslib
  59. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  60. cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
  61. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  62. mkdir -p $PKG/install
  63. cat $CWD/slack-desc > $PKG/install/slack-desc
  64. cd $PKG
  65. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE