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