xref: /titanic_51/usr/src/cmd/cmd-crypto/etc/Makefile (revision fa9e4066f08beec538e775443c5be79dd423fcab)
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
41# EXPORT DELETE START
42# CRYPT DELETE START
43
44ETCCRYPTOFILES +=	certs/SUNWosnet
45ETCCERTSFILES +=	SUNWosnetSolaris
46
47# CRYPT DELETE END
48# EXPORT DELETE END
49
50include ../../Makefile.cmd
51
52.KEEP_STATE:
53
54ROOTCRYPTODIR=		$(ROOT)/etc/crypto
55ROOTCRYPTOCERTSDIR=	$(ROOTCRYPTODIR)/certs
56ROOTCRYPTOCRLSDIR=	$(ROOTCRYPTODIR)/crls
57
58ROOTETCCERTSDIR=	$(ROOT)/etc/certs
59
60$(ROOTCRYPTODIR):=	OWNER= root
61$(ROOTCRYPTODIR):=	GROUP= sys
62$(ROOTETCCERTSDIR):=	OWNER= root
63$(ROOTETCCERTSDIR):=	GROUP= sys
64
65IETCCRYPTOFILES=	$(ETCCRYPTOFILES:%=$(ROOTCRYPTODIR)/%)
66IETCCERTSFILES=		$(ETCCERTSFILES:%=$(ROOTETCCERTSDIR)/%)
67
68$(ROOTCRYPTODIR)/%:	%
69			$(INS.file)
70$(RELEASECERTS:%=$(ROOTCRYPTODIR)/certs/%): \
71			certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
72			$(RM) $@
73			$(INS) -s -m $(FILEMODE) -f $(@D) \
74				certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
75			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%) $@
76
77$(ROOTETCCERTSDIR)/%:	certs/%
78			$(INS.file)
79$(RELEASECERTS:%=$(ROOTETCCERTSDIR)/%): \
80			certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
81			$(RM) $@
82			$(INS) -s -m $(FILEMODE) -f $(@D) \
83				certs/$(@F:SUNW_SunOS_5.%=SUNWSolaris%)
84			$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWSolaris%) $@
85
86$(IETCCRYPTOFILES):=	FILEMODE= 644
87$(IETCCRYPTOFILES):=	OWNER= root
88$(IETCCRYPTOFILES):=	GROUP= sys
89$(IETCCERTSFILES):=	FILEMODE= 644
90$(IETCCERTSFILES):=	OWNER= root
91$(IETCCERTSFILES):=	GROUP= sys
92
93install:	$(IETCCRYPTOFILES) $(IETCCERTSFILES)
94
95# EXPORT DELETE START
96
97EXPORT_SRC:
98	$(RM) Makefile+
99	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
100		< Makefile > Makefile+
101	$(MV) -f Makefile+ Makefile
102	$(CHMOD) 444 Makefile
103
104# EXPORT DELETE END
105