iscan-firmware.SlackBuild 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/sh
  2. # Slackware build script for iscan-firmware
  3. # Copyright 2006-2007 Manuel Reimer (Manuel.Reimer@gmx.de)
  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=iscan-firmware
  23. VERSION=2.8.0.1
  24. RPMBUILD=11 # <-- This is the build number used by OpenSuSE in their RPM
  25. ARCH=${ARCH:-noarch}
  26. BUILD=${BUILD:-2}
  27. TAG=${TAG:-_SBo}
  28. CWD=$(pwd)
  29. TMP=${TMP:-/tmp/SBo}
  30. PKG=$TMP/package-$PRGNAM
  31. OUTPUT=${OUTPUT:-/tmp}
  32. set -e
  33. rm -rf $PKG
  34. mkdir -p $TMP $PKG $OUTPUT
  35. cd $TMP
  36. rm -rf $PRGNAM-$VERSION
  37. mkdir $PRGNAM-$VERSION
  38. cd $PRGNAM-$VERSION
  39. rpm2cpio $CWD/$PRGNAM-$VERSION-$RPMBUILD.noarch.rpm | cpio -imdv
  40. chown -R root:root .
  41. chmod -R u+w,go+r-w,a-s .
  42. cd usr/share
  43. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  44. # All license files are in the directory of the "iscan-plugin-gt-f520-1.0.0"
  45. # and we only need them once
  46. cp -a doc/packages/iscan-firmware/iscan-plugin-gt-f520-1.0.0/* \
  47. $PKG/usr/doc/$PRGNAM-$VERSION
  48. cat $CWD/README.Slackware > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
  49. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  50. mkdir -p $PKG/usr/share/iscan
  51. cp -a iscan/* $PKG/usr/share/iscan
  52. mkdir -p $PKG/install
  53. cat $CWD/slack-desc > $PKG/install/slack-desc
  54. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  55. cd $PKG
  56. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz