common koji_branches,NONE,1.1 Makefile.common,1.41,1.42

Dennis Gilmore (ausil) fedora-extras-commits at redhat.com
Fri Mar 23 22:59:33 UTC 2007


Author: ausil

Update of /cvs/extras/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20516

Modified Files:
	Makefile.common 
Added Files:
	koji_branches 
Log Message:
add initial make koji support



--- NEW FILE koji_branches ---
RHL-7:rhl7:.rhl7:rhl:7
RHL-8:rhl8:.rhl8:rhl:8
RHL-9:rhl9:.rhl9:rhl:9
EL-4:el4:.el4:epel:4
EL-5:el5:.el5:epel:5
FC-1:fc1:.fc1:fedora:1
FC-2:fc2:.fc2:fedora:2
FC-3:fc3:.fc3:fedora:3
FC-4:fc4:.fc4:fedora:4
FC-5:fc5:.fc5:fedora:5
FC-6:fc6:.fc6:fedora:6
devel:jk-test1:.fc7:fedora:7


Index: Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- Makefile.common	25 Feb 2007 21:05:43 -0000	1.41
+++ Makefile.common	23 Mar 2007 22:59:03 -0000	1.42
@@ -27,6 +27,14 @@
 DISTVAL = $(word 4, $(BRANCHINFO))
 DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)"
 
+KOJI_BRANCHINFO  = $(shell grep ^$(BRANCH): $(COMMON_DIR)/koji_branches | cut -d: --output-delimiter=" " -f2-)
+KOJI_TARGET := $(word 1, $(KOJI_BRANCHINFO))
+KOJI_DIST = $(word 2, $(KOJI_BRANCHINFO))
+KOJI_DISTVAR = $(word 3, $(KOJI_BRANCHINFO))
+KOJI_DISTVAL = $(word 4, $(KOJI_BRANCHINFO))
+KOJI_DIST_DEFINES = --define "dist $(DIST)" --define "$(KOJI_DISTVAR) $(KOJI_DISTVAL)"
+BUILD_FLAGS ?=  $(shell echo $(KOJI_FLAGS))
+
 ## a base directory where we'll put as much temporary working stuff as we can
 ifndef WORKDIR
 WORKDIR := $(shell pwd)
@@ -95,6 +103,7 @@
 WGET	?= $(shell if test -f /usr/bin/wget ; then echo "wget -nd -m" ; fi)
 CLIENT	?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET)))
 PLAGUE_CLIENT ?= $(shell which plague-client)
+BUILD_CLIENT ?= $(shell which koji) 
 
 # RPM with all the overrides in place; you can override this in your
 # .cvsextrasrc also, to use a default rpm setup
@@ -348,6 +357,15 @@
 	if [ $$ret -ne 0 ]; then echo "$(SPECFILE) not tagged with tag $(TAG)"; exit 1;  fi
 	$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET)
 
+koji: $(COMMON_DIR)/branches
+	@if [ ! -x $(BUILD_CLIENT) ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi
+	@if [ -z "$(TARGET)" -a ! -d CVS ]; then echo "Must be in a branch subdirectory"; exit 1; fi
+
+	@cvs status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\
+	if [ $$ret -ne 0 ]; then echo "$(SPECFILE) not tagged with tag $(TAG)"; exit 1;  fi
+	
+	echo "$(BUILD_CLIENT) build $(BUILD_FLAGS) $(KOJI_TARGET) 'cvs://cvs.fedoraproject.org/cvs/extras?$(CVS_REPOSITORY)#$(TAG)'"
+	@$(BUILD_CLIENT) build $(BUILD_FLAGS) $(KOJI_TARGET) 'cvs://cvs.fedoraproject.org/cvs/extras?$(CVS_REPOSITORY)#$(TAG)'
 
 # "make new | less" to see what has changed since the last tag was assigned
 new:




More information about the fedora-extras-commits mailing list