nightingale.SlackBuild 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #!/bin/sh
  2. # Slackware build script for nightingale
  3. # Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2 of the License, or
  7. # (at your option) any later version, with the following exception:
  8. # the text of the GPL license may be omitted.
  9. # This program is distributed in the hope that it will be useful, but
  10. # without any warranty; without even the implied warranty of
  11. # merchantability or fitness for a particular purpose. Compiling,
  12. # interpreting, executing or merely reading the text of the program
  13. # may result in lapses of consciousness and/or very being, up to and
  14. # including the end of all existence and the Universe as we know it.
  15. # See the GNU General Public License for more details.
  16. # You may have received a copy of the GNU General Public License along
  17. # with this program (most likely, a file named COPYING). If not, see
  18. # <http://www.gnu.org/licenses/>.
  19. PRGNAM=nightingale
  20. SRCNAM=Nightingale
  21. VERSION=${VERSION:-1.12.1_2454}
  22. BUILD=${BUILD:-1}
  23. TAG=${TAG:-_SBo}
  24. if [ -z "$ARCH" ]; then
  25. case "$( uname -m )" in
  26. i?86) ARCH=i586 ;;
  27. arm*) ARCH=arm ;;
  28. *) ARCH=$( uname -m ) ;;
  29. esac
  30. fi
  31. CWD=$(pwd)
  32. TMP=${TMP:-/tmp/SBo}
  33. PKG=$TMP/package-$PRGNAM
  34. OUTPUT=${OUTPUT:-/tmp}
  35. SRC_VERSION=$(echo $VERSION | tr _ -)
  36. PLUGINS=${PLUGINS:-YES}
  37. if [ "$ARCH" = "i586" ]; then
  38. SRC_ARCH="i686"
  39. LIBDIRSUFFIX=""
  40. elif [ "$ARCH" = "i686" ]; then
  41. SRC_ARCH="i686"
  42. LIBDIRSUFFIX=""
  43. elif [ "$ARCH" = "x86_64" ]; then
  44. SRC_ARCH="x86_64"
  45. LIBDIRSUFFIX="64"
  46. else
  47. printf "\n$ARCH is unsupported...\n\n"
  48. exit 1
  49. fi
  50. set -e
  51. rm -rf $PKG
  52. mkdir -p $TMP $PKG $OUTPUT
  53. cd $PKG
  54. # Set up the target enviroment and extract nightingale in there
  55. mkdir -p $PKG/usr/{bin,lib${LIBDIRSUFFIX}}/$SRCNAM
  56. tar -xvf $CWD/${SRCNAM}_${SRC_VERSION}_ubuntu-$SRC_ARCH.tar.bz2 -C $PKG/usr/lib${LIBDIRSUFFIX}/$SRCNAM
  57. chown -R root:root .
  58. # Added "-o -perm 700" to this to take care of the borked directory permissions
  59. find . \
  60. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  61. -o -perm 511 \) -exec chmod 755 {} \; -o \
  62. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  63. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  64. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  65. cd $PKG/usr/lib${LIBDIRSUFFIX}/$SRCNAM
  66. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  67. mkdir -p $PKG/usr/share/{applications,pixmaps}
  68. cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
  69. cp $PKG/usr/lib${LIBDIRSUFFIX}/$SRCNAM/chrome/icons/default/default.xpm \
  70. $PKG/usr/share/pixmaps/$SRCNAM.xpm
  71. ln -sf /usr/lib${LIBDIRSUFFIX}/$SRCNAM/nightingale-bin \
  72. $PKG/usr/bin/$PRGNAM
  73. mkdir -p $PKG/install
  74. cat $CWD/slack-desc > $PKG/install/slack-desc
  75. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  76. cd $PKG
  77. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}