]>
Commit | Line | Data |
---|---|---|
253cc06c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
0963f3e8 | 4 | |
253cc06c JB |
5 | Summary: SFML - Simple and Fast Multimedia Library |
6 | Summary(pl.UTF-8): SFML - prosta i szybka biblioteka multimedialna | |
7 | Name: SFML | |
8 | Version: 2.1 | |
c6466467 | 9 | Release: 4 |
253cc06c JB |
10 | License: BSD-like |
11 | Group: Libraries | |
12 | Source0: http://sfml-dev.org/download/sfml/2.1/%{name}-%{version}-sources.zip | |
13 | # Source0-md5: 2de81448733f3f46964f23f41cd42e92 | |
14 | Patch0: %{name}-glx.patch | |
15 | URL: http://sfml-dev.org/ | |
16 | BuildRequires: OpenAL-devel | |
17 | BuildRequires: OpenGL-devel | |
18 | BuildRequires: cmake >= 2.8 | |
19 | %{?with_apidocs:BuildRequires: doxygen} | |
20 | BuildRequires: freetype-devel >= 2 | |
21 | BuildRequires: glew-devel | |
22 | BuildRequires: libjpeg-devel | |
23 | BuildRequires: libsndfile-devel | |
24 | BuildRequires: libstdc++-devel | |
25 | BuildRequires: xorg-lib-libX11-devel | |
26 | BuildRequires: xorg-lib-libXrandr-devel | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | SFML is a simple, fast, cross-platform and object-oriented multimedia | |
31 | API. It provides access to windowing, graphics, audio and network. It | |
32 | is written in C++, and has bindings for various languages such as C, | |
33 | .NET, Ruby, Python. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | SFML to prosta, szybka, wieloplatformowa biblioteka multimedialna z | |
37 | API zorientowanym obiektowo. Zapewnia dostęp do okienek, grafiki, | |
38 | dźwięku i sieci. Jest napisana w C++ i ma dowiązania do różnych innych | |
39 | języków, takich jak C, .NET, Ruby, Python. | |
40 | ||
41 | %package devel | |
42 | Summary: Header files for SFML library | |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki SFML | |
44 | Group: Development/Libraries | |
45 | Requires: %{name} = %{version}-%{release} | |
46 | Requires: OpenGL-devel | |
47 | Requires: libstdc++-devel | |
48 | ||
49 | %description devel | |
50 | Header files for SFML library. | |
51 | ||
52 | %description devel -l pl.UTF-8 | |
53 | Pliki nagłówkowe biblioteki SFML. | |
54 | ||
55 | %package apidocs | |
56 | Summary: SFML API documentation | |
57 | Summary(pl.UTF-8): Dokumentacja API biblioteki SFML | |
58 | Group: Documentation | |
0963f3e8 ER |
59 | %if "%{_rpmversion}" >= "5" |
60 | BuildArch: noarch | |
61 | %endif | |
253cc06c JB |
62 | |
63 | %description apidocs | |
64 | API documentation for SFML library. | |
65 | ||
66 | %description apidocs -l pl.UTF-8 | |
67 | Dokumentacja API biblioteki SFML. | |
68 | ||
69 | %prep | |
70 | %setup -q | |
71 | %patch0 -p1 | |
72 | ||
73 | # use system files | |
74 | %{__rm} -r src/SFML/Window/glext | |
75 | ||
76 | %build | |
77 | %cmake . \ | |
78 | %{?with_apidocs:-DSFML_BUILD_DOC=ON} | |
79 | %{__make} | |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %{__make} install \ | |
85 | DESTDIR=$RPM_BUILD_ROOT | |
86 | ||
87 | # packaged as %doc | |
88 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/SFML/*.txt | |
89 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/SFML/doc | |
90 | ||
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %post -p /sbin/ldconfig | |
95 | %postun -p /sbin/ldconfig | |
96 | ||
97 | %files | |
98 | %defattr(644,root,root,755) | |
99 | %doc license.txt readme.txt | |
100 | %attr(755,root,root) %{_libdir}/libsfml-audio.so.*.* | |
101 | %attr(755,root,root) %ghost %{_libdir}/libsfml-audio.so.2 | |
102 | %attr(755,root,root) %{_libdir}/libsfml-graphics.so.*.* | |
103 | %attr(755,root,root) %ghost %{_libdir}/libsfml-graphics.so.2 | |
104 | %attr(755,root,root) %{_libdir}/libsfml-network.so.*.* | |
105 | %attr(755,root,root) %ghost %{_libdir}/libsfml-network.so.2 | |
106 | %attr(755,root,root) %{_libdir}/libsfml-system.so.*.* | |
107 | %attr(755,root,root) %ghost %{_libdir}/libsfml-system.so.2 | |
108 | %attr(755,root,root) %{_libdir}/libsfml-window.so.*.* | |
109 | %attr(755,root,root) %ghost %{_libdir}/libsfml-window.so.2 | |
110 | ||
111 | %files devel | |
112 | %defattr(644,root,root,755) | |
113 | %attr(755,root,root) %{_libdir}/libsfml-audio.so | |
114 | %attr(755,root,root) %{_libdir}/libsfml-graphics.so | |
115 | %attr(755,root,root) %{_libdir}/libsfml-network.so | |
116 | %attr(755,root,root) %{_libdir}/libsfml-system.so | |
117 | %attr(755,root,root) %{_libdir}/libsfml-window.so | |
118 | %{_includedir}/SFML | |
119 | %{_pkgconfigdir}/sfml-all.pc | |
120 | %{_pkgconfigdir}/sfml-audio.pc | |
121 | %{_pkgconfigdir}/sfml-graphics.pc | |
122 | %{_pkgconfigdir}/sfml-network.pc | |
123 | %{_pkgconfigdir}/sfml-system.pc | |
124 | %{_pkgconfigdir}/sfml-window.pc | |
125 | %dir %{_datadir}/SFML | |
126 | %{_datadir}/SFML/cmake | |
127 | ||
128 | %if %{with apidocs} | |
129 | %files apidocs | |
130 | %defattr(644,root,root,755) | |
131 | %doc doc/html/* | |
132 | %endif |