# 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 13 2008-10-20 01:55:48Z ltsai $ # # include user-defined kit-specific information ARCH = $(shell uname -i) .PHONY: sles rhel sles: make iso KIT="lava" KUSU_BUILD_DIST=sles KUSU_BUILD_DISTVER=10 KUSU_BUILD_ARCH=x86_64 rhel: make iso KIT="lava" KUSU_BUILD_DIST=rhel KUSU_BUILD_DISTVER=5 KUSU_BUILD_ARCH=x86_64 ifdef KUSU_BUILD_DIST KUSU_DISTRO_NAME=$(KUSU_BUILD_DIST) endif ifdef KUSU_BUILD_DISTVER KUSU_DISTRO_VERSION=$(KUSU_BUILD_DISTVER) endif ifdef KUSU_BUILD_ARCH KUSU_DISTRO_ARCH=$(KUSU_BUILD_ARCH) endif ifndef KUSU_DISTRO_VERSION_MINOR KUSU_DISTRO_VERSION_MINOR='*' endif ifeq ($(KUSU_DISTRO_NAME), sles) include config.mk.sles KIT_OS_NAME=$(KUSU_DISTRO_NAME) KITINFO_TEMPLATE=kitinfo.in.sles endif ifeq ($(KUSU_DISTRO_NAME), opensuse) include config.mk.sles KIT_OS_NAME=$(KUSU_DISTRO_NAME) KITINFO_TEMPLATE=kitinfo.in.sles endif ifeq ($(KUSU_DISTRO_NAME), centos) include config.mk KIT_OS_NAME=rhelfamily KITINFO_TEMPLATE=kitinfo.in endif ifeq ($(KUSU_DISTRO_NAME), rhel) include config.mk KIT_OS_NAME=rhelfamily KITINFO_TEMPLATE=kitinfo.in endif KIT_OS_VERSION=$(KUSU_DISTRO_VERSION) KIT_OS_VERSION_MINOR=$(KUSU_DISTRO_VERSION_MINOR) KIT_OS_ARCH=$(KUSU_DISTRO_ARCH) TGZ_ARTIFACTS += kitinfo SRPM_ARTIFACTS += kitinfo RPM_ARTIFACTS += kitinfo ISO_ARTIFACTS += kitinfo include kits.mk KIT_DESCRIPTION=Lava Kit for $(KUSU_DISTRO_NAME) $(KUSU_DISTRO_VERSION) $(KUSU_DISTRO_ARCH) .PHONY: kitinfo kitinfo: @sed -e 's%$${PKG_COMPONENT_LAVA_MASTER_NAME}%$(PKG_COMPONENT_LAVA_MASTER_NAME)%g' \ -e 's%$${PKG_COMPONENT_LAVA_MASTER_VERSION}%$(PKG_COMPONENT_LAVA_MASTER_VERSION)%g' \ -e 's%$${PKG_COMPONENT_LAVA_MASTER_RELEASE}%$(PKG_COMPONENT_LAVA_MASTER_RELEASE)%g' \ -e 's%$${PKG_COMPONENT_LAVA_COMPUTE_NAME}%$(PKG_COMPONENT_LAVA_COMPUTE_NAME)%g' \ -e 's%$${PKG_COMPONENT_LAVA_COMPUTE_VERSION}%$(PKG_COMPONENT_LAVA_COMPUTE_VERSION)%g' \ -e 's%$${PKG_COMPONENT_LAVA_COMPUTE_RELEASE}%$(PKG_COMPONENT_LAVA_COMPUTE_RELEASE)%g' \ -e 's%$${KIT_OS_NAME}%$(KIT_OS_NAME)%g' \ -e 's%$${KIT_OS_VERSION}%$(KIT_OS_VERSION)%g' \ -e 's%$${KIT_OS_VERSION_MINOR}%$(KIT_OS_VERSION_MINOR)%g' \ -e 's%$${KIT_OS_ARCH}%$(KIT_OS_ARCH)%g' \ -e 's%$${KIT_VERSION}%$(KIT_VERSION)%g' \ -e 's%$${KIT_RELEASE}%$(KIT_RELEASE)%g' \ -e 's%$${KIT_DESCRIPTION}%$(KIT_DESCRIPTION)%g' \ packages/$(PKG_KIT_LAVA_NAME)/$(KITINFO_TEMPLATE) > packages/$(PKG_KIT_LAVA_NAME)/kitinfo .PHONY: echo echo: @echo KUSU_DISTRO_NAME = $(KUSU_DISTRO_NAME) @echo KUSU_DISTRO_VERSION = $(KUSU_DISTRO_VERSION) @echo KUSU_DISTRO_VERSION_MINOR = $(KUSU_DISTRO_VERSION_MINOR) @echo KUSU_DISTRO_ARCH = $(KUSU_DISTRO_ARCH)