KeePassHttp.SlackBuild 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/bash
  2. # Slackware build script for KeePassHttp
  3. # Copyright (c) 2016-2018 Thomas Szteliga <ts@websafe.pl>, Opole, PL
  4. #
  5. # Permission is hereby granted, free of charge, to any person obtaining a copy
  6. # of this software and associated documentation files (the "Software"), to deal
  7. # in the Software without restriction, including without limitation the rights
  8. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. # copies of the Software, and to permit persons to whom the Software is
  10. # furnished to do so, subject to the following conditions:
  11. #
  12. # The above copyright notice and this permission notice shall be included in
  13. # all copies or substantial portions of the Software.
  14. #
  15. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. # THE SOFTWARE.
  22. cd $(dirname $0) ; CWD=$(pwd)
  23. PRGNAM=KeePassHttp
  24. VERSION=${VERSION:-1.8.4.2}
  25. BUILD=${BUILD:-2}
  26. TAG=${TAG:-_SBo}
  27. PKGTYPE=${PKGTYPE:-tgz}
  28. ARCH=noarch
  29. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  30. # the name of the created package would be, and then exit. This information
  31. # could be useful to other scripts.
  32. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  33. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  34. exit 0
  35. fi
  36. TMP=${TMP:-/tmp/SBo}
  37. PKG=$TMP/package-$PRGNAM
  38. OUTPUT=${OUTPUT:-/tmp}
  39. set -e
  40. rm -rf $PKG
  41. mkdir -p $TMP $PKG $OUTPUT
  42. cd $TMP
  43. rm -rf $PRGNAM-$VERSION
  44. mkdir $PRGNAM-$VERSION
  45. cp $CWD/KeePassHttp.plgx \
  46. $CWD/LICENSE \
  47. $CWD/README.md \
  48. $PRGNAM-$VERSION/
  49. cd $PRGNAM-$VERSION
  50. chown -R root:root .
  51. find -L . \
  52. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  53. -o -perm 511 \) -exec chmod 755 {} \; -o \
  54. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  55. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  56. mkdir -p $PKG/usr/lib/KeePass/Release
  57. cp -a KeePassHttp.plgx $PKG/usr/lib/KeePass/Release
  58. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  59. cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
  60. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  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.$PKGTYPE