[FIX] Redhat Package Manager
authorStephane Wirtel <stephane@tinyerp.com>
Fri, 23 Jan 2009 12:14:04 +0000 (13:14 +0100)
committerStephane Wirtel <stephane@tinyerp.com>
Fri, 23 Jan 2009 12:14:04 +0000 (13:14 +0100)
lp bug: https://launchpad.net/bugs/311981 fixed
lp bug: https://launchpad.net/bugs/314575 fixed

bzr revid: stephane@tinyerp.com-20090123121404-345vxufyn1beqjt4

bin/release.py
rpminstall_sh.txt
setup.cfg
setup.py

index 9c96c3f..5fb882d 100644 (file)
@@ -22,7 +22,8 @@
 ##############################################################################
 
 name = 'openerp-server'
-version = '5.0.0_rc3'
+version = '5.0.0'
+release = '0_rc3'
 major_version = '5.0'
 description = 'OpenERP Server'
 long_desc = '''\
index 0d88cc1..c184585 100644 (file)
@@ -7,8 +7,7 @@
 # Need to overwrite the install-part of the RPM to append the
 # compression-suffix onto the filenames for the man-pages.
 #
-python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
+python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
 
 SUFFIX=gz
-mv INSTALLED_FILES INSTALLED_FILES.orig
-sed "s!\(/share/man/.*\)!\1.$SUFFIX!" INSTALLED_FILES.orig > INSTALLED_FILES
+sed "s!\(/share/man/.*\)!\1.$SUFFIX!" -i INSTALLED_FILES
index caf187e..7770708 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,8 @@ formats=gztar
 formats=rpm
 
 [bdist_rpm]
-release=1
+# release must exactly match 'release' as set in bin/release.py
+release=0_rc3
 
 requires=python >= 2.3
 #build-requires=python-devel >= 2.3
index 7c55dd4..a7c6ecb 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -44,6 +44,9 @@ opj = os.path.join
 
 execfile(opj('bin', 'release.py'))
 
+if sys.argv[1] != 'bdist_rpm':
+    version = version + '-' + release
+
 # get python short version
 py_short_version = '%s.%s' % sys.version_info[:2]