gxmessage.SlackBuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #!/bin/bash
  2. # Slackware build script for gxmessage
  3. # Written by koolniczka
  4. # Copyright 2007 koolniczka <koolniczka@szm.com
  5. #
  6. # Based on Slackware build script for lame.
  7. # Copyright 2006 Martin Lefebvre <dadexter@gmail.com>
  8. # All rights reserved.
  9. #
  10. # Redistribution and use of this script, with or without modification, is
  11. # permitted provided that the following conditions are met:
  12. #
  13. # 1. Redistributions of this script must retain the above copyright
  14. # notice, this list of conditions and the following disclaimer.
  15. #
  16. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
  17. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  19. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  20. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. # Modified by the SlackBuilds.org project.
  27. # Modified by slakmagik
  28. cd $(dirname $0) ; CWD=$(pwd)
  29. PRGNAM=gxmessage
  30. VERSION=${VERSION:-2.12.4}
  31. BUILD=${BUILD:-2}
  32. TAG=${TAG:-_SBo}
  33. PKGTYPE=${PKGTYPE:-tgz}
  34. if [ -z "$ARCH" ]; then
  35. case "$( uname -m )" in
  36. i?86) ARCH=i486 ;;
  37. arm*) ARCH=arm ;;
  38. *) ARCH=$( uname -m ) ;;
  39. esac
  40. fi
  41. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  42. # the name of the created package would be, and then exit. This information
  43. # could be useful to other scripts.
  44. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  45. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  46. exit 0
  47. fi
  48. TMP=${TMP:-/tmp/SBo}
  49. PKG=$TMP/package-$PRGNAM
  50. OUTPUT=${OUTPUT:-/tmp}
  51. if [ "$ARCH" = "i486" ]; then
  52. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  53. LIBDIRSUFFIX=""
  54. elif [ "$ARCH" = "i686" ]; then
  55. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  56. LIBDIRSUFFIX=""
  57. elif [ "$ARCH" = "x86_64" ]; then
  58. SLKCFLAGS="-O2 -fPIC"
  59. LIBDIRSUFFIX="64"
  60. else
  61. SLKCFLAGS="-O2"
  62. LIBDIRSUFFIX=""
  63. fi
  64. NLS=${NLS:-enable}
  65. set -e
  66. rm -rf $PKG
  67. mkdir -p $TMP $PKG $OUTPUT
  68. cd $TMP
  69. rm -rf $PRGNAM-$VERSION
  70. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  71. cd $PRGNAM-$VERSION
  72. chown -R root:root .
  73. find -L . \
  74. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  75. -exec chmod 755 {} \; -o \
  76. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
  77. -o -perm 400 \) -exec chmod 644 {} \;
  78. CFLAGS="$SLKCFLAGS" \
  79. CXXFLAGS="$SLKCFLAGS" \
  80. ./configure \
  81. --prefix=/usr \
  82. --mandir=/usr/man \
  83. --docdir=/usr/doc/$PRGNAM-$VERSION \
  84. --infodir=/usr/info \
  85. --$NLS-nls \
  86. --build=$ARCH-slackware-linux
  87. make
  88. make DESTDIR=$PKG install-strip
  89. find $PKG/usr/man -type f -exec gzip -9 {} \;
  90. rm -f $PKG/usr/info/dir
  91. gzip -9 $PKG/usr/info/*.info*
  92. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  93. cp -a [ACHINRT]* examples $PKG/usr/doc/$PRGNAM-$VERSION
  94. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  95. mkdir -p $PKG/install
  96. cat $CWD/slack-desc > $PKG/install/slack-desc
  97. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  98. cd $PKG
  99. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE