libIrrlicht1.spec 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. # Copyright (c) 2007-2011 oc2pus
  2. # This file and all modifications and additions to the pristine
  3. # package are under the same license as the package itself.
  4. #
  5. # Please submit bugfixes or comments to toni@links2linux.de
  6. # Packmangroup: Libraries
  7. # Packmanpackagename: Irrlicht
  8. # Packman: Toni Graffy
  9. # norootforbuild
  10. Name: libIrrlicht1
  11. Version: 1.9.0
  12. Release: 0.pm.1
  13. Summary: The Irrlicht Engine SDK
  14. License: see readme.txt
  15. Group: System/Libraries
  16. URL: http://irrlicht.sourceforge.net/
  17. Source: irrlicht-%{version}.tar.bz2
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-build
  19. BuildRequires: freeglut-devel
  20. BuildRequires: ImageMagick
  21. BuildRequires: gcc-c++
  22. %if %suse_version >= 1020
  23. BuildRequires: Mesa-devel
  24. %else
  25. BuildRequires: xorg-x11-devel
  26. %endif
  27. BuildRequires: update-desktop-files
  28. %description
  29. The Irrlicht Engine is an open source high performance realtime 3d engine
  30. written and usable in C++. It is completely cross-platform, using D3D, OpenGL
  31. and its own software renderer, and has all of the state-of-the-art features
  32. which can be found in commercial 3d engines.
  33. We've got a huge active community, and there are lots of projects in
  34. development that use the engine. You can find enhancements for Irrlicht all
  35. over the web, like alternative terrain renderers, portal renderers, exporters,
  36. world layers, tutorials, editors, language bindings for .NET, Java, Perl, Ruby,
  37. Basic, Python, Lua, and so on. And best of all: It's completely free.
  38. %package -n libIrrlicht-devel
  39. Summary: Development package for the Irrlicht library
  40. Group: Development/Languages/C and C++
  41. Requires: libIrrlicht1 = %{version}
  42. # Packmandepends: libIrrlicht1
  43. %description -n libIrrlicht-devel
  44. The Irrlicht Engine is an open source high performance realtime 3d engine
  45. written and usable in C++. It is completely cross-platform, using D3D, OpenGL
  46. and its own software renderer, and has all of the state-of-the-art features
  47. which can be found in commercial 3d engines.
  48. We've got a huge active community, and there are lots of projects in
  49. development that use the engine. You can find enhancements for Irrlicht all
  50. over the web, like alternative terrain renderers, portal renderers, exporters,
  51. world layers, tutorials, editors, language bindings for .NET, Java, Perl, Ruby,
  52. Basic, Python, Lua, and so on. And best of all: It's completely free.
  53. %package -n Irrlicht-examples
  54. Summary: Demos and examples for the Irrlicht-SDK
  55. Group: Development/Tools/GUI Builders
  56. Requires: libIrrlicht1 = %{version}
  57. # Packmandepends: Irrlicht-media libIrrlicht1
  58. %description -n Irrlicht-examples
  59. The Irrlicht Engine is an open source high performance realtime 3d engine
  60. written and usable in C++. It is completely cross-platform, using D3D, OpenGL
  61. and its own software renderer, and has all of the state-of-the-art features
  62. which can be found in commercial 3d engines.
  63. We've got a huge active community, and there are lots of projects in
  64. development that use the engine. You can find enhancements for Irrlicht all
  65. over the web, like alternative terrain renderers, portal renderers, exporters,
  66. world layers, tutorials, editors, language bindings for .NET, Java, Perl, Ruby,
  67. Basic, Python, Lua, and so on. And best of all: It's completely free.
  68. This package contains some demos and examples for the Irrlicht-SDK.
  69. %package -n Irrlicht-doc
  70. Summary: User documentation for the Irrlicht SDK.
  71. Group: Documentation/Other
  72. %description -n Irrlicht-doc
  73. User documentation for the Irrlicht SDK.
  74. You need a chm-viewer to read the docs (e.g. kchmviewer).
  75. %package -n Irrlicht-tools
  76. Summary: Some tools for the Irrlicht-SDK
  77. Group: Development/Tools/GUI Builders
  78. Requires: libIrrlicht1 = %{version}
  79. Requires: Irrlicht-media
  80. # Packmandepends: Irrlicht-media libIrrlicht1
  81. %description -n Irrlicht-tools
  82. Some tools for the Irrlicht-SDK.
  83. GUIEditor, FontTool and Meshviewer.
  84. %package -n Irrlicht-media
  85. Summary: Some media files for Irrlicht SDK
  86. Group: Development/Languages/C and C++
  87. %description -n Irrlicht-media
  88. Some media files for Irrlicht tools and demos.
  89. %debug_package
  90. %prep
  91. %setup -q -n irrlicht-%{version}
  92. # only for windows-platform
  93. %__rm -r examples/14.Win32Window
  94. # avoid irrKlang
  95. %__sed -i -e 's|^#define USE_IRRKLANG|//#define USE_IRRKLANG|g' \
  96. examples/Demo/CDemo.h
  97. # adjust media path in examples
  98. find ./examples -name *.cpp | xargs %__sed -i -e 's|../../media/|%{_datadir}/irrlicht/|g'
  99. # adjust media path in tools
  100. %__sed -i -e 's|../../media/|%{_datadir}/irrlicht/|g' \
  101. tools/GUIEditor/main.cpp
  102. # pack example-sources
  103. tar cj \
  104. --exclude *.cbp \
  105. --exclude *.dev \
  106. --exclude *.dsp \
  107. --exclude *.dsw \
  108. --exclude *.html \
  109. --exclude *.sln \
  110. --exclude *.vcproj \
  111. -f irrlicht-examples-src.tar.bz2 examples/*
  112. %build
  113. # create shared-lib first
  114. pushd source/Irrlicht
  115. %__make sharedlib %{?_smp_mflags}
  116. popd
  117. # create necessary links to avoid linker-error for tools/examples
  118. pushd lib/Linux
  119. ln -s libIrrlicht.so.%{version} libIrrlicht.so.1
  120. ln -s libIrrlicht.so.%{version} libIrrlicht.so
  121. popd
  122. # tools
  123. pushd tools
  124. cd GUIEditor
  125. %__make %{?_smp_mflags}
  126. cd ..
  127. cd IrrFontTool/newFontTool
  128. %__make %{?_smp_mflags}
  129. cd ../..
  130. popd
  131. # examples
  132. pushd examples
  133. sh buildAllExamples.sh
  134. popd
  135. # build static lib
  136. pushd source/Irrlicht
  137. %__make %{?_smp_mflags}
  138. popd
  139. %install
  140. %__install -dm 755 %{buildroot}%{_libdir}
  141. %__install -m 644 lib/Linux/libIrrlicht.a \
  142. %{buildroot}%{_libdir}
  143. %__install -m 644 lib/Linux/libIrrlicht.so.%{version} \
  144. %{buildroot}%{_libdir}
  145. pushd %{buildroot}%{_libdir}
  146. ln -s libIrrlicht.so.%{version} libIrrlicht.so.1
  147. ln -s libIrrlicht.so.%{version} libIrrlicht.so
  148. popd
  149. # includes
  150. %__install -dm 755 %{buildroot}%{_includedir}/irrlicht
  151. %__install -m 644 include/*.h \
  152. %{buildroot}%{_includedir}/irrlicht
  153. # tools
  154. %__install -dm 755 %{buildroot}%{_bindir}
  155. %__install -m 755 tools/GUIEditor/GUIEditor \
  156. %{buildroot}%{_bindir}/irrlicht-GUIEditor
  157. %__install -m 755 bin/Linux/FontTool \
  158. %{buildroot}%{_bindir}/irrlicht-FontTool
  159. # examples
  160. %__install -dm 755 %{buildroot}%{_bindir}
  161. ex_list=`ls -1 bin/Linux/??.*`
  162. for i in $ex_list; do
  163. FE=`echo $i | awk 'BEGIN { FS="." }{ print $2 }'`
  164. %__install -m 755 $i \
  165. %{buildroot}%{_bindir}/irrlicht-$FE
  166. done
  167. # examples-docs
  168. pushd examples
  169. %__install -dm 755 %{buildroot}%{_docdir}/Irrlicht-examples
  170. ex_dir=`find . -name tutorial.html`
  171. for i in $ex_dir; do
  172. dir_name=`dirname $i`
  173. %__install -dm 755 %{buildroot}%{_docdir}/Irrlicht-examples/$dir_name
  174. %__install -m 644 $i \
  175. %{buildroot}%{_docdir}/Irrlicht-examples/$dir_name
  176. done
  177. %__rm -r %{buildroot}%{_docdir}/Irrlicht-examples/09.Meshviewer
  178. popd
  179. # examples sources
  180. %__install -m 644 irrlicht-examples-src.tar.bz2 \
  181. %{buildroot}%{_docdir}/Irrlicht-examples
  182. # media
  183. %__install -dm 755 %{buildroot}%{_datadir}/irrlicht
  184. %__install -m 755 media/* \
  185. %{buildroot}%{_datadir}/irrlicht
  186. # icons
  187. %__install -dm 755 %{buildroot}%{_datadir}/pixmaps
  188. convert examples/09.Meshviewer/icon.ico -resize 48x48! \
  189. irrlicht-Meshviewer.png
  190. convert bin/Win32-gcc/irrlicht.ico -resize 48x48! \
  191. irrlicht.png
  192. %__install -m 644 irrlicht*.png \
  193. %{buildroot}%{_datadir}/pixmaps
  194. # menu-entries
  195. %__cat > irrlicht-GUIEditor.desktop << EOF
  196. [Desktop Entry]
  197. Comment=Irrlicht GUI Editor
  198. Name=Irrlicht GUI Editor
  199. GenericName=
  200. Type=Application
  201. Exec=irrlicht-GUIEditor
  202. Icon=irrlicht.png
  203. DocPath=
  204. Terminal=0
  205. EOF
  206. %suse_update_desktop_file -i irrlicht-GUIEditor Development GUIDesigner
  207. %__cat > irrlicht-FontTool.desktop << EOF
  208. [Desktop Entry]
  209. Comment=Irrlicht-FontTool
  210. Name=Irrlicht-FontTool
  211. GenericName=
  212. Type=Application
  213. Exec=irrlicht-IrrFontTool
  214. Icon=irrlicht.png
  215. DocPath=
  216. Terminal=0
  217. EOF
  218. %suse_update_desktop_file -i irrlicht-FontTool Development GUIDesigner
  219. %__cat > irrlicht-Meshviewer.desktop << EOF
  220. [Desktop Entry]
  221. Comment=Irrlicht-Meshviewer
  222. Name=Irrlicht-Meshviewer
  223. GenericName=
  224. Type=Application
  225. Exec=irrlicht-Meshviewer
  226. Icon=irrlicht-Meshviewer.png
  227. DocPath=
  228. Terminal=1
  229. EOF
  230. %suse_update_desktop_file -i irrlicht-Meshviewer Graphics Viewer
  231. %clean
  232. [ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot}
  233. %files
  234. %defattr(-, root, root)
  235. %doc *.txt
  236. %{_libdir}/lib*.so.*
  237. %files -n libIrrlicht-devel
  238. %defattr(-, root, root)
  239. %{_libdir}/lib*.so
  240. %{_libdir}/lib*.a
  241. %dir %{_includedir}/irrlicht
  242. %{_includedir}/irrlicht/*.h
  243. %files -n Irrlicht-examples
  244. %defattr(-, root, root)
  245. %dir %{_docdir}/Irrlicht-examples
  246. %{_docdir}/Irrlicht-examples/*
  247. %exclude %{_bindir}/irrlicht-GUIEditor
  248. %exclude %{_bindir}/irrlicht-FontTool
  249. %exclude %{_bindir}/irrlicht-Meshviewer
  250. %{_bindir}/irrlicht-*
  251. %files -n Irrlicht-tools
  252. %defattr(-, root, root)
  253. %doc examples/09.Meshviewer/tutorial.html
  254. %{_bindir}/irrlicht-GUIEditor
  255. %{_bindir}/irrlicht-FontTool
  256. %{_bindir}/irrlicht-Meshviewer
  257. %{_datadir}/applications/irrlicht-GUIEditor.desktop
  258. %{_datadir}/applications/irrlicht-FontTool.desktop
  259. %{_datadir}/applications/irrlicht-Meshviewer.desktop
  260. %{_datadir}/pixmaps/irrlicht*.png
  261. %files -n Irrlicht-doc
  262. %defattr(-, root, root)
  263. %doc doc/irrlicht.chm
  264. %doc doc/*.txt
  265. %files -n Irrlicht-media
  266. %defattr(-, root, root)
  267. %dir %{_datadir}/irrlicht
  268. %{_datadir}/irrlicht/*
  269. %changelog
  270. * Wed Jun 20 2007 Toni Graffy <toni@links2linux.de> - 1.3.1-0.pm.1
  271. - update to 1.3.1
  272. * Sat Jun 16 2007 Toni Graffy <toni@links2linux.de> - 1.3-0.pm.1
  273. - initial build 1.3