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 (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23 #
24
25 include ../Makefile.lib
26
27 SUBDIRS = help $(MACH)
28 $(BUILD64)SUBDIRS += $(MACH64)
29
30 MSGSUBDIRS= help
31
32 all:= TARGET= all
33 clean:= TARGET= clean
34 clobber:= TARGET= clobber
35 install:= TARGET= install
36 lint:= TARGET= lint
37 _msg:= TARGET= _msg
38
39 .KEEP_STATE:
40
41 ROOTETC = $(ROOT)/etc
42 ROOTETCSECURITY = $(ROOTETC)/security
43
44 EFILES = user_attr
45 EFILESRC = $(EFILES:%=%)
46 ETCFILES = $(EFILES:%=$(ROOTETC)/%)
47 ETCDFILES = $(EFILES:%=$(ROOTETC)/%.d/SUNWcs)
48
49 ESDFILES = auth_attr exec_attr prof_attr
50 ESFILES = $(ESDFILES) policy.conf
51 ESSRC = $(ESFILES:%=%)
52 ETCSECURITYFILES = $(ESFILES:%=$(ROOTETCSECURITY)/%)
53 ETCSECURITYDFILES = $(ESDFILES:%=$(ROOTETCSECURITY)/%.d/SUNWcs)
54
55
56 MFSTFILES = rbac.xml
57 MANIFESTDIR = $(ROOT)/lib/svc/manifest/system
58 MANIFEST = $(MFSTFILES:%=$(MANIFESTDIR)/%)
59 $(MANIFEST) := FILEMODE = 0444
60
61 METHODFILES = svc-rbac
62 METHODDIR = $(ROOT)/lib/svc/method
63 METHOD = $(METHODFILES:%=$(METHODDIR)/%)
64 $(METHOD) := FILEMODE = 0555
65
66 SCRIPTS = i.rbac r.rbac
67 CLASS_SCR_SRC_DIR = common
68 INSTALL_DIR = $(ROOT)/usr/sadm/install
69
70 CLASS_SCR_DIR = $(INSTALL_DIR)/scripts
71
72 CLASS_SCR_FILES = $(SCRIPTS:%=$(CLASS_SCR_DIR)/%)
73 $(CLASS_SCR_FILES) := FILEMODE = 0555
74
75 all clean clobber delete install lint package: $(SUBDIRS)
76 _msg: $(MSGSUBDIRS)
77
78 install: install_data
79
80 install_data: $(ETCSECURITYFILES) $(ETCSECURITYDFILES) $(ETCFILES) \
81 $(ETCDFILES) $(CLASS_SCR_FILES) $(MANIFESTDIR) $(MANIFEST) \
82 $(METHODDIR) $(METHOD)
83
84 ATTR_FILES = auth_attr exec_attr prof_attr user_attr
85 ${ATTR_FILES}: $$@.txt ${CLASS_SCR_SRC_DIR}/i.rbac
86 > $@
87 $(ECHO) $@.txt $@ | $(SHELL) ${CLASS_SCR_SRC_DIR}/i.rbac
88
89 $(ETCSECURITYDFILES) $(ETCDFILES): $$(@D)
90
91 $(ETCSECURITYFILES) $(ETCFILES): $(ETCSECURITY) $(ROOTETCSECURITY)
92
93 $(ETCSECURITY)/%: %
94 $(INS.file)
95
96 $(ROOTETCSECURITY):
97 $(INS.dir)
98
99 $(ROOTETCSECURITY)/%: %
100 $(INS.file)
101
102 $(ROOTETCSECURITY)/%.d/SUNWcs: %
103 $(INS.rename)
104
105 $(ROOTETC)/% : %
106 $(INS.file)
107
108 $(ROOTETC)/%.d/SUNWcs: %
109 $(INS.rename)
110
111 $(MANIFESTDIR):
112 $(INS.dir)
113
114 $(MANIFESTDIR)/% : %
115 $(INS.file)
116
117 $(METHODDIR):
118 $(INS.dir)
119
120 $(METHODDIR)/% : %
121 $(INS.file)
122
123 $(CLASS_SCR_FILES): $(INSTALL_DIR) $(CLASS_SCR_DIR)
124
125 $(INSTALL_DIR):
126 $(INS.dir)
127
128 $(CLASS_SCR_DIR):
129 $(INS.dir)
130
131 $(CLASS_SCR_DIR)/%: $(CLASS_SCR_SRC_DIR)/%
132 $(INS.file)
133
134 clobber clean:
135 $(RM) $(ATTR_FILES)
136
137 $(SUBDIRS): FRC
138 @cd $@; pwd; $(MAKE) $(TARGET)
139
140 FRC: