Merge branch 'master' of ssh://git.onelab.eu/git/sfa
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 13:56:29 +0000 (15:56 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 22 Oct 2010 13:56:29 +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 fb176da..eb23ec4 100644 (file)
--- a/sfa.spec
+++ b/sfa.spec
@@ -1,6 +1,3 @@
-
-%define url $URL$
-
 %define name sfa
 %define version 1.0
 %define taglevel 6
@@ -20,7 +17,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 Vendor: PlanetLab
 Packager: PlanetLab Central <support@planet-lab.org>
 Distribution: PlanetLab %{plrelease}
-URL: %(echo %{url} | cut -d ' ' -f 2)
+URL: %SCMURL}
 Summary: the SFA python libraries
 Group: Applications/System
 
@@ -105,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)