summaryrefslogtreecommitdiffstats
path: root/Makefile.Release
blob: 86d5faef58d05b9de2ccfa889442a0ba5ff920f4 (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
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
#//%2006////////////////////////////////////////////////////////////////////////
#//
#// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
#// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
#// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
#// IBM Corp.; EMC Corporation, The Open Group.
#// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
#// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
#// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
#// EMC Corporation; VERITAS Software Corporation; The Open Group.
#// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
#// EMC Corporation; Symantec Corporation; The Open Group.
#//
#// Permission is hereby granted, free of charge, to any person obtaining a copy
#// of this software and associated documentation files (the "Software"), to
#// deal in the Software without restriction, including without limitation the
#// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
#// sell copies of the Software, and to permit persons to whom the Software is
#// furnished to do so, subject to the following conditions:
#// 
#// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
#// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
#// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
#// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
#// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
#// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
#// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
#// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#//
#//==============================================================================
ifndef ROOT
 ifdef PEGASUS_ROOT
    ROOT =  $(subst \,/,$(PEGASUS_ROOT))
 else
    ROOT = .
 endif
endif

PEGASUS_RPM_SPEC_FILE_PATH=$(PEGASUS_ROOT)/rpm/tog-pegasus.spec

include $(ROOT)/mak/config.mak

DIRS = src

include $(ROOT)/mak/recurse.mak

FORCE:

rebuild: FORCE
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release -i cimstop
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release clean 
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release create_ProductVersionFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release create_CommonProductDirectoriesInclude
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release create_ConfigProductDirectoriesInclude
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release depend
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release all 
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release repository
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release stage
	@$(ECHO) "build completed successfully"

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

stage: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release prestage_verifyInstallEnabled
	$(MAKE) --directory=$(ROOT) -f Makefile.Release prestage_cleanup
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusDirectories 
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusFiles 
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusEmptyFiles 
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_genOpenPegasusSSLCertsFile
	$(MAKE) --directory=$(ROOT) -f mak/SDKMakefile stageSDK
ifdef PEGASUS_BUILD_TEST_RPM
	$(MAKE) --directory=$(ROOT) -f Makefile.ReleaseTest stageTEST
endif

preinstall: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release prestage_verifyInstallEnabled
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusDirectories 
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusFiles 

PEGASUS_PROVIDER_MANAGERS =

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

ifeq ($(PEGASUS_ENABLE_CQL),true)
   PEGASUS_LIBRARIES += \
      libpegcql \
      libCIMQueryCapabilitiesProvider
endif

ifeq ($(PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER),true)
PEGASUS_LIBRARIES += \
   libcmpiCppImpl
PEGASUS_PROVIDER_MANAGERS += \
   libCMPIProviderManager
endif


ifdef PEGASUS_USE_NET_SNMP
   PEGASUS_LIBRARIES += \
      libsnmpIndicationHandler
endif

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

PEGASUS_LIBRARY_LINKS = \
   libpegclient \
   libpegcommon \
   libpegprovider \
   libDefaultProviderManager \
   libCIMxmlIndicationHandler

ifdef PEGASUS_USE_NET_SNMP
PEGASUS_LIBRARY_LINKS += \
   libsnmpIndicationHandler
endif

PEGASUS_PROVIDERS = \
   libComputerSystemProvider \
   libOSProvider \
   libProcessProvider

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

PEGASUS_ADMIN_CMDS = \
   cimauth \
   cimconfig \
   cimserver \
   cimprovagt \
   cimservera \
   cimreparchive \
   cimtrust \
   repupgrade

ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
   PEGASUS_ADMIN_CMDS += \
      cimservermain \
      cimshutdown
endif

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

PEGASUS_GENERATED_SCRIPTS = \
   genOpenPegasusSSLCerts

#############################################################################
## If needed, you can use the PEGASUS_CVS_SCRIPTS variable to include 
## one or more script files in an OpenPegasus release.  Scripts should be
## placed in the CVS directory pegasus/installs/scripts. 
#############################################################################

PEGASUS_SCRIPT_FILES = \
   $(PEGASUS_GENERATED_SCRIPTS) \
   $(PEGASUS_CVS_SCRIPTS)
 
PEGASUS_REPOSITORY_DIRS = \
   root\
   root\#PG_Internal \
   root\#PG_InterOp \
   root\#cimv2

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

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

PEGASUS_DOC_FILES = \
   Admin_Guide_Release.pdf \
   PegasusSSLGuidelines.htm \
   license.txt

INTERNAL_MOF_FILES = \
   PG_Authorization20.mof \
   PG_ConfigSetting20.mof \
   PG_InternalSchema20.mof \
   PG_SSLCertificate20.mof \
   PG_SSLCertificateRevocationList20.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

prestage_verifyInstallEnabled: FORCE
ifndef PEGASUS_ENABLE_MAKE_INSTALL
	@$(ECHO) "Makefile.Release is not enabled."
	@exit 1
endif

prestage_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)

stage_PegasusProductDirectories: FORCE
	$(foreach i, $(PEGASUS_SYSTEM_DIRECTORIES), $(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(i);)
	$(foreach i, $(PEGASUS_SPECIFIC_DIRECTORIES), $(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(i);)
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_DEST_LIB_DIR)
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_DIR)
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_LIB_DIR)
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_MANAGER_LIB_DIR)

setpermissions_PegasusProductDirectories: FORCE
	$(foreach i, $(PEGASUS_SPECIFIC_DIRECTORIES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(i);)
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_DIR)
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_LIB_DIR)
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_MANAGER_LIB_DIR)

stage_PegasusSocketDirectory: FORCE
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)
	
setpermissions_PegasusSocketDirectory: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwxr_xr_x)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)
        
stage_PegasusVarRunDirectory: FORCE
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_VARRUN_DIR)

setpermissions_PegasusVarRunDirectory: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwxr_xr_x)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARRUN_DIR)
	
stage_PegasusLocalAuthDirectory: FORCE
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_AUTH_DIR)
	
setpermissions_PegasusLocalAuthDirectory: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwxr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_LOCAL_AUTH_DIR)
	
stage_PegasusLibraryDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_LIBRARIES), $(COPY) $(PEGASUS_HOME)/lib/$(i)$(LIB_SUFFIX) $(PEGASUS_STAGING_DIR)$(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_SUFFIX);)
	$(foreach i, $(PEGASUS_LIBRARY_LINKS), $(MAKE) --directory=$(ROOT) -f Makefile.Release createlink OBJECT=$(i)$(LIB_SUFFIX) LINKNAME=$(PEGASUS_STAGING_DIR)$(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX);)

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

setpermissions_PegasusProviderLibraryDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_PROVIDERS), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwxr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_SUFFIX);)

stage_PegasusProviderManagerLibraryDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_PROVIDER_MANAGERS), $(COPY) $(PEGASUS_HOME)/lib/$(i)$(LIB_SUFFIX) $(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_MANAGER_LIB_DIR)/$(i)$(LIB_SUFFIX);)
	$(foreach i, $(PEGASUS_PROVIDER_MANAGERS), $(MAKE) --directory=${ROOT} -f Makefile.Release createlink OBJECT=$(i)$(LIB_SUFFIX) LINKNAME=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_MANAGER_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX);)

setpermissions_PegasusProviderManagerLibraryDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_PROVIDER_MANAGERS), $(MAKE) --directory=${ROOT} -f Makefile.Release setpermissions PERMISSIONS="$(Prwxr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_PROVIDER_MANAGER_LIB_DIR)/$(i)$(LIB_SUFFIX);)

stage_PegasusAdminCmdsDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_ADMIN_CMDS), $(COPY) $(PEGASUS_HOME)/bin/$(i)$(EXE) $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i)$(EXE);)
	$(foreach i, $(PEGASUS_CVS_SCRIPTS), $(COPY) $(PEGASUS_ROOT)/installs/scripts/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/$(i);)

setpermissions_PegasusAdminCmdsDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_ADMIN_CMDS), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i)$(EXE);)
	$(foreach i, $(PEGASUS_SCRIPT_FILES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/$(i);)

stage_PegasusUserCmdsDirectoryFiles: FORCE
	$(MKDIRHIER) $(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);)

setpermissions_PegasusUserCmdsDirectoryFiles: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)
	$(foreach i, $(PEGASUS_USER_CMDS), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)/$(i)$(EXE);)

stage_RepositoryNamespaceDirectory: FORCE
	$(CPDIRHIER) $(NAMESPACE_DIR_NAME) $(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)

setpermissions_RepositoryNamespaceDirectory: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release sethierpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/classes
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/classes
	$(MAKE) --directory=$(ROOT) -f Makefile.Release sethierpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/classes
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/instances
	$(MAKE) --directory=$(ROOT) -f Makefile.Release sethierpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/instances
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/qualifiers
	$(MAKE) --directory=$(ROOT) -f Makefile.Release sethierpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)/$(NAMESPACE_DIR_NAME)/qualifiers

stage_PegasusRepositoryDirectories: FORCE
	$(RMDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)
	$(foreach i, $(PEGASUS_REPOSITORY_DIRS), $(MAKE) --directory=$(PEGASUS_HOME)/repository -f $(ROOT)/Makefile.Release stage_RepositoryNamespaceDirectory NAMESPACE_DIR_NAME=$(i);)

setpermissions_PegasusRepositoryDirectories: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release sethierpermissions PERMISSIONS="$(Prwx______)" OWNER="$(CIMSERVERMAIN_USR)" GROUP="$(CIMSERVERMAIN_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_REPOSITORY_DIR)
	$(foreach i, $(PEGASUS_REPOSITORY_DIRS), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_RepositoryNamespaceDirectory NAMESPACE_DIR_NAME=$(i);)

stage_PegasusUnixManPageDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_UNIX_MAN_USER_PAGES), $(COPY) $(ROOT)/rpm/manLinux/man1.Z/$(i) $(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);)

setpermissions_PegasusUnixManPageDirectoryFiles: FORCE
	$(foreach i, $(PEGASUS_UNIX_MAN_USER_PAGES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MANUSER_DIR)/$(i);)
	$(foreach i, $(PEGASUS_UNIX_MAN_ADMIN_PAGES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MANADMIN_DIR)/$(i);)

stage_PegasusDocFiles: FORCE
	$(foreach i, $(PEGASUS_DOC_FILES), $(COPY) $(ROOT)/doc/$(i) $(PEGASUS_STAGING_DIR)$(PEGASUS_DOC_DIR)/$(i);)

setpermissions_PegasusDocFiles: FORCE
	$(foreach i, $(PEGASUS_DOC_FILES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_DOC_DIR)/$(i);)

stage_PegasusMOFDirectoryFiles: FORCE
	$(MKDIRHIER) $(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);)
	$(foreach i, $(INTEROP_MOF_FILES), $(COPY) $(ROOT)/Schemas/Pegasus/InterOp/VER20/$(i) $(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);)

setpermissions_PegasusMOFDirectoryFiles: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr_xr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus
	$(foreach i, $(INTERNAL_MOF_FILES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i);)
	$(foreach i, $(INTEROP_MOF_FILES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i);)
	$(foreach i, $(MANAGEDSYSTEM_MOF_FILES), $(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Pr__r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_MOF_DIR)/Pegasus/$(i);)

stage_PegasusVarDataDirectoryFiles: FORCE
	$(COPY) $(ROOT)/src/Server/cimserver_planned.conf $(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)

setpermissions_PegasusVarDataDirectoryFiles: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prw_r__r__)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)

stage_genOpenPegasusSSLCertsFile: FORCE
	@$(RM) $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "#!/bin/bash" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "#" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "PEGASUS_PEM_DIR=$(PEGASUS_PEM_DIR)" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "PEGASUS_CONFIG_DIR=$(PEGASUS_CONFIG_DIR)" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "PEGASUS_INSTALL_LOG=$(PEGASUS_INSTALL_LOG)" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "PEGASUS_SSL_CERT_FILE=$(PEGASUS_SSL_CERT_FILE)" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "PEGASUS_SSL_KEY_FILE=$(PEGASUS_SSL_KEY_FILE)" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(ECHO-E) "PEGASUS_SSL_TRUSTSTORE=$(PEGASUS_SSL_TRUSTSTORE)" >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-genSSLCerts.spec >> \
             $(PEGASUS_STAGING_DIR)$(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts

stage_PegasusDirectories: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusProductDirectories
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusSocketDirectory
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusLocalAuthDirectory

setpermissions_PegasusDirectories: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusProductDirectories
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusSocketDirectory
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusLocalAuthDirectory

stage_PegasusFiles: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusLibraryDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusProviderLibraryDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusProviderManagerLibraryDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusAdminCmdsDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusUserCmdsDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusVarDataDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusRepositoryDirectories
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusUnixManPageDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusDocFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusMOFDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release stage_PegasusSystemFiles

setpermissions_PegasusFiles: FORCE
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusLibraryDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusProviderLibraryDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusProviderManagerLibraryDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusAdminCmdsDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusUserCmdsDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusVarDataDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusRepositoryDirectories
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusUnixManPageDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusDocFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusMOFDirectoryFiles
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions_PegasusSystemFiles

stage_PegasusSystemFiles: FORCE
ifeq ($(OS),linux)
ifdef PEGASUS_PAM_AUTHENTICATION
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PAM_CONFIG_DIR)
	$(COPY) $(ROOT)/rpm/wbem $(PEGASUS_STAGING_DIR)$(PAM_CONFIG_DIR)/wbem
	$(COPY) $(ROOT)/rpm/access.conf $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/access.conf
endif
	$(MKDIRHIER) $(PEGASUS_STAGING_DIR)/etc/init.d
	$(COPY) $(ROOT)/rpm/preamble-tog-pegasus.rc $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
	@$(ECHO-E) "CIMSERVER_BIN=$(PEGASUS_SBIN_DIR)/cimserver" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
	@$(ECHO-E) "PEGASUS_SCRIPT_DIR=$(PEGASUS_SCRIPT_DIR)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
	@$(ECHO-E) "PEGASUS_SSL_CONF_FILE=$(PEGASUS_PEM_DIR)/ssl.cnf" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
	@$(ECHO-E) "PEGASUS_SSL_CERT_FILE=$(PEGASUS_SSL_CERT_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
	@$(ECHO-E) "PEGASUS_SSL_KEY_FILE=$(PEGASUS_SSL_KEY_FILE_PATH)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
	@$(ECHO-E) "PEGASUS_SSL_TRUSTSTORE=$(PEGASUS_SSL_CLIENT_TRUSTSTORE)" >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
	$(CAT) $(ROOT)/rpm/commands-tog-pegasus.rc >> $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
endif

setpermissions_PegasusSystemFiles: FORCE
ifeq ($(OS),linux)
ifdef PEGASUS_PAM_AUTHENTICATION
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prw_r__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PAM_CONFIG_DIR)/wbem
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prw_______)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/access.conf
endif
	$(MAKE) --directory=$(ROOT) -f Makefile.Release setpermissions PERMISSIONS="$(Prwxr_xr_x)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)etc/init.d/tog-pegasus
endif

stage_PegasusEmptyFiles: FORCE
	$(TOUCH) $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
	$(TOUCH) $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_CERT_FILE)
	$(TOUCH) $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_KEY_FILE)
	$(TOUCH) $(PEGASUS_STAGING_DIR)$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_TRUSTSTORE)
	$(TOUCH) $(PEGASUS_STAGING_DIR)$(PEGASUS_INSTALL_LOG)

create_ProductVersionFile: FORCE
ifdef PEGASUS_OVERRIDE_PRODUCT_ID
ifdef PEGASUS_PRODUCT_NAME
ifdef PEGASUS_PRODUCT_VERSION
ifdef PEGASUS_PRODUCT_STATUS
	@$(ECHO-E) "#ifndef Product_Version_h" > $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "#define Product_Version_h" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "#define PEGASUS_PRODUCT_NAME "\""$(PEGASUS_PRODUCT_NAME)"\""" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "#define PEGASUS_PRODUCT_VERSION "\""$(PEGASUS_PRODUCT_VERSION)"\""" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "#define PEGASUS_PRODUCT_STATUS "\""$(PEGASUS_PRODUCT_STATUS)"\""" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "#define PEGASUS_CIMOM_GENERIC_NAME \"Pegasus\"" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "#define PEGASUS_CIMOM_DESCRIPTION \"\"" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
	@$(ECHO-E) "#endif /* Product_Version_h */" >> $(ROOT)/src/Pegasus/Common/ProductVersion.h
endif
endif
endif
endif

create_CommonProductDirectoriesInclude: FORCE
ifdef PEGASUS_OVERRIDE_DEFAULT_RELEASE_DIRS
	@$(ECHO-E) "#ifndef Common_Product_Directory_Structure_h" \
             > $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "#define Common_Product_Directory_Structure_h" \
             >>  $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_CIMSERVER_START_FILE"  \
             "\""$(PEGASUS_CIMSERVER_START_FILE)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_CIMSERVER_START_LOCK_FILE"  \
             "\""$(PEGASUS_CIMSERVER_START_LOCK_FILE)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_REPOSITORY_DIR"  \
             "\""$(PEGASUS_REPOSITORY_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_CURRENT_CONFIG_FILE_PATH"  \
             "\""$(PEGASUS_CURRENT_CONFIG_FILE_PATH)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_PLANNED_CONFIG_FILE_PATH"  \
             "\""$(PEGASUS_PLANNED_CONFIG_FILE_PATH)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_SSLCLIENT_CERTIFICATEFILE"  \
             "\""$(PEGASUS_SSL_CLIENT_TRUSTSTORE)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_SSLCLIENT_RANDOMFILE"  \
             "\""$(PEGASUS_VARDATA_DIR)/ssl.rnd"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_SSLSERVER_RANDOMFILE"  \
             "\""$(PEGASUS_VARDATA_DIR)/cimserver.rnd"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_LOCAL_AUTH_DIR"  \
             "\""$(PEGASUS_LOCAL_AUTH_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_LOCAL_DOMAIN_SOCKET_PATH"  \
             "\""$(PEGASUS_LOCAL_DOMAIN_SOCKET_PATH)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_CORE_DIR"  \
             "\""$(PEGASUS_VARDATA_CACHE_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_PAM_STANDALONE_PROC_NAME"  \
             "\""$(PEGASUS_SBIN_DIR)/cimservera"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_PROVIDER_AGENT_PROC_NAME"  \
             "\""$(PEGASUS_SBIN_DIR)/cimprovagt"\"" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "" \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
	@$(ECHO-E) "#endif /* Common_Product_Directory_Structure_h */ " \
             >> $(ROOT)/src/Pegasus/Common/ProductDirectoryStructure.h
endif


create_ConfigProductDirectoriesInclude: FORCE
ifdef PEGASUS_OVERRIDE_DEFAULT_RELEASE_DIRS
	@$(ECHO-E) "#ifndef Config_Product_Directory_Structure_h" \
             > $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "#define Config_Product_Directory_Structure_h" \
             >>  $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_LOG_DIR"  \
             "\""$(PEGASUS_LOG_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_TRACE_FILE_PATH"  \
             "\""$(PEGASUS_TRACE_FILE_PATH)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_CONFIG_DIR"  \
             "\""$(PEGASUS_CONFIG_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_SSL_CERT_FILE_PATH"  \
             "\""$(PEGASUS_SSL_CERT_FILE_PATH)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_SSL_KEY_FILE_PATH"  \
             "\""$(PEGASUS_SSL_KEY_FILE_PATH)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_SSL_SERVER_TRUSTSTORE"  \
             "\""$(PEGASUS_SSL_SERVER_TRUSTSTORE)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_SSL_SERVER_CRL"  \
             "\""$(PEGASUS_SSL_SERVER_CRL)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_PREV_REPOSITORY_DIR"  \
             "\""$(PEGASUS_PREV_REPOSITORY_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_PROVIDER_LIB_DIR"  \
             "\""$(PEGASUS_PROVIDER_LIB_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "# define PEGASUS_PROVIDER_MANAGER_LIB_DIR"  \
             "\""$(PEGASUS_PROVIDER_MANAGER_LIB_DIR)"\"" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "" \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
	@$(ECHO-E) "#endif /* Config_Product_Directory_Structure_h */ " \
             >> $(ROOT)/src/Pegasus/Config/ProductDirectoryStructure.h
endif

create_ProductInstallationVerificationScript: FORCE
	@$(RM) $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "$(ECHO-E) \"\nSYSTEM DIRECTORIES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_SYSTEM_DIRECTORIES), \
             $(ECHO-E) "ls -ld $(i)" >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "ls -ld $(PEGASUS_DEST_LIB_DIR)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS-SPECIFIC DIRECTORIES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_SPECIFIC_DIRECTORIES), \
             $(ECHO-E) "ls -ld $(i)" >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "ls -ld $(PEGASUS_PROVIDER_DIR)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_PROVIDER_LIB_DIR)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_PROVIDER_MANAGER_LIB_DIR)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_REPOSITORY_DIR)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS DOCUMENT FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_DOC_FILES), \
             $(ECHO-E) "ls -l $(PEGASUS_DOC_DIR)/$(i)" \
                 >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS LIBRARIES FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_LIBRARIES), $(ECHO-E) \
             "ls -l $(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_SUFFIX)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(foreach i, $(PEGASUS_LIBRARY_LINKS), $(ECHO-E) \
             "ls -l $(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS PACKAGED PROVIDER MANAGER FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_PROVIDER_MANAGERS), $(ECHO-E) \
             "ls -l $(PEGASUS_PROVIDER_MANAGER_LIB_DIR)/$(i)$(LIB_SUFFIX)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(foreach i, $(PEGASUS_PROVIDER_MANAGERS), $(ECHO-E) \
             "ls -l $(PEGASUS_PROVIDER_MANAGER_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS PACKAGED PROVIDER FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_PROVIDERS), $(ECHO-E) \
             "ls -l $(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_SUFFIX)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(foreach i, $(PEGASUS_PROVIDERS), $(ECHO-E) \
             "ls -l $(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS ADMIN CMD FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_ADMIN_CMDS), $(ECHO-E) \
             "ls -l $(PEGASUS_SBIN_DIR)/$(i)$(EXE)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS SCRIPT FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_SCRIPT_FILES), $(ECHO-E) \
             "ls -l $(PEGASUS_SCRIPT_DIR)/$(i)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS USER CMD FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_USER_CMDS), $(ECHO-E) \
             "ls -l $(PEGASUS_BIN_DIR)/$(i)$(EXE)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS REPOSITORY FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_REPOSITORY_DIRS), $(ECHO-E) \
             "ls -ld $(PEGASUS_REPOSITORY_DIR)/$(i)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS MAN FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(foreach i, $(PEGASUS_UNIX_MAN_ADMIN_PAGES), $(ECHO-E) \
             "ls -ld $(PEGASUS_MANADMIN_DIR)/$(i)*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(foreach i, $(PEGASUS_UNIX_MAN_USER_PAGES), $(ECHO-E) \
             "ls -ld $(PEGASUS_MANUSER_DIR)/$(i)*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall;)
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS PEM FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -l $(PEGASUS_SSL_CERT_FILE_PATH)*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -l $(PEGASUS_SSL_KEY_FILE_PATH)*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -l $(PEGASUS_SSL_CLIENT_TRUSTSTORE)*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_SSL_SERVER_TRUSTSTORE)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS CONF FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_CONFIG_DIR)/ssl.cnf*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_CONFIG_DIR)/access.conf*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS PAM FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PAM_CONFIG_DIR)" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -l $(PAM_CONFIG_DIR)/wbem" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS TRACE FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -l $(PEGASUS_TRACE_DIR)/*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "$(ECHO-E) \"\nPEGASUS VARRUN FILES\"" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall
	@$(ECHO-E) "ls -ld $(PEGASUS_VARRUN_DIR)/*" \
             >> $(PEGASUS_HOME)/PegasusVerifyInstall


create_OpenPegasusRPMSpecFile: FORCE
	@$(RM) $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release \
            _append_OpenPegasusLicenseToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_PreambleToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_PackagesToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_prepSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_buildSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_installSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_cleanSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_preSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_postSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_preunSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f mak/SDKMakefile \
            PEGASUS_RPM_SPEC_FILE_PATH=$(PEGASUS_RPM_SPEC_FILE_PATH) \
            _append_preunSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.ReleaseTest \
            PEGASUS_RPM_SPEC_FILE_PATH=$(PEGASUS_RPM_SPEC_FILE_PATH) \
            _append_preunSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_postunSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release _append_filesSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f mak/SDKMakefile \
            PEGASUS_RPM_SPEC_FILE_PATH=$(PEGASUS_RPM_SPEC_FILE_PATH) \
            _append_filesSectionToSpecFile
	@$(MAKE) --directory=$(ROOT) -f Makefile.ReleaseTest \
            PEGASUS_RPM_SPEC_FILE_PATH=$(PEGASUS_RPM_SPEC_FILE_PATH) \
            _append_filesSectionToSpecFile

_append_OpenPegasusLicenseToSpecFile: FORCE
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-header.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "#" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "# WARNING: This file is automatically generated by executing " >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "#   make -f pegasus/Makefile.Release create_OpenPegasusRPMSpecFile" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "# Any changes made directly to this file in the OpenPegasus source will" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "# be lost the next time this file is regenerated and submitted to CVS." >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "#" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_PreambleToSpecFile: FORCE
	@$(ECHO-E) "%define packageVersion $(PEGASUS_PACKAGE_VERSION)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "Version: $(PEGASUS_PRODUCT_VERSION)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "Release:"\
            "%{packageVersion}%{?LINUX_VERSION:.%{LINUX_VERSION}}" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "Epoch:   1" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-intro.spec \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-buildRequires.spec \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
ifdef PEGASUS_USE_NET_SNMP
	@$(ECHO-E) "BuildRequires:      net-snmp-devel" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
endif
	@$(ECHO-E) "#" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "# End of section " \
            "pegasus/rpm/tog-specfiles/tog-pegasus-buildRequires.spec" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-requires.spec \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
ifdef PEGASUS_USE_NET_SNMP
	@$(ECHO-E) "Requires:           net-snmp" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
endif
	@$(ECHO-E) "#" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "# End of section " \
            "pegasus/rpm/tog-specfiles/tog-pegasus-requires.spec" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-desc.spec \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-arch.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_ARCH_LIB %{_lib}" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global OPENSSL_HOME $(OPENSSL_HOME)" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global OPENSSL_BIN $(OPENSSL_BIN)" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_PEM_DIR $(PEGASUS_PEM_DIR)" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_SSL_CERT_FILE $(PEGASUS_SSL_CERT_FILE)" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_SSL_KEY_FILE $(PEGASUS_SSL_KEY_FILE)" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_SSL_TRUSTSTORE $(PEGASUS_SSL_TRUSTSTORE)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PAM_CONFIG_DIR /etc/pam.d" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_CONFIG_DIR $(PEGASUS_CONFIG_DIR)" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_VARDATA_DIR $(PEGASUS_VARDATA_DIR)" >> \
            $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) \
            "%global PEGASUS_VARDATA_CACHE_DIR $(PEGASUS_VARDATA_CACHE_DIR)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_LOCAL_DOMAIN_SOCKET_PATH " \
             "$(PEGASUS_LOCAL_DOMAIN_SOCKET_PATH)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_CIMSERVER_START_FILE" \
             "$(PEGASUS_CIMSERVER_START_FILE)"  \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_TRACE_FILE_PATH" \
             "$(PEGASUS_TRACE_FILE_PATH)"  \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_CIMSERVER_START_LOCK_FILE" \
             "$(PEGASUS_CIMSERVER_START_LOCK_FILE)"  \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_REPOSITORY_DIR $(PEGASUS_REPOSITORY_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_PREV_REPOSITORY_DIR_NAME" \
             "$(PEGASUS_PREV_REPOSITORY_DIR_NAME)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_REPOSITORY_PARENT_DIR" \
             "$(PEGASUS_REPOSITORY_PARENT_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_PREV_REPOSITORY_DIR" \
             "$(PEGASUS_PREV_REPOSITORY_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_SBIN_DIR $(PEGASUS_SBIN_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_DOC_DIR $(PEGASUS_DOC_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_RPM_ROOT "\
             "\044RPM_BUILD_DIR/\044RPM_PACKAGE_NAME-\044RPM_PACKAGE_VERSION"\
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) \
             "%global PEGASUS_RPM_HOME %PEGASUS_RPM_ROOT/build"\
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%global PEGASUS_INSTALL_LOG $(PEGASUS_LOG_DIR)/install.log"\
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_PackagesToSpecFile: FORCE
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-packages.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_prepSectionToSpecFile: FORCE
	@$(ECHO-E) "%prep" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%setup -q -n %{name}-%{version}" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_buildSectionToSpecFile: FORCE
	@$(ECHO-E) "%build" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-build.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_installSectionToSpecFile: FORCE
	@$(ECHO-E) "%install" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-install.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_cleanSectionToSpecFile: FORCE
	@$(ECHO-E) "%clean" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-clean.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_preSectionToSpecFile: FORCE
	@$(ECHO-E) "%pre" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-pre.spec \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
	@$(ECHO-E) "# When Privilege Separation is enabled, create the" \
            "'$(CIMSERVERMAIN_USR)' user and ">> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "# '$(CIMSERVERMAIN_GRP)' group which are used" \
            "as the context of the cimservermain process" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "if [ \044\061 -gt 0 ]; then" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "    /usr/sbin/groupadd $(CIMSERVERMAIN_GRP) > /dev/null" \
            "2>&1 || :;" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "    /usr/sbin/useradd -c \"tog-pegasus OpenPegasus"\
            "WBEM/CIM services\" \\" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "        -g $(CIMSERVERMAIN_GRP) -s /sbin/nologin -r -d" \
            "%PEGASUS_VARDATA_DIR $(CIMSERVERMAIN_USR) \\" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "        > /dev/null 2>&1 || :;" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
endif
 
_append_postSectionToSpecFile: FORCE
	@$(ECHO-E) "%post" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "if [ \044\061 -eq 1 ]; then" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release \
            _append_postSectionToSpecFile_createLog
	@$(MAKE) --directory=$(ROOT) -f Makefile.Release \
            _append_postSectionToSpecFile_createSymbolicLinks
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-post.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "elif [ \044\061 -gt 1 ]; then" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   # Check if the cimserver is running" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   isRunning=\`ps -el | grep cimserver | grep -v" \
            "\"grep cimserver\"\`" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   if [ \"\044isRunning\" ]; then" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "       /etc/init.d/tog-pegasus stop" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   if [ -d %PEGASUS_PREV_REPOSITORY_DIR ]; then" \
                   >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "       # The old repository was moved to" \
                   "/var/lib/Pegasus/prev_repository. It should now be" \
                   "upgraded to the new repository /var/lib/Pegasus/repository." \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "       %PEGASUS_SBIN_DIR/repupgrade >> %PEGASUS_INSTALL_LOG 2>&1" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
	@$(ECHO-E) "       chown -R $(CIMSERVERMAIN_USR) %PEGASUS_REPOSITORY_DIR" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "       chgrp -R $(CIMSERVERMAIN_GRP) %PEGASUS_REPOSITORY_DIR" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
endif
	@$(ECHO-E) "   fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
	@$(ECHO-E) "   if [ -f %PEGASUS_TRACE_FILE_PATH ]; then" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "     /bin/mv %PEGASUS_TRACE_FILE_PATH" \
         "%PEGASUS_TRACE_FILE_PATH-\`date '+%Y-%m-%d-%R'\`" \
	    >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
endif
	@$(ECHO-E) "   if [ \"\044isRunning\" ]; then" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "       /etc/init.d/tog-pegasus start" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_postSectionToSpecFile_createSymbolicLinks: FORCE
	@$(ECHO-E) "   # Create Symbolic Links for SDK Libraries" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   #" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(foreach i, $(PEGASUS_LIBRARY_LINKS), \
            $(ECHO-E) "   ln -sf $(i)$(LIB_SUFFIX)\
            $(PEGASUS_DEST_LIB_DIR_2)/$(i)$(LIB_LINK_SUFFIX)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   # Create Symbolic Links for Packaged Provider Libraries"\
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   #" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(foreach i, $(PEGASUS_PROVIDERS), $(ECHO-E) \
            "   ln -sf $(i)$(LIB_SUFFIX)\
            $(PEGASUS_PROVIDER_LIB_DIR_2)/$(i)$(LIB_LINK_SUFFIX)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   # Create Symbolic Links for Packaged Provider Managers"\
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   #" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(foreach i, $(PEGASUS_PROVIDER_MANAGERS), $(ECHO-E) \
            "   ln -sf $(i)$(LIB_SUFFIX)\
            $(PEGASUS_PROVIDER_MANAGER_LIB_DIR_2)/$(i)$(LIB_LINK_SUFFIX)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_postSectionToSpecFile_createLog: FORCE
	@$(ECHO-E) "   echo \`date\` > %PEGASUS_INSTALL_LOG 2>&1" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   %define PEGASUS_CONFIG_DIR $(PEGASUS_CONFIG_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   %define PEGASUS_PEM_DIR $(PEGASUS_PEM_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   %define PEGASUS_SSL_CERT_FILE $(PEGASUS_SSL_CERT_FILE)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   %define PEGASUS_SSL_KEY_FILE $(PEGASUS_SSL_KEY_FILE)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) \
             "   %define PEGASUS_SSL_TRUSTSTORE $(PEGASUS_SSL_TRUSTSTORE)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_preunSectionToSpecFile: FORCE
	@$(ECHO-E) "%preun" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-preun.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)

_append_postunSectionToSpecFile: FORCE
	@$(ECHO-E) "%postun" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "if [ \044\061 -eq 0 ]; then" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "   export LC_ALL=C">> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "fi"  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-postun.spec \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
	@$(ECHO-E) "# When Privilege Separation is enabled, delete the" \
            "'$(CIMSERVERMAIN_USR)' user and ">> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "# '$(CIMSERVERMAIN_GRP)' group which are used" \
            "as the context of the cimservermain process" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "if [ \044\061 -eq 0 ]; then" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "    /usr/sbin/userdel $(CIMSERVERMAIN_USR) > /dev/null" \
            "2>&1 || :;" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "    /usr/sbin/groupdel $(CIMSERVERMAIN_GRP) > /dev/null" \
            "2>&1 || :;" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "fi"  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
endif

# %defattr(file permissions, owner, group, directory permissions)
# The %ghost directive instructs RPM not to install the specified file(s).
#     They will be owned by that package and removed if they exists when
#     the package is removed. This can be useful for things like log files
#     and state files. 

_append_filesSectionToSpecFile: FORCE
	@$(ECHO-E) "%files" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%defattr($(Prw_______),$(CIMSERVERMAIN_USR),$(CIMSERVERMAIN_GRP),$(Prwx______))" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "$(PEGASUS_REPOSITORY_DIR)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%defattr($(Prw_r__r__),$(INSTALL_USR),$(INSTALL_GRP),$(Prwxr_xr_x))"\
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "$(PEGASUS_MOF_DIR)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%defattr($(Prw_______),$(INSTALL_USR),$(INSTALL_GRP),$(Prwxr_xr_x))" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(foreach i, $(PEGASUS_SPECIFIC_DIRECTORIES), \
             if [ $(i) != $(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR) ]; then \
             if [ $(i) != $(PEGASUS_REPOSITORY_DIR) ]; then \
             if [ $(i) != $(PEGASUS_TRACE_DIR) ]; then \
             if [ $(i) != $(PEGASUS_CONFIG_DIR) ]; then \
             if [ $(i) != $(PEGASUS_VARRUN_DIR) ]; then \
             if [ $(i) != $(PEGASUS_MOF_DIR) ]; then \
                   $(ECHO-E) "%dir $(i)" >> \
             $(PEGASUS_RPM_SPEC_FILE_PATH); fi; fi; fi; fi; fi;fi;) 
	@$(ECHO-E) "%dir $(PEGASUS_PROVIDER_DIR_2) " \
              >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%dir $(PEGASUS_PROVIDER_LIB_DIR_2) " \
              >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%dir $(PEGASUS_PROVIDER_MANAGER_LIB_DIR_2) " \
              >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%dir %attr($(Prwxr_xr_x),$(INSTALL_USR),$(INSTALL_GRP))"\
              "$(PEGASUS_CONFIG_DIR)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%dir" \
              "%attr($(Prwxr_xr_x),$(CIMSERVERMAIN_USR),$(CIMSERVERMAIN_GRP))"\
              "$(PEGASUS_VARRUN_DIR)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%dir %attr(1755,$(CIMSERVERMAIN_USR),$(CIMSERVERMAIN_GRP))"\
             "$(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)" \
             >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%dir %attr($(Prwxrwxrwt),$(INSTALL_USR),$(INSTALL_GRP))" \
             "$(PEGASUS_TRACE_DIR)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%config %attr($(Prwxr_x___),$(INSTALL_USR),$(INSTALL_GRP))"\
            "/etc/init.d/tog-pegasus" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%config(noreplace)" \
            "%attr($(Prw_r__r__),$(CIMSERVER_USR),$(CIMSERVER_GRP))" \
            "$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%config(noreplace) $(PEGASUS_CONFIG_DIR)/access.conf" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%config(noreplace) $(PAM_CONFIG_DIR)/wbem" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%ghost %config(noreplace)" \
            "$(PEGASUS_CONFIG_DIR)/ssl.cnf" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%ghost %config(noreplace)" \
            "$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_TRUSTSTORE)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%ghost %config(noreplace)" \
            "$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_CERT_FILE)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%ghost %config(noreplace)" \
           "$(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_KEY_FILE)" \
           >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%ghost $(PEGASUS_INSTALL_LOG)" \
           >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(ECHO-E) "%attr($(Prwxr_xr_x),$(INSTALL_USR),$(INSTALL_GRP))" \
           "$(PEGASUS_SBIN_DIR)/*" >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) "%attr($(Prwxr_xr_x),$(INSTALL_USR),$(INSTALL_GRP))" \
           "$(PEGASUS_BIN_DIR)/*" >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) "%attr($(Prwxr_xr_x),$(INSTALL_USR),$(INSTALL_GRP))" \
           "$(PEGASUS_DEST_LIB_DIR_2)/*$(LIB_SUFFIX)" \
           >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) "%attr($(Prwxr_xr_x),$(INSTALL_USR),$(INSTALL_GRP))" \
           "$(PEGASUS_PROVIDER_LIB_DIR_2)/*$(LIB_SUFFIX)" \
           >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) "%attr($(Prwxr_xr_x),$(INSTALL_USR),$(INSTALL_GRP))" \
           "$(PEGASUS_PROVIDER_MANAGER_LIB_DIR_2)/*$(LIB_SUFFIX)" \
           >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) "%attr($(Prwxr_x___),$(INSTALL_USR),$(INSTALL_GRP))" \
           "$(PEGASUS_SCRIPT_DIR)/*" >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) "%attr($(Prw_r__r__),$(INSTALL_USR),$(INSTALL_GRP))" \
	   "$(PEGASUS_MANUSER_DIR)/*" >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) "%attr($(Prw_r__r__),$(INSTALL_USR),$(INSTALL_GRP))" \
	   "$(PEGASUS_MANADMIN_DIR)/*" >> $(PEGASUS_RPM_SPEC_FILE_PATH) 
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)
	@$(foreach i, $(PEGASUS_DOC_FILES), \
            $(ECHO-E) "%doc %attr($(Pr__r__r__),$(INSTALL_USR),$(INSTALL_GRP))"\
            "$(PEGASUS_DOC_DIR)/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
	@$(foreach i, $(PEGASUS_LIBRARY_LINKS), \
            $(ECHO-E) "$(PEGASUS_DEST_LIB_DIR_2)/$(i)$(LIB_LINK_SUFFIX)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH);) 
	@$(foreach i, $(PEGASUS_PROVIDERS), \
            $(ECHO-E) "$(PEGASUS_PROVIDER_LIB_DIR_2)/$(i)$(LIB_LINK_SUFFIX)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH);) 
	@$(foreach i, $(PEGASUS_PROVIDER_MANAGERS), \
            $(ECHO-E) "$(PEGASUS_PROVIDER_MANAGER_LIB_DIR_2)/$(i)$(LIB_LINK_SUFFIX)" \
            >> $(PEGASUS_RPM_SPEC_FILE_PATH);) 
	@$(ECHO-E) ""  >> $(PEGASUS_RPM_SPEC_FILE_PATH)

include $(ROOT)/mak/commands.mak