(file) Return to RPMMakefile CVS log (file) (dir) Up to [Pegasus] / pegasus / rpm

Diff for /pegasus/rpm/RPMMakefile between version 1.6.2.1 and 1.17

version 1.6.2.1, 2008/11/20 01:00:30 version 1.17, 2009/12/15 10:52:32
Line 1 
Line 1 
 #//%2006////////////////////////////////////////////////////////////////////////  #//%LICENSE////////////////////////////////////////////////////////////////
 #// #//
 #// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development  #// Licensed to The Open Group (TOG) under one or more contributor license
 #// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.  #// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
 #// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;  #// this work for additional information regarding copyright ownership.
 #// IBM Corp.; EMC Corporation, The Open Group.  #// Each contributor licenses this file to you under the OpenPegasus Open
 #// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;  #// Source License; you may not use this file except in compliance with the
 #// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.  #// License.
 #// 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  #// Permission is hereby granted, free of charge, to any person obtaining a
 #// of this software and associated documentation files (the "Software"), to  #// copy of this software and associated documentation files (the "Software"),
 #// deal in the Software without restriction, including without limitation the  #// to deal in the Software without restriction, including without limitation
 #// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
 #// sell copies of the Software, and to permit persons to whom the Software is  #// and/or sell copies of the Software, and to permit persons to whom the
 #// furnished to do so, subject to the following conditions:  #// Software is furnished to do so, subject to the following conditions:
 #// #//
 #// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN  #// The above copyright notice and this permission notice shall be included
 #// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  #// in all copies or substantial portions of the Software.
 #// "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.  
 #// #//
 #//==============================================================================  #// 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.
   #//
   #//////////////////////////////////////////////////////////////////////////
 ############################################################################### ###############################################################################
 ## ##
 ## RPM Makefile for building tog-pegasus rpms ## RPM Makefile for building tog-pegasus rpms
Line 55 
Line 53 
 CP:=cp CP:=cp
 GREP:=grep GREP:=grep
 ECHO:=echo ECHO:=echo
 TOG_INSTALLED_RPMS:=$(shell $(RPM) -qa|grep tog-pegasus)  ECHO-E:=echo -e
 CIMSERVER_START_SERVICE:=$(PEGASUS_SBIN_DIR)/cimserver  TOG_INSTALLED_RPMS:=$(shell $(RPM) -qa|grep $(PEGASUS_FLAVOR)-pegasus)
 CIMSERVER_STOP_SERVICE:=$(PEGASUS_SBIN_DIR)/cimserver -s  
  
 ifdef PEGASUS_BUILD_BRANCH ifdef PEGASUS_BUILD_BRANCH
     ifeq ($(PEGASUS_BUILD_BRANCH),MAIN)     ifeq ($(PEGASUS_BUILD_BRANCH),MAIN)
Line 72 
Line 69 
 ifeq ($(IDISTRO),RedHatEnterpriseServer) ifeq ($(IDISTRO),RedHatEnterpriseServer)
     DISTRO:=REDHAT     DISTRO:=REDHAT
     export PEGASUS_DISTRO_SUFFIX:= \     export PEGASUS_DISTRO_SUFFIX:= \
         $(if $(filter $(RELEASE),4.92 4.93 5),el5,xxx)          $(if $(filter $(RELEASE),4.92 4.93 5 5.1 5.2 5.3),el5,xxx)
 else else
     ifeq ($(findstring RedHat,$(IDISTRO)),RedHat)     ifeq ($(findstring RedHat,$(IDISTRO)),RedHat)
         DISTRO:=REDHAT         DISTRO:=REDHAT
Line 120 
Line 117 
   endif   endif
   TOG_PEGASUS_DIR:=""   TOG_PEGASUS_DIR:=""
 else else
   TOG_PEGASUS_DIR:=tog-pegasus    TOG_PEGASUS_DIR:=$(PEGASUS_FLAVOR)-pegasus
 endif endif
  
 VERSION:=$(PEGASUS_PRODUCT_VERSION)-$(PEGASUS_PACKAGE_VERSION) VERSION:=$(PEGASUS_PRODUCT_VERSION)-$(PEGASUS_PACKAGE_VERSION)
 CORE_RPM:=tog-pegasus-$(VERSION).$(PEGASUS_DISTRO_SUFFIX).$(PLATFORM).rpm  CORE_RPM:=$(PEGASUS_FLAVOR)-pegasus-$(VERSION).$(PEGASUS_DISTRO_SUFFIX).$(PLATFORM).rpm
 SDK_RPM:=tog-pegasus-devel-$(VERSION).$(PEGASUS_DISTRO_SUFFIX).$(PLATFORM).rpm  SDK_RPM:=$(PEGASUS_FLAVOR)-pegasus-devel-$(VERSION).$(PEGASUS_DISTRO_SUFFIX).$(PLATFORM).rpm
 TEST_RPM:=tog-pegasus-test-$(VERSION).$(PEGASUS_DISTRO_SUFFIX).$(PLATFORM).rpm  TEST_RPM:=$(PEGASUS_FLAVOR)-pegasus-test-$(VERSION).$(PEGASUS_DISTRO_SUFFIX).$(PLATFORM).rpm
 SRC_RPM:=tog-pegasus-$(VERSION).src.rpm  SRC_RPM:=$(PEGASUS_FLAVOR)-pegasus-$(VERSION).src.rpm
   RPM_SRC_DIR:=$(shell echo $(PEGASUS_FLAVOR)-pegasus-$(PEGASUS_PRODUCT_VERSION))
  
 USAGE = @$(ECHO) $(1) USAGE = @$(ECHO) $(1)
  
Line 164 
Line 162 
                 exit 1; fi                 exit 1; fi
 endef endef
  
   define removeRPM
           @if [ -n "`rpm -qa | grep $1-[0-9]`" ]; then \
              rpm -e `rpm -qa | grep $1-[0-9]`; \
           fi
   endef
   
   define startCIMServer
           @/etc/init.d/$(PEGASUS_FLAVOR)-pegasus status > /dev/null 2>&1; \
           if [ $$? != 0 ]; then \
               /etc/init.d/$(PEGASUS_FLAVOR)-pegasus start; \
           fi
   endef
   
   define stopCIMServer
           @/etc/init.d/$(PEGASUS_FLAVOR)-pegasus status > /dev/null 2>&1; \
           if [ $$? == 0 ]; then \
               /etc/init.d/$(PEGASUS_FLAVOR)-pegasus stop; \
           fi
   endef
   
   
 exportSRC: exportSRC:
         @cvs -d:pserver:anon@cvs.opengroup.org:/cvs/MSB export -r $(PEGASUS_RPM_CVS_TAG) pegasus         @cvs -d:pserver:anon@cvs.opengroup.org:/cvs/MSB export -r $(PEGASUS_RPM_CVS_TAG) pegasus
  
   enableSQLiteRepository:
           $(ECHO-E) "" \
               >> pegasus/env_var_Linux.status
           $(ECHO-E) "PEGASUS_USE_SQLITE_REPOSITORY = true" \
               >> pegasus/env_var_Linux.status
   ifdef SQLITE_HOME
           $(ECHO-E) "SQLITE_HOME = $(SQLITE_HOME)" \
               >> pegasus/env_var_Linux.status
   endif
   
 createSRCRPM: createSRCRPM:
  
 ifndef PEGASUS_PRODUCT_VERSION ifndef PEGASUS_PRODUCT_VERSION
         @$(ECHO) "PEGASUS_PRODUCT_VERSION is not defined"         @$(ECHO) "PEGASUS_PRODUCT_VERSION is not defined"
         @exit 2         @exit 2
 endif endif
         @$(MV) pegasus tog-pegasus-$(PEGASUS_PRODUCT_VERSION)          @$(MV) pegasus $(RPM_SRC_DIR)
         @$(CP) tog-pegasus-$(PEGASUS_PRODUCT_VERSION)/rpm/tog-pegasus.spec $(PEGASUS_RPM_DIRECTORY)/SPECS          @$(CP) $(RPM_SRC_DIR)/rpm/tog-pegasus.spec \
         @tar czf tog-pegasus-$(VERSION).tar.gz tog-pegasus-$(PEGASUS_PRODUCT_VERSION)              $(PEGASUS_RPM_DIRECTORY)/SPECS
         @$(CP) tog-pegasus-$(VERSION).tar.gz $(PEGASUS_RPM_DIRECTORY)/SOURCES/$(TOG_PEGASUS_DIR)          @tar czf $(PEGASUS_FLAVOR)-pegasus-$(VERSION).tar.gz $(RPM_SRC_DIR)
           @$(CP) $(PEGASUS_FLAVOR)-pegasus-$(VERSION).tar.gz $(PEGASUS_RPM_DIRECTORY)/SOURCES/$(TOG_PEGASUS_DIR)
         @$(RPMBUILD) -bs $(PEGASUS_RPM_DIRECTORY)/SPECS/tog-pegasus.spec         @$(RPMBUILD) -bs $(PEGASUS_RPM_DIRECTORY)/SPECS/tog-pegasus.spec
  
 createBINRPM: createBINRPM:
Line 184 
Line 214 
         @$(RPMBUILD) -bb --define 'LINUX_VERSION $(PEGASUS_DISTRO_SUFFIX)' --define 'PEGASUS_BUILD_TEST_RPM 1' $(PEGASUS_RPM_DIRECTORY)/SPECS/tog-pegasus.spec         @$(RPMBUILD) -bb --define 'LINUX_VERSION $(PEGASUS_DISTRO_SUFFIX)' --define 'PEGASUS_BUILD_TEST_RPM 1' $(PEGASUS_RPM_DIRECTORY)/SPECS/tog-pegasus.spec
  
 list: list:
         @$(RPM) -qa|$(GREP) tog-pegasus          @$(RPM) -qa|$(GREP) $(PEGASUS_FLAVOR)-pegasus
  
 tests: tests:
         # Start cimserver         # Start cimserver
         -$(CIMSERVER_STOP_SERVICE)          -$(call stopCIMServer)
         $(CIMSERVER_START_SERVICE)          $(call startCIMServer)
         $(call checkForCores,./,-maxdepth 1)         $(call checkForCores,./,-maxdepth 1)
  
         # Run some sanity tests         # Run some sanity tests
Line 212 
Line 242 
         $(call checkForCores,./,-maxdepth 1)         $(call checkForCores,./,-maxdepth 1)
  
         @$(ECHO) "+++++ Stopping cimserver +++++"         @$(ECHO) "+++++ Stopping cimserver +++++"
         @$(CIMSERVER_STOP_SERVICE)          @$(call stopCIMServer)
         $(call checkForCores,./,-maxdepth 1)         $(call checkForCores,./,-maxdepth 1)
  
         @$(ECHO) "+++++ Starting cimserver +++++"         @$(ECHO) "+++++ Starting cimserver +++++"
         $(CIMSERVER_START_SERVICE)          $(call startCIMServer)
         $(call checkForCores,./,-maxdepth 1)         $(call checkForCores,./,-maxdepth 1)
  
         # Run samples         # Run samples
Line 243 
Line 273 
         $(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts         $(PEGASUS_SCRIPT_DIR)/genOpenPegasusSSLCerts
  
 cleanRPM: cleanRPM:
         -$(RPM) -e $(filter tog-pegasus-test%,$(TOG_INSTALLED_RPMS))          $(call removeRPM,$(PEGASUS_FLAVOR)-pegasus-test);
         -$(RPM) -e $(filter tog-pegasus-devel%,$(TOG_INSTALLED_RPMS))          -$(call startCIMServer)
         -$(RPM) -e $(filter tog-pegasus-2%,$(TOG_INSTALLED_RPMS))          $(call removeRPM,$(PEGASUS_FLAVOR)-pegasus-devel);
         -$(RM) -Rf tog-pegasus-$(PEGASUS_PRODUCT_VERSION).old          $(call removeRPM,$(PEGASUS_FLAVOR)-pegasus);
         -$(MV) tog-pegasus-$(PEGASUS_PRODUCT_VERSION) tog-pegasus-$(PEGASUS_PRODUCT_VERSION).old          -$(RM) -Rf $(RPM_SRC_DIR).old
   ifneq ($(wildcard $(RPM_SRC_DIR)), )
           $(MV) $(RPM_SRC_DIR) $(RPM_SRC_DIR).old
   endif
  
 buildRPM: cleanRPM createSRCRPM createBINRPM buildRPM: cleanRPM createSRCRPM createBINRPM
  


Legend:
Removed from v.1.6.2.1  
changed lines
  Added in v.1.17

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2