xref: /titanic_44/usr/src/cmd/cmd-crypto/etc/Makefile (revision 39c23413b8df94a95f67b34cfd4a4dfc3fd0b48d)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28RELEASECERTS =		SUNW_SunOS_5.10
29RELEASECRYPTO =		SUNW_SunOS_5.10 \
30			SUNW_SunOS_5.11_Limited
31
32ETCCRYPTOFILES = \
33	kcf.conf \
34	pkcs11.conf \
35	$(RELEASECRYPTO:%=certs/%) \
36	certs/CA
37
38ETCCERTSFILES = \
39	$(RELEASECERTS) \
40	SUNWSolarisCA
41
42include ../../Makefile.cmd
43
44.KEEP_STATE:
45
46ROOTCRYPTODIR=		$(ROOT)/etc/crypto
47ROOTCRYPTOCERTSDIR=	$(ROOTCRYPTODIR)/certs
48
49ROOTETCCERTSDIR=	$(ROOT)/etc/certs
50
51$(ROOTCRYPTODIR):=	OWNER= root
52$(ROOTCRYPTODIR):=	GROUP= sys
53$(ROOTETCCERTSDIR):=	OWNER= root
54$(ROOTETCCERTSDIR):=	GROUP= sys
55
56IETCCRYPTOFILES=	$(ETCCRYPTOFILES:%=$(ROOTCRYPTODIR)/%)
57IETCCERTSFILES=		$(ETCCERTSFILES:%=$(ROOTETCCERTSDIR)/%)
58
59$(ROOTCRYPTODIR)/%:	%
60			$(INS.file)
61$(RELEASECRYPTO:%=$(ROOTCRYPTODIR)/certs/%): \
62			certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
63			$(RM) $@
64			$(INS) -s -m $(FILEMODE) -f $(@D) \
65				certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
66			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%) $@
67
68$(ROOTETCCERTSDIR)/%:	certs/%
69			$(INS.file)
70$(RELEASECERTS:%=$(ROOTETCCERTSDIR)/%): \
71			certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
72			$(RM) $@
73			$(INS) -s -m $(FILEMODE) -f $(@D) \
74				certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
75			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWSolaris%) $@
76
77$(IETCCRYPTOFILES):=	FILEMODE= 644
78$(IETCCRYPTOFILES):=	OWNER= root
79$(IETCCRYPTOFILES):=	GROUP= sys
80$(IETCCERTSFILES):=	FILEMODE= 644
81$(IETCCERTSFILES):=	OWNER= root
82$(IETCCERTSFILES):=	GROUP= sys
83
84install:	$(IETCCRYPTOFILES) $(IETCCERTSFILES)
85