google-appengine-pysdk.SlackBuild 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/bin/sh
  2. # Slackware build script for google-appengine-gosdk
  3. # Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
  4. #
  5. # Copyright (c) 2011 Eric Schultz
  6. #
  7. # Permission is hereby granted, free of charge, to any person obtaining a copy of
  8. # this software and associated documentation files (the "Software"), to deal in
  9. # the Software without restriction, including without limitation the rights to
  10. # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  11. # the Software, and to permit persons to whom the Software is furnished to do so,
  12. # subject to the following conditions:
  13. #
  14. # The above copyright notice and this permission notice shall be included in all
  15. # copies or substantial portions of the Software.
  16. #
  17. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23. # SOFTWARE.
  24. # Written by Eric Schultz eric at schultzter dot ca
  25. PRGNAM=google-appengine-pysdk
  26. VERSION=${VERSION:-1.9.27}
  27. BUILD=${BUILD:-1}
  28. TAG=${TAG:-_SBo}
  29. ARCH=noarch
  30. CWD=$(pwd)
  31. TMP=${TMP:-/tmp/SBo}
  32. PKG=$TMP/package-$PRGNAM
  33. OUTPUT=${OUTPUT:-/tmp}
  34. set -e
  35. rm -rf $PKG
  36. mkdir -p $TMP $PKG/opt/google $OUTPUT
  37. cd $PKG/opt/google
  38. unzip $CWD/google_appengine_$VERSION.zip
  39. chown -R root:root .
  40. find -L . \
  41. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  42. -o -perm 511 \) -exec chmod 755 {} \; -o \
  43. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  44. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  45. # Rename to remove redundancy
  46. mv google_appengine appengine-pysdk
  47. # Put the profile scripts for setting PATH and env variables
  48. mkdir -p $PKG/etc/profile.d
  49. install -m0755 -oroot $CWD/gae.csh $PKG/etc/profile.d/gae.csh.new
  50. install -m0755 -oroot $CWD/gae.sh $PKG/etc/profile.d/gae.sh.new
  51. cd appengine-pysdk
  52. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  53. cp -a \
  54. BUGS LICENSE README RELEASE_NOTES VERSION \
  55. $PKG/usr/doc/$PRGNAM-$VERSION
  56. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  57. mkdir -p $PKG/install
  58. cat $CWD/slack-desc > $PKG/install/slack-desc
  59. cp $CWD/doinst.sh $PKG/install/doinst.sh
  60. cd $PKG
  61. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}