|
From: <cd...@us...> - 2012-02-23 00:16:39
|
Revision: 1405
http://cap4.svn.sourceforge.net/cap4/?rev=1405&view=rev
Author: cdm4hp
Date: 2012-02-23 00:16:33 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
CDM: add collectl and make things work for a src.rpm or tgz to build with rpm call
Modified Paths:
--------------
trunk/toolbox/Makefile
trunk/toolbox/collectl/Makefile
trunk/toolbox/make.def
trunk/toolbox/make.workbench
Modified: trunk/toolbox/Makefile
===================================================================
--- trunk/toolbox/Makefile 2012-02-23 00:02:56 UTC (rev 1404)
+++ trunk/toolbox/Makefile 2012-02-23 00:16:33 UTC (rev 1405)
@@ -1,7 +1,7 @@
include ./make.def
TOOLDIRS = conman freeipmi genders nodediag pdsh powerman \
- python-hostlist
+ python-hostlist collectl
download:
$(call print-header,"cap4 toolbox download")
Modified: trunk/toolbox/collectl/Makefile
===================================================================
--- trunk/toolbox/collectl/Makefile 2012-02-23 00:02:56 UTC (rev 1404)
+++ trunk/toolbox/collectl/Makefile 2012-02-23 00:16:33 UTC (rev 1405)
@@ -2,7 +2,9 @@
VERSION=3.6.1
SRC=collectl-$(VERSION)
-TAR=$(SRC).src.tar.gz
-URL="http://sourceforge.net/projects/collectl/files/collectl/$(SRC)/$(TAR)"
+#TAR=$(SRC).src.tar.gz
+SRPM=$(SRC)-4.src.rpm
+TAR=$(SRPM)
+URL="http://sourceforge.net/projects/collectl/files/collectl/$(SRC)/$(SRPM)"
include ../make.workbench
Modified: trunk/toolbox/make.def
===================================================================
--- trunk/toolbox/make.def 2012-02-23 00:02:56 UTC (rev 1404)
+++ trunk/toolbox/make.def 2012-02-23 00:16:33 UTC (rev 1405)
@@ -44,3 +44,16 @@
echo "=========================================================";
endef
+define rpmbuild-src
+ @echo "Building: $1"
+ @if [ -f $1 ]; then \
+ file $1 | grep -q RPM; \
+ if [ $$? -eq 0 ]; then \
+ rpmbuild --rebuild $1 > .rpmbuild 2>&1; \
+ else \
+ rpmbuild -tb $1 > .rpmbuild 2>&1; \
+ fi; \
+ else \
+ echo "$1 not found, download manually or set http_proxy env variable?"; exit 1; \
+ fi;
+endef
Modified: trunk/toolbox/make.workbench
===================================================================
--- trunk/toolbox/make.workbench 2012-02-23 00:02:56 UTC (rev 1404)
+++ trunk/toolbox/make.workbench 2012-02-23 00:16:33 UTC (rev 1405)
@@ -8,9 +8,10 @@
rpm: .rpmbuild-$(SRC)
.rpmbuild-$(SRC): $(TAR)
- rpmbuild -tb $(TAR) > .rpmbuild-$(SRC) 2>&1
+ $(call rpmbuild-src,$(TAR))
+ @[ -f .rpmbuild ] && mv .rpmbuild .rpmbuild-$(SRC)
@touch $@
clean distclean:
- rm -fr $(TAR) .rpmbuild-$(SRC)
+ rm -fr $(TAR) .rpmbuild-$(SRC)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|