icc_profiles_from_eci.SlackBuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. # Slackware build script for ECI (European Color Initiative) ICC profiles
  3. # Copyright 2019 Klaatu | Lawrence, NZ | klaatu@member.fsf.org
  4. # GNU All-Permissive License
  5. # Copying and distribution of this file, with or without modification,
  6. # are permitted in any medium without royalty provided the copyright
  7. # notice and this notice are preserved. This file is offered as-is,
  8. # without any warranty.
  9. cd $(dirname $0) ; CWD=$(pwd)
  10. PRGNAM=icc_profiles_from_eci
  11. VERSION=${VERSION:-"2017_08_27"}
  12. BUILD=${BUILD:-1}
  13. TAG=${TAG:-_SBo}
  14. PKGTYPE=${PKGTYPE:-tgz}
  15. ARCH=noarch
  16. ECINAM=eciRGB_v2_profile
  17. CMYKNAM=ecicmyk
  18. DEVICELINK=ecicmyk_devicelinkprofiles_$(echo $VERSION | tr _ -)
  19. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  20. # the name of the created package would be, and then exit. This information
  21. # could be useful to other scripts.
  22. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  23. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  24. exit 0
  25. fi
  26. TMP=${TMP:-/tmp/SBo}
  27. PKG=$TMP/package-$PRGNAM
  28. OUTPUT=${OUTPUT:-/tmp}
  29. set -e
  30. rm -rf $PKG
  31. mkdir -p $TMP $PKG $OUTPUT
  32. cd $TMP
  33. rm -rf $PRGNAM-$VERSION $ECINAM ${CMYKNAM}.icc
  34. unzip $CWD/ecirgbv20.zip
  35. install -d $PKG/usr/share/color/icc/
  36. install -m644 "${ECINAM}"/*.icc \
  37. $PKG/usr/share/color/icc/
  38. unzip $CWD/$CMYKNAM.zip -d $PKG/usr/share/color/icc/
  39. unzip $CWD/$DEVICELINK.zip -d $PKG/usr/share/color/icc/
  40. rm -rf $PKG/usr/share/color/icc/__MACOSX/
  41. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  42. install -m644 "${ECINAM}"/licence.rtf \
  43. $PKG/usr/doc/${PRGNAM}-$VERSION
  44. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  45. mkdir -p $PKG/install
  46. cat $CWD/slack-desc > $PKG/install/slack-desc
  47. cd $PKG
  48. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE