# Copyright (C) 2007 Platform Computing Inc # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # # $Id: Makefile 1641 2007-07-13 13:44:05Z mblack $ # SPECFILES = component-RHEL-OFED-devel.spec \ component-RHEL-OFED.spec TOPDIR = $(PWD)/.. TAR_REV=1 COMP_VERSION=1.3 default: localrpm include $(TOPDIR)/../../rhn/params.inc.mak localrpm: rpmdirs @for i in $(SPECFILES) ; do \ echo "$$i" ; \ BASENAME=`basename $$i .spec` ;\ rm -rfv /tmp/$$BASENAME-build && mkdir -pv /tmp/$$BASENAME-build/$$BASENAME; \ install -m644 $$BASENAME.spec /tmp/$$BASENAME-build/$$BASENAME; \ if [ "$$BASENAME" == "component-RHEL-OFED" ]; then \ install -m0755 S40ofed-setulimit.rc.py /tmp/$$BASENAME-build/$$BASENAME ; \ TGZFILENAME=$$BASENAME-$(COMP_VERSION).$(TAR_REV).tar.gz; \ else \ TGZFILENAME=$$BASENAME.tar.gz; \ fi ; \ ( cd /tmp/$$BASENAME-build && tar czf /tmp/$$TGZFILENAME . ); \ ( $(RPMBUILD) -ta /tmp/$$TGZFILENAME ) ;\ rm -rf /tmp/$$BASENAME-build; \ done clean: find $(TOPDIR)/RPMS -type f -name "component-*.rpm" -exec rm -f {} \;