# 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 = platform_ofed VERSION = 1.3 RELEASE = 0 TOPDIR = $(PWD) ARCH = $(shell arch) RPMS = `find $(TOPDIR)/RPMS/ -type f |grep -v '.svn'` default: all all: packages components kit packages: -mkdir -p $(TOPDIR)/RPMS/$(ARCH) -mkdir -p $(TOPDIR)/BUILD cd packages; make components: cd components; make kit: -mkdir -p $(TOPDIR)/BUILD echo "%_topdir $(TOPDIR)" > $(HOME)/.rpmmacros rpmbuild -bb kit-$(NAME).spec -rm -rf $(HOME)/.rpmmacros mkdir -p $(TOPDIR)/disk1/$(NAME) cd $(TOPDIR)/disk1/$(NAME) ; \ for i in $(RPMS); do ln -sf $$i; done mkisofs -quiet -V "Platform OFED $(VERSION) Kit" -r -T -f -o kit-$(NAME)-$(VERSION)-$(RELEASE).noarch.iso disk1 clean: rm -rf $(TOPDIR)/RPMS/$(ARCH)/* rm -rf $(TOPDIR)/disk1 cd components; make clean cd packages; make clean rm -rf kit-*.iso BUILD RPMS SOURCES rm -rf *.rpm .PHONY: components packages