add version to script files when doing rpm build

This commit is contained in:
Frank Zhang 2010-12-07 18:25:00 -08:00
parent e279389c2b
commit 6ad104f3b2
3 changed files with 4 additions and 2 deletions

View File

@ -337,7 +337,7 @@ echo Doing open source build
# this fixes the /usr/com bug on centos5
%define _localstatedir /var
%define _sharedstatedir /var/lib
./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --javadir=%{_javadir} --sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} --docdir=%{_docdir}/%{name}-%{version} --with-tomcat=%{_datadir}/tomcat6 --tomcat-user=%{name} --fast
./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --javadir=%{_javadir} --sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} --docdir=%{_docdir}/%{name}-%{version} --with-tomcat=%{_datadir}/tomcat6 --tomcat-user=%{name} --fast --build-number=%{_ver}-%{release}
./waf build --build-number=%{?_build_number}
%install

View File

@ -53,6 +53,7 @@ def build_jars ():
"-Ddist.dir=%s" % distdir,
"-Dbase.dir=%s" % sourcedir,
"-f %s" % Utils.relpath (_join(sourcedir, "build.xml")),
"-Dimpl.version=%s" % Utils.getbuildnumber (),
]
if not buildpremium: ant_args += ["-DOSS=true"]

View File

@ -262,7 +262,8 @@ conf.env.CLASSPATH = pathsep.join(compilecp)
conf.check_message_2('Done','GREEN')
# log4j config and property config files require backslash escapes on Windows
conf.env.VERSION = Utils.g_module.VERSION
#conf.env.VERSION = Utils.g_module.VERSION
conf.env.VERSION = Utils.getbuildnumber ()
conf.env.AGENTLIBDIR = Utils.subst_vars(_join("${LIBDIR}","${AGENTPATH}"),conf.env)
conf.env.AGENTSYSCONFDIR = Utils.subst_vars(_join("${SYSCONFDIR}","${AGENTPATH}"),conf.env)