summaryrefslogtreecommitdiff
path: root/print/cups/pkg/INSTALL
blob: ded966fdfa0d1c0ac605fdc19de75242e4f16ed5 (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
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.2 2000/07/13 01:01:11 jlam Exp $

PKGNAME=$1
STAGE=$2

case ${STAGE} in
PRE-INSTALL)
	;;
POST-INSTALL)
	SERVERROOT=/etc/cups
	LOGDIR=/var/log/cups
	REQUESTDIR=/var/spool/cups

	mkdir -p ${SERVERROOT}
	mkdir -p ${SERVERROOT}/certs
	mkdir -p ${SERVERROOT}/interfaces
	mkdir -p ${SERVERROOT}/ppd
	mkdir -p ${LOGDIR}
	mkdir -p ${REQUESTDIR}

	echo "Installing configuration files:"
	for file in \
		classes.conf \
		client.conf \
		cupsd.conf \
		mime.convs \
		mime.types \
		printers.conf
	do
		if [ -f ${SERVERROOT}/${file} ]
		then
			echo "  ${SERVERROOT}/${file} already exists"
		else
			echo "  ${PKG_PREFIX}/share/examples/cups/${file} --> ${SERVERROOT}/${file}"
			cp ${PKG_PREFIX}/share/examples/cups/${file} \
				${SERVERROOT}/${file}
			chmod 644 ${SERVERROOT}/${file}
		fi
	done
	echo "done."
	;;
*)
	echo "Unexpected argument: $2"
	exit 1
	;;
esac
exit 0