Changeset 13540
- Timestamp:
- 06/22/11 01:53:45 (11 months ago)
- Files:
-
- 1 modified
-
packaging/centuryegg/find-srpms (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
packaging/centuryegg/find-srpms
r13520 r13540 236 236 # In RedHat 4, strip off the first 8 lines - boolean logic old rpmtools can't handle 237 237 lines = [lines[1]] + lines[8:] 238 if p == "protobuf" and version <= 5:239 lines = [lines[8]] + lines[10:]240 lines = lines[:18] + lines[21:]241 238 for line in lines: 242 239 if line.startswith("%define"): … … 246 243 if "-n" not in line: 247 244 line = line.rstrip("\n") + " -n %{name}-%{version}\n" 248 if replace_python and "python " in line :245 if replace_python and "python " in line and "with_python" not in line: 249 246 line = line.replace("/usr/bin/python ","%{__python} ").replace("python ", "%{__python} ") 250 247 line_parts = line.split() … … 336 333 if package_name == "python-sqlite2" and line.startswith("%dir %{python_sitearch}"): 337 334 specfile.write("%%{python_sitearch}/pysqlite-*-py%s.egg-info\n" % python_version) 338 if package_name == "protobuf" and "py2. 6" in line:339 line = line.replace("py2. 6", "py%s" % python_version)335 if package_name == "protobuf" and "py2.5" in line: 336 line = line.replace("py2.5", "py%s" % python_version) 340 337 if version <= 4 and package_name == "python-sqlalchemy" and "filter_setup" in line or "filter_provides" in line: 341 338 continue … … 382 379 rpmdefines.extend(["--define", '"_without_java 1"']) 383 380 rpmdefines.extend(["--define", '"_without_gtest 1"']) 381 rpmdefines.extend(["--define", '"_without_python 0"']) 384 382 else: 385 383 rpmdefines.extend(["--define", "_without_java 1"]) 386 384 rpmdefines.extend(["--define", "_without_gtest 1"]) 385 rpmdefines.extend(["--define", '_without_python 0']) 387 386 print "Build arguments: ",["rpmbuild"]+rpmdefines+["-ba",new_specfile_name] 388 387 retcode = subprocess.call(["rpmbuild"] + rpmdefines + ["-ba", new_specfile_name], stdout=logfile, stderr=logfile)
