Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim <jim@38b22f21-9aea-0310-abfc-843a9883df58>2008-11-18 02:37:03 (GMT)
committer jim <jim@38b22f21-9aea-0310-abfc-843a9883df58>2008-11-18 02:37:03 (GMT)
commit49b2094bfa487e850cc994931f36dcc009ad933f (patch)
tree9a095f801e9f0803391a3453b943fad93ceeced1
parent461423bf83b0f58e921e1fe34a403281aadc330f (diff)
let rpmbuild decide dist so it works on kernels with misplaced or no dist
git-svn-id: https://exe.svn.sourceforge.net/svnroot/exe/trunk@3574 38b22f21-9aea-0310-abfc-843a9883df58
-rw-r--r--installs/rpm/exe.spec2
-rw-r--r--installs/rpm/make.py17
2 files changed, 8 insertions, 11 deletions
diff --git a/installs/rpm/exe.spec b/installs/rpm/exe.spec
index 0702617..bca08e7 100644
--- a/installs/rpm/exe.spec
+++ b/installs/rpm/exe.spec
@@ -5,7 +5,7 @@
Summary: eXe eLearning XHTML editor
Name: exe
Version: %{?clversion}%{!?clversion:%{ver}}
-Release: %{?clrelease}%{!?clrelease:1%{?dist:.%{dist}}}
+Release: %{?clrelease}%{?dist:%{dist}}%{!?clrelease:1%{?dist:%{dist}}}
Source0: exe-%{version}-source.tgz
License: GPL
Group: Applications/Editors
diff --git a/installs/rpm/make.py b/installs/rpm/make.py
index 9cda909..c89238a 100644
--- a/installs/rpm/make.py
+++ b/installs/rpm/make.py
@@ -4,6 +4,7 @@
import sys
import os
+import glob
import subprocess
# TOPDIR root of RPM build tree typically /usr/src/redhat or /home/xxx/.rpm
@@ -29,19 +30,15 @@ except OSError:
sys.path.insert(0, os.path.join(SRCDIR, 'exe'))
from exe.engine import version
-# get the distribution
-pipe = subprocess.Popen('uname -r', shell = True, stdout = subprocess.PIPE).stdout
-dist = pipe.read().strip()
-dist = dist[dist.rfind('.')+1:]
-
# find the first release that doesn't exist
-relno = 1
+clrelease = 1
while 1:
- clrelease = "%d.%s" % (relno, dist)
- if not os.path.isfile(os.path.join(TOPDIR, 'RPMS/i386',
- 'exe-%s-%s.i386.rpm' % (version.version, clrelease))):
+ files = glob.glob(os.path.join(TOPDIR, 'RPMS/i386',
+ 'exe-%s-%d.*.i386.rpm' % (version.version, clrelease)))
+ if len(files) == 0:
break
- relno = relno + 1
+ clrelease += 1
+
print "Making version: %s release: %s" % (version.version, clrelease)
# create the source tarball