biosdisk.SlackBuild 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/bash
  2. # Slackware build script for <biosdisk>
  3. # Written by Michales Michaloudes korgie@gmail.com
  4. cd $(dirname $0) ; CWD=$(pwd)
  5. PRGNAM=biosdisk
  6. VERSION=${VERSION:-0.75_2}
  7. ARCH=noarch
  8. BUILD=${BUILD:-2}
  9. TAG=${TAG:-_SBo}
  10. PKGTYPE=${PKGTYPE:-tgz}
  11. SRC_VERSION=$(echo $VERSION | tr _ -)
  12. VERSDIR=$(echo $VERSION | sed 's/_.*//')
  13. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  14. # the name of the created package would be, and then exit. This information
  15. # could be useful to other scripts.
  16. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  17. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  18. exit 0
  19. fi
  20. TMP=${TMP:-/tmp/SBo}
  21. PKG=$TMP/package-$PRGNAM
  22. OUTPUT=${OUTPUT:-/tmp}
  23. set -e
  24. rm -rf $PKG
  25. mkdir -p $TMP $PKG $OUTPUT
  26. cd $TMP
  27. rm -rf $PRGNAM-$VERSDIR
  28. tar xvf $CWD/$PRGNAM-$SRC_VERSION.tar.gz
  29. cd $PRGNAM-$VERSDIR
  30. chown -R root:root .
  31. find -L . \
  32. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  33. -o -perm 511 \) -exec chmod 755 {} \; -o \
  34. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  35. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  36. # Procedure taken from the original install.sh by Dell.
  37. # Added $PKG variable for package creation.
  38. # I think this is useless. Checks for wget, unix2dos (slackware has todos)
  39. # syslinux, python
  40. # sh checkdeps.sh
  41. #install -D -m 0755 geturl $PKG/usr/sbin/geturl
  42. install -D -m 0755 biosdisk $PKG/usr/sbin/biosdisk
  43. install -D -m 0755 blconf $PKG/usr/sbin/blconf
  44. install -D -m 0644 biosdisk.8.gz $PKG/usr/man/man8/biosdisk.8.gz
  45. install -D -m 0644 dosdisk.img $PKG/usr/share/biosdisk/dosdisk.img
  46. install -D -m 0644 biosdisk.conf $PKG/etc/biosdisk.conf.new
  47. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  48. cp -a \
  49. AUTHORS COPYING ChangeLog INSTALL TODO README README.dosdisk VERSION \
  50. $PKG/usr/doc/$PRGNAM-$VERSION
  51. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  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.$PKGTYPE