File: libIrrlicht1.spec

package info (click to toggle)
irrlicht 1.8.4+dfsg1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 44,560 kB
  • sloc: cpp: 153,800; ansic: 3,884; makefile: 899; perl: 104; xml: 43; sh: 21; sed: 11
file content (324 lines) | stat: -rw-r--r-- 9,196 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# Copyright (c) 2007-2011 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments to toni@links2linux.de

# Packmangroup: Libraries
# Packmanpackagename: Irrlicht
# Packman: Toni Graffy

# norootforbuild

Name:			libIrrlicht1
Version:		1.8.0
Release:		0.pm.1
Summary:		The Irrlicht Engine SDK
License:		see readme.txt
Group:			System/Libraries
URL:			http://irrlicht.sourceforge.net/
Source:			irrlicht-%{version}.tar.bz2
BuildRoot:		%{_tmppath}/%{name}-%{version}-build
BuildRequires:	freeglut-devel
BuildRequires:	ImageMagick
BuildRequires:	gcc-c++
%if %suse_version >= 1020
BuildRequires:	Mesa-devel
%else
BuildRequires:	xorg-x11-devel
%endif
BuildRequires:	update-desktop-files

%description
The Irrlicht Engine is an open source high performance realtime 3d engine
written and usable in C++. 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 .NET, Java, Perl, Ruby,
Basic, Python, Lua, and so on. And best of all: It's completely free.

%package -n libIrrlicht-devel
Summary:	Development package for the Irrlicht library
Group:		Development/Languages/C and C++
Requires:	libIrrlicht1 = %{version}
# Packmandepends: libIrrlicht1

%description -n libIrrlicht-devel
The Irrlicht Engine is an open source high performance realtime 3d engine
written and usable in C++. 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 .NET, Java, Perl, Ruby,
Basic, Python, Lua, and so on. And best of all: It's completely free.

%package -n Irrlicht-examples
Summary:	Demos and examples for the Irrlicht-SDK
Group:		Development/Tools/GUI Builders
Requires:	libIrrlicht1 = %{version}
# Packmandepends: Irrlicht-media libIrrlicht1

%description -n Irrlicht-examples
The Irrlicht Engine is an open source high performance realtime 3d engine
written and usable in C++. 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 .NET, Java, Perl, Ruby,
Basic, Python, Lua, and so on. And best of all: It's completely free.

This package contains some demos and examples for the Irrlicht-SDK.

%package -n Irrlicht-doc
Summary:	User documentation for the Irrlicht SDK.
Group:		Documentation/Other

%description -n Irrlicht-doc
User documentation for the Irrlicht SDK.

You need a chm-viewer to read the docs (e.g. kchmviewer).

%package -n Irrlicht-tools
Summary:	Some tools for the Irrlicht-SDK
Group:		Development/Tools/GUI Builders
Requires:	libIrrlicht1 = %{version}
Requires:	Irrlicht-media
# Packmandepends: Irrlicht-media libIrrlicht1

%description -n Irrlicht-tools
Some tools for the Irrlicht-SDK.

GUIEditor, FontTool and Meshviewer.

%package -n Irrlicht-media
Summary:	Some media files for Irrlicht SDK
Group:		Development/Languages/C and C++

%description -n Irrlicht-media
Some media files for Irrlicht tools and demos.

%debug_package

%prep
%setup -q -n irrlicht-%{version}

# only for windows-platform
%__rm -r examples/14.Win32Window

# avoid irrKlang
%__sed -i -e 's|^#define USE_IRRKLANG|//#define USE_IRRKLANG|g' \
	examples/Demo/CDemo.h

# adjust media path in examples
find ./examples -name *.cpp | xargs %__sed -i -e 's|../../media/|%{_datadir}/irrlicht/|g'
# adjust media path in tools
%__sed -i -e 's|../../media/|%{_datadir}/irrlicht/|g' \
	tools/GUIEditor/main.cpp

# pack example-sources
tar cj \
	--exclude *.cbp \
	--exclude *.dev \
	--exclude *.dsp \
	--exclude *.dsw \
	--exclude *.html \
	--exclude *.sln \
	--exclude *.vcproj \
	-f irrlicht-examples-src.tar.bz2 examples/*

%build
# create shared-lib first
pushd source/Irrlicht
%__make sharedlib %{?_smp_mflags}
popd

# create necessary links to avoid linker-error for tools/examples
pushd lib/Linux
ln -s libIrrlicht.so.%{version} libIrrlicht.so.1
ln -s libIrrlicht.so.%{version} libIrrlicht.so
popd

# tools
pushd tools
cd GUIEditor
%__make %{?_smp_mflags}
cd ..
cd IrrFontTool/newFontTool
%__make %{?_smp_mflags}
cd ../..
popd

# examples
pushd examples
sh buildAllExamples.sh
popd

# build static lib
pushd source/Irrlicht
%__make %{?_smp_mflags}
popd

%install
%__install -dm 755 %{buildroot}%{_libdir}
%__install -m 644 lib/Linux/libIrrlicht.a \
	%{buildroot}%{_libdir}
%__install -m 644 lib/Linux/libIrrlicht.so.%{version} \
	%{buildroot}%{_libdir}

pushd %{buildroot}%{_libdir}
ln -s libIrrlicht.so.%{version} libIrrlicht.so.1
ln -s libIrrlicht.so.%{version} libIrrlicht.so
popd

# includes
%__install -dm 755 %{buildroot}%{_includedir}/irrlicht
%__install -m 644 include/*.h \
	%{buildroot}%{_includedir}/irrlicht

# tools
%__install -dm 755 %{buildroot}%{_bindir}
%__install -m 755 tools/GUIEditor/GUIEditor \
	%{buildroot}%{_bindir}/irrlicht-GUIEditor
%__install -m 755 bin/Linux/FontTool \
	%{buildroot}%{_bindir}/irrlicht-FontTool

# examples
%__install -dm 755 %{buildroot}%{_bindir}
ex_list=`ls -1 bin/Linux/??.*`
for i in $ex_list; do
	FE=`echo $i | awk 'BEGIN { FS="." }{ print $2 }'`
	%__install -m 755 $i \
		%{buildroot}%{_bindir}/irrlicht-$FE
done

# examples-docs
pushd examples
%__install -dm 755 %{buildroot}%{_docdir}/Irrlicht-examples
ex_dir=`find . -name tutorial.html`
for i in $ex_dir; do
	dir_name=`dirname $i`
	%__install -dm 755 %{buildroot}%{_docdir}/Irrlicht-examples/$dir_name
	%__install -m 644 $i \
		%{buildroot}%{_docdir}/Irrlicht-examples/$dir_name
done
%__rm -r %{buildroot}%{_docdir}/Irrlicht-examples/09.Meshviewer
popd

# examples sources
%__install -m 644 irrlicht-examples-src.tar.bz2 \
	%{buildroot}%{_docdir}/Irrlicht-examples

# media
%__install -dm 755 %{buildroot}%{_datadir}/irrlicht
%__install -m 755 media/* \
	%{buildroot}%{_datadir}/irrlicht

# icons
%__install -dm 755 %{buildroot}%{_datadir}/pixmaps
convert examples/09.Meshviewer/icon.ico -resize 48x48! \
	irrlicht-Meshviewer.png
convert bin/Win32-gcc/irrlicht.ico -resize 48x48! \
	irrlicht.png
%__install -m 644 irrlicht*.png \
	%{buildroot}%{_datadir}/pixmaps

# menu-entries
%__cat > irrlicht-GUIEditor.desktop << EOF
[Desktop Entry]
Comment=Irrlicht GUI Editor
Name=Irrlicht GUI Editor
GenericName=
Type=Application
Exec=irrlicht-GUIEditor
Icon=irrlicht.png
DocPath=
Terminal=0
EOF
%suse_update_desktop_file -i irrlicht-GUIEditor Development GUIDesigner

%__cat > irrlicht-FontTool.desktop << EOF
[Desktop Entry]
Comment=Irrlicht-FontTool
Name=Irrlicht-FontTool
GenericName=
Type=Application
Exec=irrlicht-IrrFontTool
Icon=irrlicht.png
DocPath=
Terminal=0
EOF
%suse_update_desktop_file -i irrlicht-FontTool Development GUIDesigner

%__cat > irrlicht-Meshviewer.desktop << EOF
[Desktop Entry]
Comment=Irrlicht-Meshviewer
Name=Irrlicht-Meshviewer
GenericName=
Type=Application
Exec=irrlicht-Meshviewer
Icon=irrlicht-Meshviewer.png
DocPath=
Terminal=1
EOF
%suse_update_desktop_file -i irrlicht-Meshviewer Graphics Viewer

%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc *.txt
%{_libdir}/lib*.so.*

%files -n libIrrlicht-devel
%defattr(-, root, root)
%{_libdir}/lib*.so
%{_libdir}/lib*.a
%dir %{_includedir}/irrlicht
%{_includedir}/irrlicht/*.h

%files -n Irrlicht-examples
%defattr(-, root, root)
%dir %{_docdir}/Irrlicht-examples
%{_docdir}/Irrlicht-examples/*
%exclude %{_bindir}/irrlicht-GUIEditor
%exclude %{_bindir}/irrlicht-FontTool
%exclude %{_bindir}/irrlicht-Meshviewer
%{_bindir}/irrlicht-*

%files -n Irrlicht-tools
%defattr(-, root, root)
%doc examples/09.Meshviewer/tutorial.html
%{_bindir}/irrlicht-GUIEditor
%{_bindir}/irrlicht-FontTool
%{_bindir}/irrlicht-Meshviewer
%{_datadir}/applications/irrlicht-GUIEditor.desktop
%{_datadir}/applications/irrlicht-FontTool.desktop
%{_datadir}/applications/irrlicht-Meshviewer.desktop
%{_datadir}/pixmaps/irrlicht*.png

%files -n Irrlicht-doc
%defattr(-, root, root)
%doc doc/irrlicht.chm
%doc doc/*.txt

%files -n Irrlicht-media
%defattr(-, root, root)
%dir %{_datadir}/irrlicht
%{_datadir}/irrlicht/*

%changelog
* Wed Jun 20 2007 Toni Graffy <toni@links2linux.de> - 1.3.1-0.pm.1
- update to 1.3.1
* Sat Jun 16 2007 Toni Graffy <toni@links2linux.de> - 1.3-0.pm.1
- initial build 1.3