summaryrefslogtreecommitdiffstats
path: root/Makefile.Release
diff options
context:
space:
mode:
authordenise.eckstein <denise.eckstein>2005-03-22 08:57:42 +0000
committerdenise.eckstein <denise.eckstein>2005-03-22 08:57:42 +0000
commit16c7f88dc0719a8086f7f791ba98ab04095924da (patch)
treed1daff0c65b091ec1bea490fd5879394d3ec7f7e /Makefile.Release
parent844b93f25fd356a4644bc5aa8076c219cf716dda (diff)
downloadtog-pegasus-16c7f88dc0719a8086f7f791ba98ab04095924da.zip
tog-pegasus-16c7f88dc0719a8086f7f791ba98ab04095924da.tar.gz
tog-pegasus-16c7f88dc0719a8086f7f791ba98ab04095924da.tar.xz
BUG#: 3086
TITLE: Need automated mechanism to generate tog-pegasus.spec DESCRIPTION: Initial submittal: Modified Release makefiles to automatically generate Linux RPM spec file.
Diffstat (limited to 'Makefile.Release')
-rw-r--r--Makefile.Release326
1 files changed, 321 insertions, 5 deletions
diff --git a/Makefile.Release b/Makefile.Release
index efbbc74..c9dbf3d 100644
--- a/Makefile.Release
+++ b/Makefile.Release
@@ -6,6 +6,8 @@ ifndef ROOT
endif
endif
+PEGASUS_RPM_SPEC_FILE_PATH=$(PEGASUS_ROOT)/rpm/tog-pegasus.spec
+
include $(ROOT)/mak/config.mak
DIRS = src
@@ -75,8 +77,8 @@ PEGASUS_LIBRARIES = \
libpegquerycommon \
libCIMQueryCapabilitiesProvider \
libInteropProvider \
- libCIMOMStatDataProvider
-
+ libCIMOMStatDataProvider \
+ libpegservice
ifdef PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER
PEGASUS_LIBRARIES += \
@@ -93,7 +95,8 @@ PEGASUS_LIBRARY_LINKS = \
libpegclient \
libpegcommon \
libpegprovider \
- libDefaultProviderManager
+ libDefaultProviderManager \
+ libCIMxmlIndicationHandler
ifdef PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER
PEGASUS_LIBRARY_LINKS += \
@@ -338,10 +341,17 @@ setpermissions_PegasusProviderLibraryDirectoryFiles: FORCE
stage_PegasusAdminCmdsDirectoryFiles: FORCE
$(foreach i, $(PEGASUS_ADMIN_CMDS), $(COPY) $(PEGASUS_HOME)/bin/$(i)$(EXE) $(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);)
+ @$(RM) $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/init_repository
+ @$(ECHO-E) "PEGASUS_MOF_DIR=$(PEGASUS_MOF_DIR)" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/init_repository
+ @$(ECHO-E) "PEGASUS_REPOSITORY_DIR=$(PEGASUS_REPOSITORY_DIR)" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/init_repository
+ @$(ECHO-E) "PEGASUS_BIN_DIR=$(PEGASUS_BIN_DIR)" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/init_repository
+ @$(ECHO-E) "PEGASUS_CIM_SCHEMA=$(PEGASUS_CIM_SCHEMA_VERSION)" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/init_repository
+ @$(CAT) $(PEGASUS_ROOT)/installs/scripts/init_repository >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/init_repository
setpermissions_PegasusAdminCmdsDirectoryFiles: FORCE
$(foreach i, $(PEGASUS_ADMIN_CMDS), $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pr_xr__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i)$(EXE);)
$(foreach i, $(INSTALL_SCRIPT_FILES), $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pr_xr__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_SBIN_DIR)/$(i);)
+ $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Prwxr__r__)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)/init_repository
stage_PegasusUserCmdsDirectoryFiles: FORCE
$(MKDIRHIER) $(PEGASUS_STAGING_DIR)$(PEGASUS_BIN_DIR)
@@ -390,7 +400,7 @@ stage_PegasusMOFDirectoryFiles: FORCE
$(MAKE) --directory=$(ROOT)/Schemas -f $(ROOT)/Makefile.Release copyCIMSchemaFiles
$(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, $(INTEROPMOF_FILES), $(COPY) $(ROOT)/Schemas/Pegasus/InterOp/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
@@ -402,6 +412,7 @@ setpermissions_PegasusMOFDirectoryFiles: FORCE
stage_PegasusVarDataDirectoryFiles: FORCE
$(COPY) $(ROOT)/src/Server/cimserver_planned.conf $(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
+ $(TOUCH) $(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_CURRENT_CONFIG_FILE)
setpermissions_PegasusVarDataDirectoryFiles: FORCE
$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pr________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)
@@ -418,7 +429,7 @@ stage_SSLConfigurationFile: FORCE
$(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
+ $(ECHO) "CN = \`uname -n\`" >> $(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
setpermissions_SSLConfigurationFile: FORCE
$(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Pr________)" OWNER="$(INSTALL_USR)" GROUP="$(INSTALL_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PEGASUS_CONFIG_DIR)/ssl.cnf
@@ -469,6 +480,7 @@ stage_PegasusFiles: FORCE
$(MAKE) -f $(ROOT)/Makefile.Release stage_PegasusUnixManPageDirectoryFiles
$(MAKE) -f $(ROOT)/Makefile.Release stage_PegasusMOFDirectoryFiles
$(MAKE) -f $(ROOT)/Makefile.Release stage_PegasusSSLFiles
+ $(MAKE) -f $(ROOT)/Makefile.Release stage_PegasusSystemFiles
setpermissions_PegasusFiles: FORCE
$(MAKE) -f $(ROOT)/Makefile.Release setpermissions_PegasusProductDirectoryFiles
@@ -481,6 +493,7 @@ setpermissions_PegasusFiles: FORCE
$(MAKE) -f $(ROOT)/Makefile.Release setpermissions_PegasusUnixManPageDirectoryFiles
$(MAKE) -f $(ROOT)/Makefile.Release setpermissions_PegasusMOFDirectoryFiles
$(MAKE) -f $(ROOT)/Makefile.Release setpermissions_PegasusSSLFiles
+ $(MAKE) -f $(ROOT)/Makefile.Release setpermissions_PegasusSystemFiles
stage_PegasusSSLFiles: FORCE
ifdef PEGASUS_HAS_SSL
@@ -502,6 +515,25 @@ endif
$(MAKE) -f $(ROOT)/Makefile.Release setpermissions_ClientCertificateFiles
endif
+
+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
+endif
+ $(MKDIRHIER) $(PEGASUS_STAGING_DIR)/etc/init.d
+ $(COPY) $(ROOT)/rpm/tog-pegasus.rc $(PEGASUS_STAGING_DIR)/etc/init.d/tog-pegasus
+endif
+
+setpermissions_PegasusSystemFiles: FORCE
+ifeq ($(OS),linux)
+ifdef PEGASUS_PAM_AUTHENTICATION
+ $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Prw_r__r__)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)$(PAM_CONFIG_DIR)/wbem
+endif
+ $(MAKE) -f $(ROOT)/Makefile.Release setpermissions PERMISSIONS="$(Prwxr_xr_x)" OWNER="$(CIMSERVER_USR)" GROUP="$(CIMSERVER_GRP)" OBJECT=$(PEGASUS_STAGING_DIR)etc/init.d/tog-pegasus
+endif
+
create_ProductVersionFile: FORCE
ifdef PEGASUS_OVERRIDE_PRODUCT_ID
ifdef PEGASUS_PRODUCT_NAME
@@ -520,4 +552,288 @@ endif
endif
endif
+create_OpenPegasusRPMSpecFile: FORCE
+ @$(RM) $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_OpenPegasusLicenseToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_PreambleToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_PackagesToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_prepSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_setupSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_buildSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_installSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_cleanSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_preSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_postSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_preunSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_postunSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_filesSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/mak/SDKMakefile PEGASUS_RPM_SPEC_FILE_PATH=$(PEGASUS_RPM_SPEC_FILE_PATH) _append_filesSectionToSpecFile
+ @$(MAKE) -f $(ROOT)/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 will be lost the next " >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# this file is generated." >> $(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 srcRelease 1" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "Version: $(PEGASUS_PRODUCT_VERSION)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "Release: 1" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-intro.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# End of section pegasus/rpm/tog-specfiles/tog-pegasus-intro.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(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_REPOSITORY_DIR $(PEGASUS_REPOSITORY_DIR)" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%global PEGASUS_PREV_REPOSITORY_DIR $(PEGASUS_PREV_REPOSITORY_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 \044RPM_BUILD_ROOT/build/tog-pegasus" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%ifarch ia64 x86_64" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%global PEGASUS_HARDWARE_PLATFORM LINUX_IA64_GNU" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%else" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%ifarch ppc" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%global PEGASUS_HARDWARE_PLATFORM LINUX_PPC_GNU" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%else" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%ifarch ppc64" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%global PEGASUS_HARDWARE_PLATFORM LINUX_PPC64_GNU" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%else" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%ifarch s390" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES_GNU" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%else" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%ifarch s390x zseries" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%global PEGASUS_HARDWARE_PLATFORM LINUX_ZSERIES64_GNU" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%else" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%global PEGASUS_HARDWARE_PLATFORM LINUX_IX86_GNU" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%endif" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%endif" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%endif" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%endif" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%endif" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
+_append_PackagesToSpecFile: FORCE
+ @$(ECHO-E) "# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-packages.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-packages.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# End of section pegasus/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) "[ \"\044RPM_BUILD_ROOT\" != \"/\" ] && [ -d \044RPM_BUILD_ROOT ] && rm -rf \044RPM_BUILD_ROOT;" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
+_append_setupSectionToSpecFile: FORCE
+ @$(ECHO-E) "%setup -n %{name}-%{version}" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "export PEGASUS_ROOT=%PEGASUS_RPM_ROOT" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
+_append_buildSectionToSpecFile: FORCE
+ @$(ECHO-E) "%build" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-build.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-build.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# End of section pegasus/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)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-install.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# End of section pegasus/rpm/tog-specfiles/tog-pegasus-install.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "[ \"\044PEGASUS_STAGING_DIR\" != \"/\" ] && [ -d \044PEGASUS_STAGING_DIR ] && \
+ [-d \044PEGASUS_STAGING_DIR%PEGASUS_PEM_DIR] && \
+ rm -f \044PEGASUS_STAGING_DIR/%PEGASUS_PEM_DIR/%PEGASUS_SSL_TRUSTSTORE \
+ \044PEGASUS_STAGING_DIR/%PEGASUS_PEM_DIR/%PEGASUS_SSL_CERT_FILE \
+ \044PEGASUS_STAGING_DIR/%PEGASUS_PEM_DIR/%PEGASUS_SSL_KEY_FILE;" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "[ \"\044PEGASUS_HOME\" != \"/\" ] && [ -d \044PEGASUS_HOME ] && rm -rf \044PEGASUS_HOME;" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
+_append_cleanSectionToSpecFile: FORCE
+ @$(ECHO-E) "%clean" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-clean.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-clean.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# End of section pegasus/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)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-pre.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# End of section pegasus/rpm/tog-specfiles/tog-pegasus-pre.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
+_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) -f $(ROOT)/Makefile.Release _append_postSectionToSpecFile_createLog
+ @$(MAKE) -f $(ROOT)/Makefile.Release _append_postSectionToSpecFile_createSymbolicLinks
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# Start of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(CAT) $(ROOT)/rpm/tog-specfiles/tog-pegasus-post.spec >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "# End of section pegasus/rpm/tog-specfiles/tog-pegasus-post.spec" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "fi" >> $(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)/$(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)/$(i)$(LIB_LINK_SUFFIX)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
+_append_postSectionToSpecFile_createLog: FORCE
+ @$(ECHO-E) " %define INSTALL_LOG $(PEGASUS_LOG_DIR)/install.log" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " echo \`date\` > %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)
+ @$(ECHO-E) "if [ \044\061 -eq 0 ]; then" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " # Check if the cimserver is running" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " isRunning=\140ps -el | grep cimserver | grep -v \"grep cimserver\"\140" \
+ >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " if [ \"\044isRunning\" ]; then" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " $(PEGASUS_SBIN_DIR)/cimserver -s" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " # Delete the Link to the rc.* Startup Directories" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " /usr/lib/lsb/remove_initd /etc/init.d/tog-pegasus;" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "fi" >> $(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) " [ \"\044PEGASUS_VARDATA_DIR\" != \"/\" ] && [ -d \044PEGASUS_VARDATA_DIR ] && rm -rf \044PEGASUS_VARDATA_DIR;" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " [ \"\044PEGASUS_PROD_DIR\" != \"/\" ] && [ -d \044PEGASUS_PROD_DIR ] && rm -rf \044PEGASUS_PROD_DIR;" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " [ \"\044PEGASUS_CONFIG_DIR\" != \"/\" ] && [ -d \044PEGASUS_CONFIG_DIR ] && rm -rf \044PEGASUS_CONFIG_DIR;" >> \
+ $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) " export LC_ALL=C">> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "fi" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
+_append_filesSectionToSpecFile: FORCE
+ @$(ECHO-E) "%files" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(PRODUCT_DIRECTORY_STRUCTURE), if [ $(i) != $(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR) ]; then \
+ if [ $(i) != $(PEGASUS_REPOSITORY_DIR) ]; then \
+ $(ECHO-E) "%dir %attr(-,root,root) $(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH); fi; fi;)
+ @$(ECHO-E) "%dir %attr(1555,root,root) $(PEGASUS_LOCAL_DOMAIN_SOCKET_DIR)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%dir %attr($(Prwxr_xr_x),root,root) $(PEGASUS_MOF_DIR)/$(PEGASUS_CIM_SCHEMA)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%dir %attr($(Prwxr_xr_x),root,root) $(PEGASUS_MOF_DIR)/Pegasus" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "$(PEGASUS_REPOSITORY_DIR)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%doc %attr($(Pr________),root,root) $(PEGASUS_PROD_DIR)/license.txt" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(PEGASUS_UNIX_MAN_USER_PAGES), \
+ $(ECHO-E) "%doc $(PEGASUS_MANUSER_DIR)/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(foreach i, $(PEGASUS_UNIX_MAN_ADMIN_PAGES), \
+ $(ECHO-E) "%doc $(PEGASUS_MANADMIN_DIR)/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(CIM28_MOF_FILES), \
+ $(ECHO-E) "%attr($(Pr__r__r__),root,root) $(PEGASUS_MOF_DIR)/$(PEGASUS_CIM_SCHEMA)/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(INTERNAL_MOF_FILES), \
+ $(ECHO-E) "%attr($(Pr__r__r__),root,root) $(PEGASUS_MOF_DIR)/Pegasus/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(foreach i, $(INTEROP_MOF_FILES), \
+ $(ECHO-E) "%attr($(Pr__r__r__),root,root) $(PEGASUS_MOF_DIR)/Pegasus/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(foreach i, $(MANAGEDSYSTEM_MOF_FILES), \
+ $(ECHO-E) "%attr($(Pr__r__r__),root,root) $(PEGASUS_MOF_DIR)/Pegasus/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%config %attr($(Prw_r__r__),root,root) $(PEGASUS_VARDATA_DIR)/$(PEGASUS_PLANNED_CONFIG_FILE)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%config(missingok) %attr($(Prw_r__r__),root,root) $(PEGASUS_VARDATA_DIR)/$(PEGASUS_CURRENT_CONFIG_FILE)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%config %attr($(Pr_x______),root,root) /etc/init.d/tog-pegasus" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%config %attr(-,root,root) %PAM_CONFIG_DIR/wbem" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%config %attr(-,root,root) $(PEGASUS_CONFIG_DIR)/ssl.cnf" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%attr($(Pr__r__r__),root,root) $(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_TRUSTSTORE)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%attr($(Pr________),root,root) $(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_KEY_FILE)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "%attr($(Pr__r__r__),root,root) $(PEGASUS_PEM_DIR)/$(PEGASUS_SSL_CERT_FILE)" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(PEGASUS_ADMIN_CMDS), \
+ $(ECHO-E) "%attr($(Pr_x______),root,root) $(PEGASUS_SBIN_DIR)/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "%attr($(Pr_x______),root,root) $(PEGASUS_SBIN_DIR)/init_repository" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(INSTALL_SCRIPT_FILES), \
+ $(ECHO-E) "%attr($(Pr_x______),root,root) $(PEGASUS_SBIN_DIR)/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(PEGASUS_USER_CMDS), \
+ $(ECHO-E) "%attr($(Pr_xr_xr_x),root,root) $(PEGASUS_BIN_DIR)/$(i)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(PEGASUS_LIBRARIES), \
+ $(ECHO-E) "%attr($(Pr_xr_xr_x),root,root) $(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_SUFFIX)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(foreach i, $(PEGASUS_LIBRARY_LINKS), \
+ $(ECHO-E) "$(PEGASUS_DEST_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+ @$(foreach i, $(PEGASUS_PROVIDERS), \
+ $(ECHO-E) "%attr($(Pr_xr_xr_x),root,root) $(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_SUFFIX)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(foreach i, $(PEGASUS_PROVIDERS), \
+ $(ECHO-E) "$(PEGASUS_PROVIDER_LIB_DIR)/$(i)$(LIB_LINK_SUFFIX)" >> $(PEGASUS_RPM_SPEC_FILE_PATH);)
+ @$(ECHO-E) "" >> $(PEGASUS_RPM_SPEC_FILE_PATH)
+
include $(ROOT)/mak/commands.mak