fixed GetVersion's tag (now code_tag) and add code_url
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 13:56:20 +0000 (15:56 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 13:56:20 +0000 (15:56 +0200)
Makefile
sfa.spec
sfa/util/version.py.in

index 40c89ca..c122cf3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,13 +16,14 @@ uninstall: python-uninstall tests-uninstall
 .PHONY: all install clean uninstall
 
 VERSIONTAG=should-be-redefined-by-specfile
+SCMURL=should-be-redefined-by-specfile
 
 ##########
 python: version
 
 version: sfa/util/version.py
 sfa/util/version.py: sfa/util/version.py.in
-       sed -e "s,@VERSIONTAG@,$(VERSIONTAG),g" sfa/util/version.py.in > $@
+       sed -e "s,@VERSIONTAG@,$(VERSIONTAG),g" -e "s,@SCMURL@,$(SCMURL),g" sfa/util/version.py.in > $@
 
 xmlbuilder-install:
        cd xmlbuilder-0.9 && python setup.py install --root=$(DESTDIR) && cd -
index 522742e..22169d2 100644 (file)
--- a/sfa.spec
+++ b/sfa.spec
@@ -102,11 +102,11 @@ Provides some binary unit tests in /usr/share/sfa/tests
 %setup -q
 
 %build
-make VERSION=%{version}-%{taglevel}
+make VERSIONTAG="%{version}-%{taglevel}" SCMURL="%{SCMURL}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-make install VERSION=%{version}-%{taglevel} DESTDIR="$RPM_BUILD_ROOT"
+make VERSIONTAG="%{version}-%{taglevel}" SCMURL="%{SCMURL}" install DESTDIR="$RPM_BUILD_ROOT"
 
 %clean
 rm -rf $RPM_BUILD_ROOT
index a4edc93..37a1ab0 100644 (file)
@@ -1,11 +1,13 @@
 ### updated by the toplevel Makefile
 version_tag="@VERSIONTAG@"
+scm_url="@SCMURL@"
 import socket
 
 def version_core (more):
     core = { 'geni_api':1,
              'sfa' : 1,
-             'tag' : version_tag,
+             'code_tag' : version_tag,
+             'code_url' : scm_url,
              'hostname' : socket.gethostname(),
              }
     core.update(more)