]> git.pld-linux.org Git - SPECS.git/blob - irrlicht.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / irrlicht.spec
1 #
2 # TODO:
3 # - what to do with the .NET thingy?
4 # - fix Makefile to accept rpm*flags as options
5 #
6 # Conditional build:
7 %bcond_without  static_libs     # static library
8
9 Summary:        Irrlicht - high performance realtime 3D engine
10 Summary(pl.UTF-8):      Irrlicht - wysoko wydajny silnik 3D czasu rzeczywistego
11 Name:           irrlicht
12 Version:        1.8.5
13 Release:        1
14 License:        BSD-like
15 Group:          Libraries
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
31 BuildRequires:  unzip
32 BuildRequires:  xorg-lib-libXxf86vm-devel
33 BuildRequires:  zlib-devel
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
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.
42
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.
49
50 %package devel
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
56
57 %description devel
58 This is the package containing the header files for Irrlicht library.
59
60 %description devel -l pl.UTF-8
61 Ten pakiet zawiera pliki nagłówkowe biblioteki Irrlicht.
62
63 %package static
64 Summary:        Static Irrlicht library
65 Summary(pl.UTF-8):      Statyczna biblioteka Irrlicht
66 Group:          Development/Libraries
67 Requires:       %{name}-devel = %{version}-%{release}
68
69 %description static
70 Static Irrlicht library.
71
72 %description static -l pl.UTF-8
73 Statyczna biblioteka Irrlicht
74
75 %package apidocs
76 Summary:        API documentation for Irrlicht library
77 Summary(pl.UTF-8):      Dokumentacja API biblioteki Irrlicht
78 Group:          Documentation
79 BuildArch:      noarch
80
81 %description apidocs
82 API documentation for Irrlicht library.
83
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API biblioteki Irrlicht.
86
87 %package examples
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}
92 BuildArch:      noarch
93
94 %description examples
95 This is the package containing examples for Irrlicht library.
96
97 %description examples -l pl.UTF-8
98 Ten pakiet zawiera przykłady użycia biblioteki Irrlicht.
99
100 %prep
101 %setup -q
102
103 %undos include/IrrCompileConfig.h
104 %undos source/Irrlicht/{Makefile,CImageLoaderPNG.cpp,CImageWriterPNG.cpp}
105
106 %patch0 -p1
107 %patch1 -p1
108
109 cp -f %{SOURCE1} source/Irrlicht/glext.h
110
111 %build
112 %if %{with static_libs}
113 %{__make} -C source/Irrlicht \
114         CXX="%{__cxx}" \
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
120 %endif
121
122 %{__make} -C source/Irrlicht sharedlib \
123         CXX="%{__cxx}" \
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"
128
129 %install
130 rm -rf $RPM_BUILD_ROOT
131 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_examplesdir}/%{name}-%{version}}
132
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
138
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
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %post   -p /sbin/ldconfig
148 %postun -p /sbin/ldconfig
149
150 %files
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
155
156 %files devel
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libIrrlicht.so
159 %{_includedir}/irrlicht
160 %{_includedir}/Irrlicht
161
162 %if %{with static_libs}
163 %files static
164 %defattr(644,root,root,755)
165 %{_libdir}/libIrrlicht.a
166 %endif
167
168 %files apidocs
169 %defattr(644,root,root,755)
170 # "docu" and "html" are the same
171 %doc doc/html/*
172
173 %files examples
174 %defattr(644,root,root,755)
175 %{_examplesdir}/%{name}-%{version}
This page took 3.80807 seconds and 3 git commands to generate.