]>
Commit | Line | Data |
---|---|---|
dc87aef8 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
11adbe75 JB |
5 | Summary: Simple DirectMedia Layer 2 - ttf handling |
6 | Summary(pl.UTF-8): Biblioteka obsługi fontów TTF dla SDL2 | |
7 | Summary(pt_BR.UTF-8): Simple DirectMedia Layer 2 - Biblioteca de fontes TrueType | |
8 | Name: SDL2_ttf | |
57bd29ab | 9 | Version: 2.22.0 |
3c792971 | 10 | Release: 1 |
11adbe75 JB |
11 | License: Zlib-like |
12 | Group: Libraries | |
d650e48a | 13 | Source0: https://github.com/libsdl-org/SDL_ttf/releases/download/release-%{version}/SDL2_ttf-%{version}.tar.gz |
57bd29ab | 14 | # Source0-md5: 686e685caaa215d8fa1ac7bb02b2cf54 |
d650e48a | 15 | URL: https://github.com/libsdl-org/SDL_ttf |
7e0ce9e6 | 16 | BuildRequires: OpenGL-devel |
d650e48a | 17 | BuildRequires: SDL2-devel >= 2.0.10 |
7e0ce9e6 JP |
18 | BuildRequires: autoconf >= 2.63 |
19 | BuildRequires: automake >= 1:1.16 | |
11adbe75 | 20 | BuildRequires: freetype-devel >= 2.1.4 |
7e0ce9e6 JP |
21 | BuildRequires: harfbuzz-devel >= 2.3.1 |
22 | BuildRequires: libstdc++-devel >= 6:4.8.1 | |
11adbe75 | 23 | BuildRequires: libtool >= 2:2.0 |
7e0ce9e6 | 24 | BuildRequires: pkgconfig >= 1:0.9.0 |
dc87aef8 | 25 | BuildRequires: rpmbuild(macros) >= 1.527 |
d650e48a | 26 | Requires: SDL2 >= 2.0.10 |
7e0ce9e6 JP |
27 | Requires: freetype >= 2.1.4 |
28 | Requires: harfbuzz >= 2.3.1 | |
11adbe75 JB |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
32 | This is a sample library which allows you to use TrueType fonts in | |
33 | your SDL2 applications. It comes with an example program "sdl2font" | |
34 | which displays an example string for a given TrueType font file. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | Przykładowa biblioteka do obsługi fontów TrueType w aplikacjach SDL2. | |
38 | Pakiet zawiera przykładowy program "sdl2font", wyświetlający | |
39 | przykładowy ciąg znaków zadanym fontem TrueType. | |
40 | ||
41 | %description -l pt_BR.UTF-8 | |
42 | Esta é uma biblioteca que permite a utilização de fontes TrueType em | |
43 | suas aplicações SDL2. Ela vem com o programa exemplo "sdl2font" que | |
44 | mostra uma string exemplo para uma fonte TrueType fornecida. | |
45 | ||
46 | %package devel | |
47 | Summary: Header files and more to develop SDL2_ttf applications | |
48 | Summary(pl.UTF-8): Pliki nagłówkowe do rozwijania aplikacji używających SDL2_ttf | |
49 | Summary(pt_BR.UTF-8): Cabeçalhos para desenvolver programas utilizando a SDL2_ttf | |
50 | Group: Development/Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
5c9d6f67 | 52 | Requires: SDL2-devel >= 2.0.8 |
11adbe75 JB |
53 | Requires: freetype-devel >= 2.1.4 |
54 | ||
55 | %description devel | |
56 | Header files and more to develop SDL2_ttf applications. | |
57 | ||
58 | %description devel -l pl.UTF-8 | |
59 | Pliki nagłówkowe do rozwijania aplikacji używających SDL2_ttf. | |
60 | ||
61 | %description devel -l pt_BR.UTF-8 | |
62 | Este pacote contém os cabeçalhos que programadores vão precisar para | |
63 | desenvolver aplicações utilizando a SDL2_ttf. | |
64 | ||
65 | %package static | |
66 | Summary: Static SDL2_ttf library | |
67 | Summary(pl.UTF-8): Biblioteka statyczna SDL2_ttf | |
68 | Summary(pt_BR.UTF-8): Biblioteca estática para desenvolvimento utilizando a SDL2_ttf | |
69 | Group: Development/Libraries | |
70 | Requires: %{name}-devel = %{version}-%{release} | |
71 | ||
72 | %description static | |
73 | Static SDL2_ttf library. | |
74 | ||
75 | %description static -l pl.UTF-8 | |
76 | Biblioteka statyczna SDL2_ttf. | |
77 | ||
78 | %description static -l pt_BR.UTF-8 | |
79 | Este pacote contém a biblioteca estática que programadores vão | |
80 | precisar para desenvolver aplicações linkados estaticamente com a | |
81 | SDL2_ttf. | |
82 | ||
83 | %prep | |
84 | %setup -q | |
85 | ||
d650e48a | 86 | %{__rm} -r external/{freetype,harfbuzz} |
7e0ce9e6 | 87 | |
11adbe75 JB |
88 | %build |
89 | %{__libtoolize} | |
90 | %{__aclocal} | |
91 | %{__autoconf} | |
92 | %{__automake} | |
7e0ce9e6 | 93 | %configure \ |
dc87aef8 | 94 | %{__enable_disable static_libs static} \ |
7e0ce9e6 JP |
95 | --disable-freetype-builtin \ |
96 | --disable-harfbuzz-builtin | |
11adbe75 | 97 | |
7e0ce9e6 | 98 | %{__make} |
11adbe75 JB |
99 | |
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | install -d $RPM_BUILD_ROOT%{_bindir} | |
103 | ||
104 | %{__make} install \ | |
105 | DESTDIR=$RPM_BUILD_ROOT | |
106 | ||
107 | install .libs/showfont $RPM_BUILD_ROOT%{_bindir}/sdl2font | |
108 | ||
109 | # obsoleted by pkg-config | |
110 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
111 | ||
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %post -p /sbin/ldconfig | |
116 | %postun -p /sbin/ldconfig | |
117 | ||
118 | %files | |
119 | %defattr(644,root,root,755) | |
d650e48a | 120 | %doc CHANGES.txt LICENSE.txt README.txt |
11adbe75 JB |
121 | %attr(755,root,root) %{_bindir}/sdl2font |
122 | %attr(755,root,root) %{_libdir}/libSDL2_ttf-2.0.so.*.*.* | |
123 | %attr(755,root,root) %ghost %{_libdir}/libSDL2_ttf-2.0.so.0 | |
124 | ||
125 | %files devel | |
126 | %defattr(644,root,root,755) | |
127 | %attr(755,root,root) %{_libdir}/libSDL2_ttf.so | |
d650e48a | 128 | %{_libdir}/cmake/SDL2_ttf |
11adbe75 JB |
129 | %{_includedir}/SDL2/SDL_ttf.h |
130 | %{_pkgconfigdir}/SDL2_ttf.pc | |
131 | ||
dc87aef8 | 132 | %if %{with static_libs} |
11adbe75 JB |
133 | %files static |
134 | %defattr(644,root,root,755) | |
135 | %{_libdir}/libSDL2_ttf.a | |
dc87aef8 | 136 | %endif |