summaryrefslogtreecommitdiffstats
path: root/Makefile.Release
blob: bc3fc2eda491eef6eb85229eff540ec415f68872 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
ifndef ROOT
 ifdef PEGASUS_ROOT
    ROOT =  $(subst \,/,$(PEGASUS_ROOT))
 else
    ROOT = .
 endif
endif

include $(ROOT)/mak/config.mak

DIRS = src

include $(ROOT)/mak/recurse.mak

FORCE:

world: FORCE
	@$(MAKE) -f $(ROOT)/Makefile.Release -i cimstop
	@$(MAKE) -f $(ROOT)/Makefile.Release _world

_world: depend all repository install
	@$(ECHO) "build completed successfully"

rebuild: FORCE
	@$(MAKE) -f $(ROOT)/Makefile.Release -i cimstop
	@$(MAKE) -f $(ROOT)/Makefile.Release _rebuild

_rebuild: clean depend all repository install
	@$(ECHO) "rebuild completed successfully"

repository: FORCE
	$(MAKE) "-SC" Schemas/Pegasus repository

install: FORCE
	$(MAKE) -f $(ROOT)/Makefile.Release verify_install_enabled
	$(MAKE) -f $(ROOT)/Makefile.Release preinstall_cleanup
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusDirectories 
	$(MAKE) -f $(ROOT)/Makefile.Release copyPegasusFiles 
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusFiles 
	$(MAKE) -f $(ROOT)/mak/SDKMakefile stageSDK

PEGASUS_LICENSE = \
   license.txt

PEGASUS_LIBRARIES = \
   libCIMxmlIndicationHandler \
   libConfigSettingProvider \
   libNamespaceProvider \
   libProviderRegistrationProvider \
   libUserAuthProvider \
   libpegauthentication \
   libpegclient \
   libpegcliutils \
   libpegcommon \
   libpegcompiler \
   libpegconfig \
   libpegexportclient \
   libpegexportserver \
   libpeggetoopt \
   libpeghandlerservice \
   libpegindicationservice \
   libpeglistener \
   libpegprm \
   libpegprovider \
   libpegprovidermanager \
   libpegrepository \
   libpegserver \
   libpeguser \
   libpegwql \
   libDefaultProviderManager \
   libCertificateProvider \
   libpegqueryexpression \
   libpegcql \
   libpegquerycommon \
   libCIMQueryCapabilitiesProvider \
   libInteropProvider \
   libCIMOMStatDataProvider


ifdef PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER
PEGASUS_LIBRARIES += \
   libCMPIProviderManager \
   libcmpiCppImpl
endif

ifeq ($(OS),HPUX)
PEGASUS_LIBRARIES += \
   libNTPProviderSecurity
endif

PEGASUS_LIBRARY_LINKS = \
   libpegclient \
   libpegcommon \
   libpegprovider \
   libDefaultProviderManager

ifdef PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER
PEGASUS_LIBRARY_LINKS += \
   libCMPIProviderManager
endif

PEGASUS_PROVIDERS = \
   libComputerSystemProvider \
   libOSProvider \
   libProcessProvider

ifeq ($(OS),HPUX)
PEGASUS_PROVIDERS += \
   libNTPProvider \
   libNISProvider \
   libDNSProvider \
   libIPProviderModule
endif

PEGASUS_ADMIN_CMDS = \
   cimauth \
   cimconfig \
   cimserver \
   cimuser \
   cimprovagt \
   cimservera

PEGASUS_USER_CMDS = \
   cimmof \
   cimmofl \
   cimprovider \
   osinfo \
   wbemexec

PEGASUS_REPOSITORY_DIRS = \
   root \
   root\#PG_Internal \
   root\#PG_InterOp \
   root\#cimv2

PEGASUS_UNIX_MAN_USER_PAGES = \
   cimmof.1 \
   cimprovider.1 \
   osinfo.1 \
   wbemexec.1 

PEGASUS_UNIX_MAN_ADMIN_PAGES = \
   cimauth.8 \
   cimconfig.8 \
   cimserver.8

CIM28_MOF_FILES = \
   Application28_AppRuntime.mof \
   Application28_BIOS.mof \
   Application28_CheckAction.mof \
   Application28_DeploymentModel.mof \
   Application28_InstalledProduct.mof \
   Application28_J2eeAppServer.mof \
   Application28_J2eeAppServerStats.mof \
   Application28_SystemSoftware.mof \
   CIM_Application28.mof \
   CIM_Core28.mof \
   CIM_Database28.mof \
   CIM_Device28.mof \
   CIM_Event28.mof \
   CIM_Interop28.mof \
   CIM_IPsecPolicy28.mof \
   CIM_Metrics28.mof \
   CIM_Network28.mof \
   CIM_Physical28.mof \
   CIM_Policy28.mof \
   CIM_Schema28.mof \
   CIM_Support28.mof \
   CIM_System28.mof \
   CIM_User28.mof \
   Core28_Capabilities.mof \
   Core28_Collection.mof \
   Core28_CoreElements.mof \
   Core28_Device.mof \
   Core28_MethodParms.mof \
   Core28_Physical.mof \
   Core28_PowerMgmt.mof \
   Core28_ProductFRU.mof \
   Core28_Qualifiers.mof \
   Core28_Redundancy.mof \
   Core28_Service.mof \
   Core28_Settings.mof \
   Core28_Software.mof \
   Core28_Statistics.mof \
   Core28_StorageExtent.mof \
   Database28_Statistics.mof \
   Database28_Storage.mof \
   Database28_System.mof \
   Device28_Controller.mof \
   Device28_CoolingAndPower.mof \
   Device28_DeviceElements.mof \
   Device28_DiskGroup.mof \
   Device28_FC.mof \
   Device28_IB.mof \
   Device28_Memory.mof \
   Device28_Modems.mof \
   Device28_NetworkAdapter.mof \
   Device28_Ports.mof \
   Device28_Printing.mof \
   Device28_Processor.mof \
   Device28_ProtocolController.mof \
   Device28_SccExtents.mof \
   Device28_Sensors.mof \
   Device28_StorageDevices.mof \
   Device28_StorageExtents.mof \
   Device28_StorageLib.mof \
   Device28_StorageServices.mof \
   Device28_USB.mof \
   Device28_UserDevices.mof \
   Metrics28_BaseMetric.mof \
   Metrics28_UnitOfWork.mof \
   Network28_BGP.mof \
   Network28_Buffers.mof \
   Network28_Collections.mof \
   Network28_Filtering.mof \
   Network28_IPsec.mof \
   Network28_OSPF.mof \
   Network28_Pipes.mof \
   Network28_ProtocolEndpoints.mof \
   Network28_QoS.mof \
   Network28_Routes.mof \
   Network28_RoutingForwarding.mof \
   Network28_SNMP.mof \
   Network28_SwitchingBridging.mof \
   Network28_Systems.mof \
   Network28_VLAN.mof \
   Physical28_Component.mof \
   Physical28_Connector.mof \
   Physical28_Link.mof \
   Physical28_Misc.mof \
   Physical28_Package.mof \
   Physical28_PhysicalMedia.mof \
   Physical28_StoragePackage.mof \
   System28_Boot.mof \
   System28_Diagnostics.mof \
   System28_FileElements.mof \
   System28_Logs.mof \
   System28_OperatingSystem.mof \
   System28_Processing.mof \
   System28_SystemElements.mof \
   System28_SystemResources.mof \
   System28_Time.mof \
   System28_Unix.mof \
   User28_AccessControl.mof \
   User28_Account.mof \
   User28_AuthenticationReqmt.mof \
   User28_Credential.mof \
   User28_Group.mof \
   User28_Identity.mof \
   User28_Kerberos.mof \
   User28_Org.mof \
   User28_PrivilegeManagementService.mof \
   User28_Privilege.mof \
   User28_PublicKey.mof \
   User28_Role.mof \
   User28_SecurityLevel.mof \
   User28_SecurityServices.mof \
   User28_SharedSecret.mof \
   User28_StorageHardwareID.mof \
   User28_UsersAccess.mof

INTERNAL_MOF_FILES = \
   PG_Authorization20.mof \
   PG_ConfigSetting20.mof \
   PG_InternalSchema20.mof \
   PG_ShutdownService20.mof \
   PG_User20.mof

INTEROP_MOF_FILES = \
   PG_Events20.mof \
   PG_InterOpSchema20.mof \
   PG_ProviderModule20.mof

MANAGEDSYSTEM_MOF_FILES = \
   PG_ComputerSystem20.mof \
   PG_ComputerSystem20R.mof \
   PG_ManagedSystemSchema20.mof \
   PG_ManagedSystemSchema20R.mof \
   PG_OperatingSystem20.mof \
   PG_OperatingSystem20R.mof \
   PG_UnixProcess20.mof \
   PG_UnixProcess20R.mof

ifeq ($(OS),linux)
   INSTALL_SCRIPT_FILES = \
      settogpath
endif

verify_install_enabled: FORCE
ifndef PEGASUS_ENABLE_MAKE_INSTALL
	@$(ECHO) "Use of \"make install\" is not enabled for this operating environment."
	@exit 1
endif

preinstall_cleanup: FORCE
	$(foreach i, $(PEGASUS_DIRECTORIES_TO_BE_REMOVED), $(RMDIRHIER) $(PEGASUS_STAGING_DIR)$(i);)
	$(RMDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)
	$(RMDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_AUTH_DIR)

createPegasusProductDirectories: FORCE
	$(foreach i, $(PRODUCT_DIRECTORY_STRUCTURE), $(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(i);)

createPegasusProductDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_LICENSE), $(COPY) $(ROOT)/doc/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_PROD_DIR)/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROD_DIR)/$(i);)

createPegasusSocketDirectory: FORCE
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)
	
createPegasusLocalAuthDirectory: FORCE
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_AUTH_DIR)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_AUTH_DIR)
	
createPegasusLibraryDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_LIBRARIES), $(COPY) $(PEGASUS_HOME)/lib/$(i)$(LIB_SUFFIX) $(PEGASUS_STAGING_DIR)$(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_SUFFIX); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_rwxr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_SUFFIX);)
	$(foreach i, $(PEGASUS_LIBRARY_LINKS), $(MAKE) -f $(ROOT)/Makefile.Release createlink OBJECT=$(i)$(LIB_SUFFIX) LINKNAME=$(PEGASUS_STAGING_DIR)$(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX);)

createPegasusProviderLibraryDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_PROVIDERS), $(COPY) $(PEGASUS_HOME)/lib/$(i)$(LIB_SUFFIX) $(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_SUFFIX); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_rwxr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_SUFFIX);)
	$(foreach i, $(PEGASUS_PROVIDERS), $(MAKE) -f $(ROOT)/Makefile.Release createlink OBJECT=$(i)$(LIB_SUFFIX) LINKNAME=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX);)

createPegasusAdminCmdsDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_ADMIN_CMDS), $(COPY) $(PEGASUS_HOME)/bin/$(i)$(EXE) $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i)$(EXE); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r_xr__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i)$(EXE);)
	$(foreach i, $(INSTALL_SCRIPT_FILES), $(COPY) $(PEGASUS_ROOT)/installs/scripts/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r_xr__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i);)

createPegasusUserCmdsDirectoryFiles: FORCE
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)
	$(foreach i, $(PEGASUS_USER_CMDS), $(COPY) $(PEGASUS_HOME)/bin/$(i)$(EXE) $(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)/$(i)$(EXE); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)/$(i)$(EXE);)

copyRepositoryNamespaceDirectory: FORCE
	$(CPDIRHIER) $(NAMESPACE_DIR_NAME) $(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/classes
	$(MAKE) -f $(ROOT)/Makefile.Release sethierpermissions PERMISSIONS="$(P_rw_r__r__)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/classes
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/instances
	$(MAKE) -f $(ROOT)/Makefile.Release sethierpermissions PERMISSIONS="$(P_rw_r__r__)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/instances
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/qualifiers
	$(MAKE) -f $(ROOT)/Makefile.Release sethierpermissions PERMISSIONS="$(P_rw_r__r__)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/qualifiers

createPegasusRepositoryDirectory: FORCE
	$(foreach i, $(PEGASUS_REPOSITORY_DIRS), $(MAKE) --directory=$(PEGASUS_HOME)/repository -f $(ROOT)/Makefile.Release copyRepositoryNamespaceDirectory NAMESPACE_DIR_NAME=$(i);)

createPegasusUnixManPageDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_UNIX_MAN_USER_PAGES), $(COPY) $(ROOT)/rpm/manLinux/man1.Z/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_MANUSER_DIR)/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MANUSER_DIR)/$(i);)
	$(foreach i, $(PEGASUS_UNIX_MAN_ADMIN_PAGES), $(COPY) $(ROOT)/rpm/manLinux/man8.Z/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_MANADMIN_DIR)/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MANADMIN_DIR)/$(i);)

copyCIMSchemaFiles: FORCE
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/$(PEGASUS_CIM_SCHEMA)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/$(PEGASUS_CIM_SCHEMA)
	$(foreach i, $($(PEGASUS_CIM_SCHEMA)_MOF_FILES), $(COPY) $(ROOT)/Schemas/$(PEGASUS_CIM_SCHEMA)/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/$(PEGASUS_CIM_SCHEMA)/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/$(PEGASUS_CIM_SCHEMA)/$(i);)
	
createPegasusMOFDirectoryFiles: FORCE
	$(MAKE) --directory=$(ROOT)/Schemas -f $(ROOT)/Makefile.Release copyCIMSchemaFiles
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pdr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus
	$(foreach i, $(INTERNAL_MOF_FILES), $(COPY) $(ROOT)/Schemas/Pegasus/Internal/VER20/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i);)
	$(foreach i, $(INTEROP_MOF_FILES), $(COPY) $(ROOT)/Schemas/Pegasus/InterOp/VER20/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i);)
	$(foreach i, $(MANAGEDSYSTEM_MOF_FILES), $(COPY) $(ROOT)/Schemas/Pegasus/ManagedSystem/VER20/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i); $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i);)

create_init_repositoryCMD: FORCE

createPegasusVarDataDirectoryFiles: FORCE
	$(COPY) $(ROOT)/src/Server/cimserver_planned.conf $(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)

createSSLConfigurationFile: FORCE
	$(RM) $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(TOUCH) $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "[ req ]" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "distinguished_name     = req_distinguished_name"  >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "prompt                 = no"  >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "[ req_distinguished_name ]" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "C                      = UK" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "ST                     = Berkshire" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "L                      = Reading" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "O                      = The Open Group" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "OU                     = The OpenPegasus Project" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(ECHO) "CN                     = $(GET_HOSTNAME)" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf

createSSLRandomSeedFiles: FORCE
	$(MAKE) -f $(ROOT)/Makefile.Release createrandomseed FILENAME=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_CIMSERVER_RANDOMFILE)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_CIMSERVER_RANDOMFILE)
	$(MAKE) -f $(ROOT)/Makefile.Release createrandomseed FILENAME=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_WBEMEXEC_RANDOMFILE)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_WBEMEXEC_RANDOMFILE)


createServerCertificateFiles: FORCE
ifdef PEGASUS_SSL_RANDOMFILE
	$(OPENSSL_COMMAND) req -x509 -days 3650 -newkey rsa:2048 -rand $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/$(PEGASUS_CIMSERVER_RANDOMFILE) -nodes -config $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf -keyout $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_KEY_FILE) -out $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_CERT_FILE) 
else
	$(OPENSSL_COMMAND) req -x509 -days 3650 -newkey rsa:2048 -nodes -config $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf -keyout $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_KEY_FILE) -out $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_CERT_FILE) 
endif
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_KEY_FILE)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_CERT_FILE)

createClientCertificateFiles: FORCE
	$(COPY) $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_CERT_FILE) $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_TRUSTSTORE)
	$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(P_r__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_TRUSTSTORE)

createPegasusDirectories: FORCE
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusProductDirectories
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusSocketDirectory
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusLocalAuthDirectory

copyPegasusFiles: FORCE
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusProductDirectoryFiles
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusLibraryDirectoryFiles
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusProviderLibraryDirectoryFiles
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusAdminCmdsDirectoryFiles
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusUserCmdsDirectoryFiles
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusVarDataDirectoryFiles
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusRepositoryDirectory
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusUnixManPageDirectoryFiles 
	$(MAKE) -f $(ROOT)/Makefile.Release createPegasusMOFDirectoryFiles

createPegasusFiles: FORCE
ifdef PEGASUS_HAS_SSL
	$(MAKE) -f $(ROOT)/Makefile.Release createSSLConfigurationFile
ifdef PEGASUS_SSL_RANDOMFILE
	$(MAKE) -f $(ROOT)/Makefile.Release createSSLRandomSeedFiles
endif
	$(MAKE) -f $(ROOT)/Makefile.Release createServerCertificateFiles
	$(MAKE) -f $(ROOT)/Makefile.Release createClientCertificateFiles
endif

include $(ROOT)/mak/commands.mak