# 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 .PHONY: sles rhel sles: make iso KIT="cacti" KUSU_BUILD_DIST=sles KUSU_BUILD_DISTVER=10 KUSU_BUILD_ARCH=x86_64 rhel: make iso KIT="cacti" KUSU_BUILD_DIST=rhel KUSU_BUILD_DISTVER=5 KUSU_BUILD_ARCH=x86_64 ARCH = $(shell uname -i) ifdef KUSU_BUILD_DIST KUSU_DISTRO_NAME=$(KUSU_BUILD_DIST) endif ifdef KUSU_BUILD_DISTVER KUSU_DISTRO_VERSION=$(KUSU_BUILD_DISTVER) else KUSU_DISTRO_VERSION='*' endif ifdef KUSU_BUILD_ARCH KUSU_DISTRO_ARCH=$(KUSU_BUILD_ARCH) else KUSU_DISTRO_ARCH='*' endif ifeq ($(KUSU_DISTRO_NAME), sles) include config.mk.sles KITINFO_TEMPLATE=kitinfo.in.sles endif ifeq ($(KUSU_DISTRO_NAME), opensuse) include config.mk.sles KITINFO_TEMPLATE=kitinfo.in.sles endif ifeq ($(KUSU_DISTRO_NAME), centos) include config.mk CACTI_OS_NAME=rhelfamily KITINFO_TEMPLATE=kitinfo.in endif ifeq ($(KUSU_DISTRO_NAME), rhel) include config.mk CACTI_OS_NAME=rhelfamily KITINFO_TEMPLATE=kitinfo.in endif TGZ_ARTIFACTS += kitinfo SRPM_ARTIFACTS += kitinfo RPM_ARTIFACTS += kitinfo ISO_ARTIFACTS += kitinfo include kits.mk ifndef CACTI_OS_NAME CACTI_OS_NAME=$(KUSU_DISTRO_NAME) endif KIT_DESCRIPTION=Cacti Kit for $(KUSU_DISTRO_NAME) $(KUSU_DISTRO_VERSION) $(KUSU_DISTRO_ARCH) .PHONY: kitinfo kitinfo: @sed -e 's%$${PKG_COMPONENT_CACTI_VERSION}%$(PKG_COMPONENT_CACTI_VERSION)%g' \ -e 's%$${PKG_COMPONENT_CACTI_RELEASE}%$(PKG_COMPONENT_CACTI_RELEASE)%g' \ -e 's%$${PKG_COMPONENT_CACTI_MONITORED_NODE_VERSION}%$(PKG_COMPONENT_CACTI_MONITORED_NODE_VERSION)%g' \ -e 's%$${PKG_COMPONENT_CACTI_MONITORED_NODE_RELEASE}%$(PKG_COMPONENT_CACTI_MONITORED_NODE_RELEASE)%g' \ -e 's%$${CACTI_OS_NAME}%$(CACTI_OS_NAME)%g' \ -e 's%$${KUSU_DISTRO_VERSION}%$(KUSU_DISTRO_VERSION)%g' \ -e 's%$${KUSU_DISTRO_ARCH}%$(KUSU_DISTRO_ARCH)%g' \ -e 's%$${KIT_VERSION}%$(KIT_VERSION)%g' \ -e 's%$${KIT_RELEASE}%$(KIT_RELEASE)%g' \ -e 's%$${KIT_DESCRIPTION}%$(KIT_DESCRIPTION)%g' \ packages/kit-cacti/$(KITINFO_TEMPLATE) > packages/kit-cacti/kitinfo .PHONY: echo echo: @echo KUSU_DISTRO_NAME = $(KUSU_DISTRO_NAME) @echo KUSU_DISTRO_VERSION = $(KUSU_DISTRO_VERSION) @echo KUSU_DISTRO_ARCH = $(KUSU_DISTRO_ARCH)