# (tpg) SET VERSION HERE !!! %define major 1 %define minor 8.1 %define librelease 1 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define staticname %mklibname %{name} -d -s Summary: The Irrlicht Engine SDK Name: irrlicht Version: %{major}.%{minor} Release: %mkrel 5 License: Zlib Group: Graphics/3D URL: http://irrlicht.sourceforge.net/ Source: http://prdownloads.sourceforge.net/irrlicht/%{name}-%{version}.zip Patch1: %{name}-1.8-library-makefile.patch Patch2: %{name}-1.8-use-system-libs.patch Patch3: %{name}-1.8-GUIEditor-makefile.patch Patch4: %{name}-1.8-IrrFontTool-makefile.patch Patch5: %{name}-1.8.1-mga-system-glext.patch Patch6: %{name}-1.8.1-fdr-mesa10.patch BuildRequires: imagemagick BuildRequires: zlib-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: mesagl-devel BuildRequires: pkgconfig(x11) BuildRequires: libxext-devel BuildRequires: libxxf86vm-devel BuildRequires: libxft-devel BuildRequires: bzip2-devel BuildRequires: fontconfig-devel BuildRequires: libxcursor-devel Requires: %{name}-media = %{version}-%{release} %description The Irrlicht Engine is an open source high performance realtime 3D engine written and usable in C++ and also available for .NET languages. It is completely cross-platform, using D3D, OpenGL and its own software renderer, and has all of the state-of-the-art features which can be found in commercial 3D engines. We've got a huge active community, and there are lots of projects in development that use the engine. You can find enhancements for Irrlicht all over the web, like alternative terrain renderers, portal renderers, exporters, world layers, tutorials, editors, language bindings for java, perl, ruby, basic, python, lua, and so on. And best of all: It's completely free. %package -n %{libname} Summary: Shared libraries for Irrlicht 3D engine Group: System/Libraries %description -n %{libname} Shared libraries for Irrlicht 3D engine. %package -n %{develname} Summary: Development files for Irrlicht 3D engine Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} %description -n %{develname} Development files for Irrlicht 3D engine. %package -n %{staticname} Summary: Static files for Irrlicht 3D engine Group: Development/C Requires: %{develname} = %{version}-%{release} %description -n %{staticname} Static files for Irrlicht 3D engine. %package examples Summary: Demos and examples for the Irrlicht 3D engine Group: Graphics/3D Requires: %{libname} = %{version}-%{release} %description examples Demos and examples for the Irrlicht 3D engine. %package media Summary: Media files for Irrlicht 3D engine Group: Graphics/3D Requires: %{name} = %{version}-%{release} %description media Media files needed by Irrlicht tools and demos. %package doc Summary: User documentation for the Irrlicht 3D engine Group: Graphics/3D BuildArch: noarch %description doc User documentation for the Irrlicht 3D engine. %prep %setup -q %apply_patches # clean Mac/Windows/Phone repository find examples/ -maxdepth 1 -iname '*window' -or -iname '*mac*' -or -iname '*mobile' | xargs -exec rm -Rvf {} \; find source/Irrlicht -maxdepth 1 -iname 'macos*' -exec rm -Rvf {} \; # clean Demo as it needs irrKlang rm -rf examples/Demo sed -i -e 's|Demo||g' examples/buildAllExamples.sh # make readme.txt utf8 sed -i 's/\r//' readme.txt iconv -o readme.txt.iso88591 -f iso88591 -t utf8 readme.txt mv readme.txt.iso88591 readme.txt # clean all '\r' in files for i in include/*.h doc/upgrade-guide.txt source/Irrlicht/*.cpp source/Irrlicht/*.h source/Irrlicht/Makefile; do sed -i 's/\r//' $i chmod -x $i touch -r changes.txt $i done # https://bugzilla.redhat.com/show_bug.cgi?id=1035757 sed -i -e '/_IRR_MATERIAL_MAX_TEXTURES_/s/4/8/' include/IrrCompileConfig.h %build %setup_compile_flags export LIBDIR="%{_libdir}" export PREFIX="%{_prefix}" export INCLUDEDIR="%{_includedir}" # use system wide libs, see patch2 rm -rf source/Irrlicht/{jpeglib,zlib,libpng,bzip2} find source/Irrlicht -name '*.cpp' | xargs sed -i -e 's|zlib/zlib.h|zlib.h|g' -e 's|libpng/png.h|png.h|g' -e 's|jpeglib/jerror.h|jerror.h|g' -e 's|jpeglib/jpeglib.h|jpeglib.h|g' find source/Irrlicht -name '*.h' | xargs sed -i -e 's|jpeglib/jpeglib.h|jpeglib.h|g' -e 's|libpng/png.h|png.h|g' -e 's|jpeglib/jerror.h|jerror.h|g' # media path sed -i -e 's|../../media/|%{_datadir}/irrlicht/|g' tools/GUIEditor/main.cpp find ./examples -name *.cpp | xargs sed -i -e 's|../../media/|%{_datadir}/irrlicht/|g' # build static library %make -C source/Irrlicht \ CFLAGS="%{optflags}" \ CXXFLAGS="%{optflags}" \ LDFLAGS="%{ldflags}" # clean it %make -C source/Irrlicht clean # build shared library %make -C source/Irrlicht sharedlib NDEBUG=1 \ %ifnarch ix86 CFLAGS="%{optflags} -fPIC" \ CXXFLAGS="%{optflags} -fPIC" \ LDFLAGS="%{ldflags}" %else CFLAGS="%{optflags}" \ CXXFLAGS="%{optflags}" \ LDFLAGS="%{ldflags}" %endif # create necessary links to avoid linker-error for tools/examples pushd lib/Linux ln -s libIrrlicht.so.%{major}.%{minor}.%{librelease} libIrrlicht.so ln -s libIrrlicht.so.%{major}.%{minor}.%{librelease} libIrrlicht.so.%{major} popd # build tools pushd tools pushd GUIEditor %make CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -ffast-math" LDFLAGS="%{ldflags}" popd pushd IrrFontTool/newFontTool %make CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LDFLAGS="%{ldflags}" popd popd # build examples pushd examples export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" export LDFLAGS="%{ldflags}" sh buildAllExamples.sh popd %install mkdir -p %{buildroot}%{_libdir} install -m 0644 lib/Linux/libIrrlicht.a %{buildroot}%{_libdir} install -m 0755 lib/Linux/libIrrlicht.so.%{major}.%{minor}* %{buildroot}%{_libdir} pushd %{buildroot}%{_libdir} ln -s libIrrlicht.so.%{major}.%{minor} libIrrlicht.so popd # includes mkdir -p %{buildroot}%{_includedir}/%{name} cp -f include/*.h %{buildroot}%{_includedir}/%{name} # tools install -m 0755 bin/Linux/GUIEditor -D %{buildroot}%{_bindir}/%{name}-GUIEditor install -m 0755 bin/Linux/FontTool -D %{buildroot}%{_bindir}/%{name}-FontTool # examples-docs pushd examples install -dm 0755 %{buildroot}%{_docdir}/Irrlicht-examples ex_dir=`find . -name tutorial.html` for i in $ex_dir; do dir_name=`dirname $i` install -dm 0755 %{buildroot}%{_docdir}/Irrlicht-examples/$dir_name install -m 0644 $i %{buildroot}%{_docdir}/Irrlicht-examples/$dir_name done popd # media and icon mkdir -p %{buildroot}%{_datadir}/%{name} install -m 0755 media/* %{buildroot}%{_datadir}/%{name} install -m 0755 media/irrlichtlogo2.png -D %{buildroot}%{_iconsdir}/hicolor/128x128/apps/%{name}.png mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{name}-GUIEditor.desktop << EOF [Desktop Entry] Name=Irrlicht GUI Editor Comment= Exec=%{name}-GUIEditor Icon=%{name} Terminal=false Type=Application StartupNotify=true Categories=Graphics;3DGraphics;X-Mageia-CrossDesktop; EOF cat > %{buildroot}%{_datadir}/applications/%{name}-FontTool.desktop << EOF [Desktop Entry] Name=Irrlicht Font Tool Comment= Exec=%{name}-FontTool Icon=%{name} Terminal=false Type=Application StartupNotify=true Categories=Graphics;3DGraphics;X-Mageia-CrossDesktop; EOF %files %{_bindir}/%{name}-GUIEditor %{_bindir}/%{name}-FontTool %{_datadir}/applications/*.desktop %{_iconsdir}/hicolor/*/apps/*.png %files -n %{libname} %{_libdir}/lib*.so.%{major}* %files -n %{develname} %dir %{_includedir}/%{name} %{_libdir}/lib*.so %{_includedir}/%{name}/*.h %files -n %{staticname} %{_libdir}/lib*.a %files examples %dir %{_docdir}/Irrlicht-examples %{_docdir}/Irrlicht-examples/* %files media %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %files doc %doc doc/* %changelog * Wed Oct 15 2014 umeabot <umeabot> 1.8.1-5.mga5 + Revision: 744422 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 1.8.1-4.mga5 + Revision: 680568 - Mageia 5 Mass Rebuild * Thu Dec 19 2013 dams <dams> 1.8.1-3.mga4 + Revision: 558718 - new tarball from upstream to fix Makefile - clean specfile - use new file for icon to prevent ugly rendering * Tue Dec 17 2013 akien <akien> 1.8.1-2.mga4 + Revision: 558320 - Add patch to use system-wide glext.h and glxext.h - Add patch from Fedora to fix the build with mesa 10.0 * Thu Nov 28 2013 dams <dams> 1.8.1-1.mga4 + Revision: 553834 - new version 1.8.1 * Mon Oct 21 2013 umeabot <umeabot> 1.8-2.mga4 + Revision: 539741 - Mageia 4 Mass Rebuild * Tue Oct 08 2013 dams <dams> 1.8-1.mga4 + Revision: 492844 - drop unused requires - new version 1.8 (it was a SVN snapshot before) - rediff patches (with the help of Akien) - clean specfile * Mon Jun 03 2013 fwang <fwang> 1.8-0.svn4094.7.mga4 + Revision: 435592 - drop unused requires * Sun Jun 02 2013 fwang <fwang> 1.8-0.svn4094.6.mga4 + Revision: 434872 - rebuild for new libpng * Sat Jan 12 2013 umeabot <umeabot> 1.8-0.svn4094.5.mga3 + Revision: 354498 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Jan 06 2013 barjac <barjac> 1.8-0.svn4094.4.mga3 + Revision: 339631 - update desktop files * Sat Jan 05 2013 barjac <barjac> 1.8-0.svn4094.3.mga3 + Revision: 339475 - updated 2 more sub-package groups - update doc group - make doc sub-package noarch - update group - fix some rpmlint warnings * Tue Apr 03 2012 luigiwalser <luigiwalser> 1.8-0.svn4094.2.mga2 + Revision: 228080 - add patch0 for potential buffer overflow (similar to CVE-2011-4620) * Mon Mar 05 2012 dams <dams> 1.8-0.svn4094.1.mga2 + Revision: 218620 - new version 1.8 (svn snapshot 4094) - rediff patchs - clean and reorganize spec file * Mon Sep 12 2011 fwang <fwang> 1.7.2-2.mga2 + Revision: 142584 - more libpng1.5 patch - cleanup br - add gentoo patch to build with libpng 1.5 - rebuild for new libpng * Wed Apr 20 2011 dams <dams> 1.7.2-1.mga1 + Revision: 89105 - Clean and update patchs - Disable patch #1 - Disable patch #1 - Update to 1.7.2 * Fri Mar 25 2011 dams <dams> 1.6.1-1.mga1 + Revision: 77378 - Import and clean - imported package irrlicht * Mon Feb 01 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.6.1-1mdv2010.1 + Revision: 499316 - update to new version 1.6.1 - rediff patch 1 * Sat Jan 30 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.6-1mdv2010.1 + Revision: 498543 - update to new version 1.6 - rediff patches 1,3,4 and 6 - switch local headers to a system-wide - export %%ldflags - fix a lof of underlinking issues * Sun Sep 27 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.1-2mdv2010.0 + Revision: 450183 - fix creating of symlinks to main library - Patch7: fix build against glext - clean a little bit this mess ;) * Tue Aug 18 2009 Frederik Himpe <fhimpe@mandriva.org> 1.5.1-1mdv2010.0 + Revision: 417487 - Update to new version 1.5.1 - Rediff GUIEditor makefile patch * Tue Dec 16 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5-1mdv2009.1 + Revision: 314981 - Patch1: rediff to meet nofuzz - Patch4: rediff to meet nofuzz - add buildrequires on libxft-devel - bump minor - update to new version 1.5 * Mon Sep 22 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.4.2-1mdv2009.1 + Revision: 287150 - update to new version 1.4.2 - Patch1: rediff - fix underlinking for all patches * Thu Aug 07 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.4.1-2mdv2009.0 + Revision: 267168 - rebuild early 2009.0 package (before pixel changes) + Pixel <pixel@mandriva.com> - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers * Thu Jun 05 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.4.1-1mdv2009.0 + Revision: 215241 - Patch6: rediff - update to new version 1.4.1 * Sun Mar 09 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.4-3mdv2008.1 + Revision: 183144 - rebuild + Thierry Vignaud <tvignaud@mandriva.com> - fix no-buildroot-tag * Wed Jan 02 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.4-2mdv2008.1 + Revision: 140520 - rework patch 1 - compile examples with %%optflags - add missing requires on libname for subpackages * Wed Jan 02 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.4-1mdv2008.1 + Revision: 140285 - finally make it compiles on both architecures ;) - rework almost all patches - add patch 5, probably a nVidia issue - enable tools building - provide exapmples, media and doc subpackages - compile with -fPIC on x86_64 - drop patch 0, fixed upstream - rediff patch 1 - add patches 3 and 4 - build without debug symbols - kill icon extension for desktop files - fix categories in desktop files - add %%{minor} just to be sane - new version - add more provides on devel package + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated' * Thu Aug 16 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 1.3.1-1mdv2008.0 + Revision: 64639 - compile with -fPIC - really provide only libraries for now - rediff all patches - build only libraries - Import irrlicht