# 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="ntop" KUSU_BUILD_DIST=sles KUSU_BUILD_DISTVER=10 KUSU_BUILD_ARCH=x86_64 rhel: make iso KIT="ntop" 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) endif ifdef KUSU_BUILD_DISTVER_MINOR KUSU_DISTRO_VERSION_MINOR=$(KUSU_BUILD_DISTVER_MINOR) endif ifdef KUSU_BUILD_ARCH KUSU_DISTRO_ARCH=$(KUSU_BUILD_ARCH) endif ifeq ($(KUSU_DISTRO_NAME), sles) include config.mk.sles KIT_OS_NAME=$(KUSU_DISTRO_NAME) endif ifeq ($(KUSU_DISTRO_NAME), opensuse) include config.mk.opensuse KIT_OS_NAME=$(KUSU_DISTRO_NAME) endif ifeq ($(KUSU_DISTRO_NAME), centos) include config.mk KIT_OS_NAME=rhelfamily endif ifeq ($(KUSU_DISTRO_NAME), rhel) include config.mk KIT_OS_NAME=rhelfamily endif KIT_OS_MAJOR_VERSION=$(KUSU_DISTRO_VERSION) KIT_OS_ARCH=$(KUSU_DISTRO_ARCH) TGZ_ARTIFACTS += kitinfo SRPM_ARTIFACTS += kitinfo RPM_ARTIFACTS += kitinfo ISO_ARTIFACTS += kitinfo include kits.mk ifdef KUSU_DISTRO_VERSION_MINOR KIT_OS_MINOR_VERSION=$(KUSU_DISTRO_VERSION_MINOR) KIT_DESCRIPTION=Ntop Kit for $(KUSU_DISTRO_NAME) $(KUSU_DISTRO_VERSION).$(KUSU_DISTRO_VERSION_MINOR) $(KUSU_DISTRO_ARCH) else KIT_OS_MINOR_VERSION='*' KIT_DESCRIPTION=Ntop Kit for $(KUSU_DISTRO_NAME) $(KUSU_DISTRO_VERSION) $(KUSU_DISTRO_ARCH) endif .PHONY: kitinfo kitinfo: @sed -e 's%$${PKG_COMPONENT_NTOP_NAME}%$(PKG_COMPONENT_NTOP_NAME)%g' \ -e 's%$${PKG_COMPONENT_NTOP_VERSION}%$(PKG_COMPONENT_NTOP_VERSION)%g' \ -e 's%$${PKG_COMPONENT_NTOP_RELEASE}%$(PKG_COMPONENT_NTOP_RELEASE)%g' \ -e 's%$${KIT_OS_NAME}%$(KIT_OS_NAME)%g' \ -e 's%$${KIT_OS_MAJOR_VERSION}%$(KIT_OS_MAJOR_VERSION)%g' \ -e 's%$${KIT_OS_MINOR_VERSION}%$(KIT_OS_MINOR_VERSION)%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_NTOP_NAME)/kitinfo.in > packages/$(PKG_KIT_NTOP_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)