kmobiletools.SlackBuild 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #!/bin/sh
  2. # Slackware build script for kmobiletools
  3. # Copyright 2008 Heinz Wiesinger <hmwiesinger@gmx.at>
  4. # All rights reserved.
  5. #
  6. # Redistribution and use of this script, with or without modification, is
  7. # permitted provided that the following conditions are met:
  8. #
  9. # 1. Redistributions of this script must retain the above copyright
  10. # notice, this list of conditions and the following disclaimer.
  11. #
  12. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
  13. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  15. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  17. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  18. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  19. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  20. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  21. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. PRGNAM=kmobiletools
  23. VERSION=0.5.0-beta3
  24. PKGVER=0.5.0beta3
  25. ARCH=${ARCH:-i486}
  26. BUILD=${BUILD:-1}
  27. TAG=${TAG:-_SBo}
  28. CWD=$(pwd)
  29. TMP=${TMP:-/tmp/SBo}
  30. PKG=$TMP/package-$PRGNAM
  31. OUTPUT=${OUTPUT:-/tmp}
  32. if [ "$ARCH" = "i486" ]; then
  33. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  34. elif [ "$ARCH" = "i686" ]; then
  35. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  36. fi
  37. set -e
  38. rm -rf $PKG
  39. mkdir -p $TMP $PKG $OUTPUT
  40. cd $TMP
  41. rm -rf $PRGNAM-$VERSION
  42. tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  43. cd $PRGNAM-$VERSION
  44. chown -R root:root .
  45. chmod -R u+w,go+r-w,a-s .
  46. KDEPREF=$(kde-config --prefix) || true
  47. CFLAGS="$SLKCFLAGS" \
  48. CXXFLAGS="$SLKCFLAGS" \
  49. ./configure \
  50. --prefix=$KDEPREF \
  51. --sysconfdir=/etc/kde \
  52. --localstatedir=/var \
  53. --without-gammu
  54. make
  55. make install-strip DESTDIR=$PKG
  56. mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVER
  57. cp -a AUTHORS COPYING ChangeLog INSTALL README TODO VERSION \
  58. $PKG/usr/doc/$PRGNAM-$PKGVER
  59. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$PKGVER/$PRGNAM.SlackBuild
  60. mkdir -p $PKG/install
  61. cat $CWD/slack-desc > $PKG/install/slack-desc
  62. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  63. cd $PKG
  64. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.tgz