gunnar: server/kolab-freebusy Makefile,1.4,1.5
cvs at kolab.org
cvs at kolab.org
Fri Aug 24 09:14:18 CEST 2007
Author: gunnar
Update of /kolabrepository/server/kolab-freebusy
In directory doto:/tmp/cvs-serv4704/kolab-freebusy
Modified Files:
Makefile
Log Message:
The makefiles won't work this way with the OpenPKG build.pl script. Fixed so that the spec only contains one version number.
Index: Makefile
===================================================================
RCS file: /kolabrepository/server/kolab-freebusy/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile 23 Aug 2007 09:54:58 -0000 1.4
+++ Makefile 24 Aug 2007 07:14:16 -0000 1.5
@@ -1,16 +1,19 @@
PACKAGE = $(shell grep "%define[ ]*V_package" *.spec | sed -e "s/.*V_package \([a-z\_-]*\).*/\1/")
-BASE_VERSION = $(shell grep "%define[ ]*V_base_version" *.spec | sed -e "s/.*V_base_version\s*\([0-9.]*\).*/\1/")
-RELEASE = $(shell grep "%define[ ]*V_release" *.spec | sed -e "s/.*V_release\s*\([0-9]*\).*/\1/")
-CVS = $(shell grep "%define[ ]*V_cvs" *.spec | sed -e "s/.*V_cvs\s*\([01]\).*/\1/")
+RELEASE = $(shell date '+%Y%m%d')
-ifeq "x$(CVS)" "x1"
-VERSION=$(BASE_VERSION).cvs
-TAR=$(PACKAGE)-$(VERSION)-$(RELEASE).tar.bz2
+VERSION = 2.1.0
+CVS = 1
+
+ifeq "x$(CVS)" "x0"
+ SOURCE_TAG = $(VERSION)
+ SPEC_VERSION = $(VERSION)
else
-VERSION=$(BASE_VERSION)
-TAR=$(PACKAGE)-$(VERSION).tar.bz2
+ SOURCE_TAG = $(VERSION).cvs-$(RELEASE)
+ SPEC_VERSION = $(VERSION).cvs
endif
+TAR = $(PACKAGE)-$(SOURCE_TAG).tar.bz2
+
ifeq "x$(RPM)" "x"
RPM = $(HOME)/bin/openpkg rpm
endif
@@ -25,11 +28,11 @@
endif
.PHONY: all
-all: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
+all: $(PACKAGE)-$(SPEC_VERSION)-$(RELEASE).src.rpm
.PHONY: dist
dist: all
- cp $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../stage/
+ cp $(PACKAGE)-$(SPEC_VERSION)-$(RELEASE).src.rpm ../stage/
.PHONY: clean_all
clean_all: clean
@@ -41,15 +44,20 @@
rm -rf *.src.rpm
rm -rf *.tar.bz2
-$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec $(TAR)
+$(PACKAGE)-$(SPEC_VERSION)-$(RELEASE).src.rpm: Makefile $(PACKAGE).spec $(TAR)
test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
cp $(TAR) $(KOLABRPMSRC)/$(PACKAGE)/
- cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)
+ cp $(PACKAGE).spec $(PACKAGE).spec.tmp
+ sed -i -e 's/\@VERSION\@/$(SPEC_VERSION)/' $(PACKAGE).spec.tmp
+ sed -i -e 's/\@RELEASE\@/$(RELEASE)/' $(PACKAGE).spec.tmp
+ sed -i -e 's/\@SOURCE_TAG\@/$(SOURCE_TAG)/' $(PACKAGE).spec.tmp
+ mv $(PACKAGE).spec.tmp $(KOLABRPMSRC)/$(PACKAGE)/$(PACKAGE).spec
+
cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm .
+ cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(SPEC_VERSION)-$(RELEASE).src.rpm .
.PHONY: tardist
tardist: $(TAR)
More information about the commits
mailing list