gxmessage.SlackBuild 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #!/bin/sh
  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. set -e
  28. PRGNAM=gxmessage
  29. VERSION=2.6.2
  30. ARCH=${ARCH:-i486}
  31. BUILD=${BUILD:-1}
  32. TAG=${TAG:-_SBo}
  33. CWD=$(pwd)
  34. TMP=${TMP:-/tmp/SBo}
  35. PKG=$TMP/package-$PRGNAM
  36. OUTPUT=${OUTPUT:-/tmp}
  37. if [ "$ARCH" = "i486" ]; then
  38. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  39. elif [ "$ARCH" = "i686" ]; then
  40. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  41. fi
  42. rm -rf $PKG
  43. mkdir -p $TMP $PKG $OUTPUT
  44. cd $TMP
  45. rm -rf $PRGNAM-$VERSION
  46. tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
  47. cd $PRGNAM-$VERSION
  48. chown -R root:root .
  49. chmod -R a-s,u+w,go+r-w .
  50. CFLAGS="$SLKCFLAGS" \
  51. CXXFLAGS="$SLKCFLAGS" \
  52. ./configure \
  53. --prefix=/usr \
  54. --sysconfdir=/etc \
  55. --localstatedir=/var \
  56. make
  57. make install-strip DESTDIR=$PKG
  58. if [ -d $PKG/usr/man ]; then
  59. ( cd $PKG/usr/man
  60. find . -type f -exec gzip -9 {} \;
  61. for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
  62. )
  63. fi
  64. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  65. cp -a AUTHORS COPYING ChangeLog HACKING INSTALL README TODO examples \
  66. $PKG/usr/doc/$PRGNAM-$VERSION
  67. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  68. mkdir -p $PKG/install
  69. cat $CWD/slack-desc > $PKG/install/slack-desc
  70. cd $PKG
  71. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz