# Copyright (C) 2008 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$ # NAME = rhel-ofed TOPDIR = $(PWD) ARCH = $(shell arch) RPMS = `find $(TOPDIR)/RPMS/ -type f |grep -v '.svn'` TMPDIR = /tmp SPECFILE = $(PWD)/kit-rhel-ofed.spec TARREV = 2 KITTARFILENAME = kit-$(NAME)-$(VERSION).$(TARREV).tar.gz SRPMS=\ SRPMS/component-RHEL-OFED-devel \ SRPMS/component-RHEL-OFED \ SRPMS/kit-rhel-ofed all: components kit include ../../rhn/params.inc.mak packages: ( cd packages; $(MAKE) ) components: ( cd components; $(MAKE) ) rhel-ofed-kit: rpmdirs rm -rf /tmp/$(NAME)-build && mkdir -p /tmp/$(NAME)-build/$(NAME) rsync -a ./docs ./plugins /tmp/$(NAME)-build/$(NAME) \ --exclude .svn/ --exclude *.pyc cp kit-rhel-ofed.spec /tmp/$(NAME)-build ( cd /tmp/$(NAME)-build; tar czf /tmp/$(KITTARFILENAME) . ) $(RPMBUILD) -ta /tmp/$(KITTARFILENAME) rm -rf /tmp/$(NAME)-build /tmp/$(KITTARFILENAME) kit: rhel-ofed-kit mkdir -p $(TMPDIR)/disk1/$(NAME) cd $(TMPDIR)/disk1/$(NAME) ; \ for i in $(RPMS); do ln -sf $$i; done mkisofs -quiet -V "RHEL OFED Kit" -r -T -f -o kit-$(NAME)-$(VERSION)-$(RELEASE).noarch.iso $(TMPDIR)/disk1 rm -rf $(TMPDIR)/disk1 clean: -( cd components && make clean ) -( cd packages && make clean ) for srpm in $(SRPMS); do rm -f $$srpm*; done rm -rf $(TOPDIR)/RPMS/noarch/*.rpm rm -rf $(TOPDIR)/SOURCES $(TOPDIR)/SPECS $(TOPDIR)/BUILD rm -rf $(TOPDIR)/disk1 rm -rf kit-*.iso rm -rf /tmp/$(NAME)-build /tmp/$(NAME)-$(VERSION).tar.gz .PHONY: components packages