mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
New way to build RPMs
This commit is contained in:
parent
882dbb172f
commit
1ca070aeab
@ -4699,21 +4699,13 @@ Version: VERSION
|
|||||||
Release: 1
|
Release: 1
|
||||||
License: Panda3D License
|
License: Panda3D License
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
BuildRoot: linuxroot
|
BuildRoot: PANDASOURCE/linuxroot
|
||||||
%description
|
%description
|
||||||
The Panda3D engine.
|
The Panda3D engine.
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
%build
|
|
||||||
true
|
|
||||||
%install
|
|
||||||
true
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%clean
|
|
||||||
true
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
/etc/Confauto.prc
|
/etc/Confauto.prc
|
||||||
@ -4730,13 +4722,13 @@ def MakeInstallerLinux():
|
|||||||
import compileall
|
import compileall
|
||||||
PYTHONV=os.path.basename(PYTHONSDK)
|
PYTHONV=os.path.basename(PYTHONSDK)
|
||||||
if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot")
|
if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot")
|
||||||
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz ")
|
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz i386 panda3d.spec")
|
||||||
oscmd("mkdir -p linuxroot/usr/bin")
|
oscmd("mkdir -p linuxroot/usr/bin")
|
||||||
oscmd("mkdir -p linuxroot/usr/include")
|
oscmd("mkdir -p linuxroot/usr/include")
|
||||||
oscmd("mkdir -p linuxroot/usr/share/panda3d")
|
oscmd("mkdir -p linuxroot/usr/share/panda3d")
|
||||||
oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload")
|
oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload")
|
||||||
oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages")
|
oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages")
|
||||||
oscmd("mkdir -p linuxroot/etc")
|
oscmd("mkdir -p linuxroot/etc/ld.so.conf.d")
|
||||||
oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc")
|
oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc")
|
||||||
oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc")
|
oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc")
|
||||||
oscmd("cp --recursive built/include linuxroot/usr/include/panda3d")
|
oscmd("cp --recursive built/include linuxroot/usr/include/panda3d")
|
||||||
@ -4750,6 +4742,7 @@ def MakeInstallerLinux():
|
|||||||
oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE")
|
oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE")
|
||||||
oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE")
|
oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE")
|
||||||
oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes")
|
oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes")
|
||||||
|
oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf")
|
||||||
oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
|
oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
|
||||||
oscmd("cp built/bin/* linuxroot/usr/bin/")
|
oscmd("cp built/bin/* linuxroot/usr/bin/")
|
||||||
for base in os.listdir("built/lib"):
|
for base in os.listdir("built/lib"):
|
||||||
@ -4773,8 +4766,13 @@ def MakeInstallerLinux():
|
|||||||
oscmd("chmod -R 755 linuxroot")
|
oscmd("chmod -R 755 linuxroot")
|
||||||
|
|
||||||
if (os.path.exists("/usr/bin/rpmbuild")):
|
if (os.path.exists("/usr/bin/rpmbuild")):
|
||||||
txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV)
|
txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE)
|
||||||
WriteFile("panda3d.spec", SPEC)
|
WriteFile("panda3d.spec", txt)
|
||||||
|
oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec")
|
||||||
|
oscmd("mv i386/panda3d-"+VERSION+"-1.i386.rpm .")
|
||||||
|
|
||||||
|
oscmd("chmod -R 755 linuxroot")
|
||||||
|
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz i386 panda3d.spec")
|
||||||
|
|
||||||
|
|
||||||
if (INSTALLER != 0):
|
if (INSTALLER != 0):
|
||||||
|
@ -37,24 +37,6 @@
|
|||||||
#define EXPCL_GL EXPCL_PANDAGL
|
#define EXPCL_GL EXPCL_PANDAGL
|
||||||
#define EXPTP_GL EXPTP_PANDAGL
|
#define EXPTP_GL EXPTP_PANDAGL
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32_VC
|
|
||||||
// Must include windows.h before gl.h on NT
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef IS_OSX
|
|
||||||
#define __glext_h_
|
|
||||||
#include <OpenGL/gl.h>
|
|
||||||
#include <OpenGL/glu.h>
|
|
||||||
#else
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#ifdef HAVE_GLU
|
|
||||||
#include <GL/glu.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "glstuff_src.h"
|
#include "glstuff_src.h"
|
||||||
|
|
||||||
#endif // GLGSG_H
|
#endif // GLGSG_H
|
||||||
|
@ -37,26 +37,24 @@
|
|||||||
// This file is not protected from multiple inclusion; it may need to
|
// This file is not protected from multiple inclusion; it may need to
|
||||||
// be included multiple times.
|
// be included multiple times.
|
||||||
|
|
||||||
// This forces the stuff in panda_glext.h to be reloaded,
|
|
||||||
// if it was already loaded.
|
// This prevents glext.h from getting included by gl.h
|
||||||
#if defined(GL_GLEXT_VERSION) && GL_GLEXT_VERSION < 29
|
// That way, we can provide our own, better version.
|
||||||
#undef GL_GLEXT_VERSION
|
#define __glext_h_
|
||||||
#undef GL_GLEXT_PROTOTYPES
|
#define GL_GLEXT_VERSION 0
|
||||||
#ifndef IS_OSX
|
|
||||||
#undef GL_VERSION_1_2
|
#include <GL/gl.h>
|
||||||
#undef GL_VERSION_1_3
|
#ifdef HAVE_GLU
|
||||||
#undef GL_VERSION_1_4
|
#include <GL/glu.h>
|
||||||
#undef GL_VERSION_1_5
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef IS_OSX
|
|
||||||
#undef GL_GLEXT_VERSION
|
|
||||||
#undef GL_GLEXT_PROTOTYPES
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef GL_GLEXT_VERSION
|
||||||
#include "panda_glext.h"
|
#include "panda_glext.h"
|
||||||
|
|
||||||
|
#ifndef GL_VERSION_1_5
|
||||||
|
#error "hey, where's 1.5"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "glmisc_src.h"
|
#include "glmisc_src.h"
|
||||||
#include "glTextureContext_src.h"
|
#include "glTextureContext_src.h"
|
||||||
#include "glVertexBufferContext_src.h"
|
#include "glVertexBufferContext_src.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user