mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
New way to build RPMs
This commit is contained in:
parent
882dbb172f
commit
1ca070aeab
@ -4699,21 +4699,13 @@ Version: VERSION
|
||||
Release: 1
|
||||
License: Panda3D License
|
||||
Group: Development/Libraries
|
||||
BuildRoot: linuxroot
|
||||
BuildRoot: PANDASOURCE/linuxroot
|
||||
%description
|
||||
The Panda3D engine.
|
||||
%prep
|
||||
%setup -q
|
||||
%build
|
||||
true
|
||||
%install
|
||||
true
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%clean
|
||||
true
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/etc/Confauto.prc
|
||||
@ -4730,13 +4722,13 @@ def MakeInstallerLinux():
|
||||
import compileall
|
||||
PYTHONV=os.path.basename(PYTHONSDK)
|
||||
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/include")
|
||||
oscmd("mkdir -p linuxroot/usr/share/panda3d")
|
||||
oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload")
|
||||
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("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc")
|
||||
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/include/panda3d/LICENSE")
|
||||
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("cp built/bin/* linuxroot/usr/bin/")
|
||||
for base in os.listdir("built/lib"):
|
||||
@ -4773,10 +4766,15 @@ def MakeInstallerLinux():
|
||||
oscmd("chmod -R 755 linuxroot")
|
||||
|
||||
if (os.path.exists("/usr/bin/rpmbuild")):
|
||||
txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV)
|
||||
WriteFile("panda3d.spec", SPEC)
|
||||
|
||||
|
||||
txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE)
|
||||
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 (sys.platform == "win32"):
|
||||
MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
|
||||
|
@ -37,24 +37,6 @@
|
||||
#define EXPCL_GL EXPCL_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"
|
||||
|
||||
#endif // GLGSG_H
|
||||
|
@ -37,26 +37,24 @@
|
||||
// This file is not protected from multiple inclusion; it may need to
|
||||
// be included multiple times.
|
||||
|
||||
// This forces the stuff in panda_glext.h to be reloaded,
|
||||
// if it was already loaded.
|
||||
#if defined(GL_GLEXT_VERSION) && GL_GLEXT_VERSION < 29
|
||||
#undef GL_GLEXT_VERSION
|
||||
#undef GL_GLEXT_PROTOTYPES
|
||||
#ifndef IS_OSX
|
||||
#undef GL_VERSION_1_2
|
||||
#undef GL_VERSION_1_3
|
||||
#undef GL_VERSION_1_4
|
||||
#undef GL_VERSION_1_5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef IS_OSX
|
||||
#undef GL_GLEXT_VERSION
|
||||
#undef GL_GLEXT_PROTOTYPES
|
||||
|
||||
// This prevents glext.h from getting included by gl.h
|
||||
// That way, we can provide our own, better version.
|
||||
#define __glext_h_
|
||||
#define GL_GLEXT_VERSION 0
|
||||
|
||||
#include <GL/gl.h>
|
||||
#ifdef HAVE_GLU
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#undef GL_GLEXT_VERSION
|
||||
#include "panda_glext.h"
|
||||
|
||||
#ifndef GL_VERSION_1_5
|
||||
#error "hey, where's 1.5"
|
||||
#endif
|
||||
|
||||
#include "glmisc_src.h"
|
||||
#include "glTextureContext_src.h"
|
||||
#include "glVertexBufferContext_src.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user