3 # - what to do with the .NET thingy?
4 # - fix Makefile to accept rpm*flags as options
7 %bcond_without static_libs # static library
9 Summary: Irrlicht - high performance realtime 3D engine
10 Summary(pl.UTF-8): Irrlicht - wysoko wydajny silnik 3D czasu rzeczywistego
16 Source0: https://downloads.sourceforge.net/irrlicht/%{name}-%{version}.zip
17 # Source0-md5: 1fcf67c2906eb84b531af512de8481b1
18 Source1: http://www.opengl.org/registry/api/GL/glext.h
19 Patch0: %{name}-glXGetProcAddress.patch
20 Patch1: %{name}-system-libs.patch
21 URL: http://irrlicht.sourceforge.net/
22 BuildRequires: OpenGL-devel
23 BuildRequires: OpenGL-GLX-devel >= 1.4
24 BuildRequires: bzip2-devel
25 BuildRequires: libjpeg-devel
26 BuildRequires: libpng-devel >= 1.4
27 BuildRequires: libstdc++-devel
28 BuildRequires: rpm-build >= 4.6
29 BuildRequires: rpmbuild(macros) >= 1.752
30 BuildRequires: sed >= 4.0
32 BuildRequires: xorg-lib-libXxf86vm-devel
33 BuildRequires: zlib-devel
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 The Irrlicht Engine is an open source high performance realtime 3D
38 engine written and usable in C++ and also available for .NET
39 languages. It is completely cross-platform, using D3D, OpenGL and its
40 own software renderer, and has all of the state-of-the-art features
41 which can be found in commercial 3D engines.
43 %description -l pl.UTF-8
44 Silnik Irrlicht to wysoko wydajny silnik 3D czasu rzeczywistego o
45 otwartych źródłach. Napisany i używany w języku C++, dostępny także
46 dla języków .NET. Jest w pełni przenośny między platformami, używa
47 D3D, OpenGL oraz własnego oprogramowania renderującego, oraz zawiera
48 wszystkie cechy komercyjnych silników 3D.
51 Summary: Header files for Irrlicht library
52 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Irrlicht
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
55 Requires: libstdc++-devel
58 This is the package containing the header files for Irrlicht library.
60 %description devel -l pl.UTF-8
61 Ten pakiet zawiera pliki nagłówkowe biblioteki Irrlicht.
64 Summary: Static Irrlicht library
65 Summary(pl.UTF-8): Statyczna biblioteka Irrlicht
66 Group: Development/Libraries
67 Requires: %{name}-devel = %{version}-%{release}
70 Static Irrlicht library.
72 %description static -l pl.UTF-8
73 Statyczna biblioteka Irrlicht
76 Summary: API documentation for Irrlicht library
77 Summary(pl.UTF-8): Dokumentacja API biblioteki Irrlicht
82 API documentation for Irrlicht library.
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API biblioteki Irrlicht.
88 Summary: Examples for Irrlicht library for programmers
89 Summary(pl.UTF-8): Przykłady użycia biblioteki Irrlicht dla programistów
90 Group: Development/Libraries
91 Requires: %{name}-devel = %{version}-%{release}
95 This is the package containing examples for Irrlicht library.
97 %description examples -l pl.UTF-8
98 Ten pakiet zawiera przykłady użycia biblioteki Irrlicht.
103 %undos include/IrrCompileConfig.h
104 %undos source/Irrlicht/{Makefile,CImageLoaderPNG.cpp,CImageWriterPNG.cpp}
109 cp -f %{SOURCE1} source/Irrlicht/glext.h
112 %if %{with static_libs}
113 %{__make} -C source/Irrlicht \
115 CXXINCS="-I../../include %{rpmcppflags}" \
116 CFLAGS="%{rpmcflags} -DGLX_GLXEXT_LEGACY" \
117 CXXFLAGS="%{rpmcflags} -DGLX_GLXEXT_LEGACY \$(CXXINCS) -DIRRLICHT_EXPORTS=1" \
118 LDFLAGS="%{rpmldflags} -lz -lpng -ljpeg -lbz2 -lX11 -lXxf86vm -lGL"
119 %{__make} -C source/Irrlicht clean
122 %{__make} -C source/Irrlicht sharedlib \
124 CXXINCS="-I../../include %{rpmcppflags}" \
125 CFLAGS="%{rpmcflags} -fPIC -DGLX_GLXEXT_LEGACY" \
126 CXXFLAGS="%{rpmcflags} -fPIC -DGLX_GLXEXT_LEGACY \$(CXXINCS) -DIRRLICHT_EXPORTS=1" \
127 LDFLAGS="%{rpmldflags} -lz -lpng -ljpeg -lbz2 -lX11 -lXxf86vm -lGL"
130 rm -rf $RPM_BUILD_ROOT
131 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_examplesdir}/%{name}-%{version}}
133 install lib/Linux/libIrrlicht.* $RPM_BUILD_ROOT%{_libdir}
134 ln -s $(basename lib/Linux/libIrrlicht.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libIrrlicht.so
135 ln -s $(basename lib/Linux/libIrrlicht.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libIrrlicht.so.1
136 cp -r include $RPM_BUILD_ROOT%{_includedir}/irrlicht
137 ln -s irrlicht $RPM_BUILD_ROOT%{_includedir}/Irrlicht
139 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
140 find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
141 -name '*.vc*' -o -name '*.sln' -o -name '*.cbp' -o -name '*.dev' -print0 | xargs -0 %{__rm}
142 %{__rm} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*.workspace
145 rm -rf $RPM_BUILD_ROOT
147 %post -p /sbin/ldconfig
148 %postun -p /sbin/ldconfig
151 %defattr(644,root,root,755)
152 %doc changes.txt readme.txt doc/{aesGladman,*-license,upgrade-guide}.txt
153 %attr(755,root,root) %{_libdir}/libIrrlicht.so.*.*.*
154 %attr(755,root,root) %ghost %{_libdir}/libIrrlicht.so.1
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libIrrlicht.so
159 %{_includedir}/irrlicht
160 %{_includedir}/Irrlicht
162 %if %{with static_libs}
164 %defattr(644,root,root,755)
165 %{_libdir}/libIrrlicht.a
169 %defattr(644,root,root,755)
170 # "docu" and "html" are the same
174 %defattr(644,root,root,755)
175 %{_examplesdir}/%{name}-%{version}