summaryrefslogtreecommitdiff
path: root/graphics/iccprofiles/iccprofiles.SlackBuild
blob: 53c4c883e69947d30e76020a03e1839d843fcd4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh

# Slackware build script for ECI and Adobe ICC Profiles
# Written by klaatu at klaatu@hackerpublicradio.org
# with a buncha corrections by thrice`

PRGNAM=iccprofiles
VERSION=${VERSION:-2011}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

# icc profiles are arch independent
ARCH=noarch

# get ready for some
# really bad naming schemes cuz color profile
# people and artists have no clue about logic or consistency

ADBNAM=Adobe\ ICC\ Profiles\ \(end-user\)
ECINAM=ECI_Offset_2009
RGBNAM=eciRGB_v2_profile

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION

if [ "${ADOBE}" != "no" ]; then
	unzip $CWD/Adobe*.zip

	# install Adobe profiles, without those ugly spaces
	install -d $PKG/usr/share/color/icc/${ADBNAM// /_}-${VERSION}/
	install -m644 "${ADBNAM}"/CMYK\ Profiles/*.icc \
	  $PKG/usr/share/color/icc/${ADBNAM// /_}-${VERSION}/
	install -m644 "${ADBNAM}"/RGB\ Profiles/*.icc \
	  $PKG/usr/share/color/icc/${ADBNAM// /_}-${VERSION}/

	# Add adobe docs
	mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION}/${ADBNAM// /_}
	install -m644 "${ADBNAM}"/*.pdf \
	  $PKG/usr/doc/${PRGNAM}-${VERSION}/${ADBNAM// /_}/
fi

if [ "$ECI" != "no" ]; then
	unzip $CWD/eci_offset*.zip
	unzip $CWD/ecirgb*.zip

	# Install ECI_Offset profiles
	install -d $PKG/usr/share/color/icc/${ECINAM}-${VERSION}/
	install -m644 ${ECINAM}/*.icc \
	  $PKG/usr/share/color/icc/${ECINAM}-${VERSION}/

	# Add ECI_Offset docs
	mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION}/${ECINAM}/
	install -m644 ${ECINAM}/*.pdf \
          $PKG/usr/doc/${PRGNAM}-${VERSION}/${ECINAM}/

	# Install eciRGB profiles
        install -d $PKG/usr/share/color/icc/${RGBNAM}-${VERSION}/
	install -m644 ${RGBNAM}/*.icc \
          $PKG/usr/share/color/icc/${RGBNAM}-${VERSION}/

	# Add RGB docs
	mkdir -p $PKG/usr/doc/${PRGNAM}-${VERSION}/${RGBNAM}/
	install -m644 ${RGBNAM}/*.rtf \
	  $PKG/usr/doc/${PRGNAM}-${VERSION}/${RGBNAM}/
fi

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}