More fixes for --installer

This commit is contained in:
Josh Yelon 2007-06-22 05:45:35 +00:00
parent bee450554b
commit 8891d15f02

View File

@ -4674,7 +4674,7 @@ def MakeInstallerLinux():
if (os.path.exists("/usr/bin/dpkg-deb")): if (os.path.exists("/usr/bin/dpkg-deb")):
oscmd("dpkg --print-architecture > built/tmp/architecture.txt") oscmd("dpkg --print-architecture > built/tmp/architecture.txt")
if (os.path.exists("/usr/bin/rpmbuild")): if (os.path.exists("/usr/bin/rpmbuild")):
oscmd("rpm -E '{%_arch}' > built/tmp/architecture.txt") oscmd("rpm -E '%_arch' > built/tmp/architecture.txt")
ARCH=ReadFile("built/tmp/architecture.txt").strip() ARCH=ReadFile("built/tmp/architecture.txt").strip()
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH) oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH)
oscmd("mkdir -p linuxroot/usr/bin") oscmd("mkdir -p linuxroot/usr/bin")
@ -4723,7 +4723,6 @@ def MakeInstallerLinux():
txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE)
WriteFile("panda3d.spec", txt) WriteFile("panda3d.spec", txt)
oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec") oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec")
if (os.path.exists(ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm")):
oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .") oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .")
oscmd("chmod -R 755 linuxroot") oscmd("chmod -R 755 linuxroot")