]>
Commit | Line | Data |
---|---|---|
6a1b752e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_without static_libs # static library | |
5 | %bcond_without tests # unit tests | |
6 | # | |
d7c1a71d AM |
7 | %define fribidi_ver 1.0.3 |
8 | # | |
6a1b752e JB |
9 | Summary: Library for complex text layout |
10 | Summary(pl.UTF-8): Biblioteka do skomplikowanego układu tekstu | |
11 | Name: libraqm | |
21e35c24 | 12 | Version: 0.5.0 |
d7c1a71d | 13 | Release: 3 |
6a1b752e JB |
14 | License: MIT |
15 | Group: Libraries | |
16 | #Source0Download: https://github.com/HOST-Oman/libraqm/releases | |
17 | Source0: https://github.com/HOST-Oman/libraqm/releases/download/v%{version}/raqm-%{version}.tar.gz | |
21e35c24 | 18 | # Source0-md5: ba4a3deb05ad089df813b2d1057b1dd8 |
6a1b752e JB |
19 | URL: https://github.com/HOST-Oman/libraqm |
20 | BuildRequires: autoconf >= 2.50 | |
21 | BuildRequires: automake >= 1:1.11 | |
22 | # pkgconfig(freetype2) >= 12.0.6 | |
23 | BuildRequires: freetype-devel >= 1:2.4.2 | |
d7c1a71d | 24 | BuildRequires: fribidi-devel >= %{fribidi_ver} |
6a1b752e | 25 | %{?with_tests:BuildRequires: glib2-devel >= 2.0} |
21e35c24 | 26 | %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?) |
6a1b752e JB |
27 | BuildRequires: glibc-localedb-all |
28 | %endif | |
29 | BuildRequires: gtk-doc >= 1.14 | |
30 | BuildRequires: harfbuzz-devel | |
31 | BuildRequires: libtool >= 2:2 | |
32 | BuildRequires: pkgconfig >= 1:0.20 | |
d7c1a71d | 33 | Requires: fribidi >= %{fribidi_ver} |
6a1b752e JB |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
35 | ||
36 | %description | |
37 | Raqm is a small library that encapsulates the logic for complex text | |
38 | layout and provide a convenient API. | |
39 | ||
40 | It currently provides bidirectional text support (using FriBiDi), | |
41 | shaping (using HarfBuzz), and proper script itemization. As a result, | |
42 | Raqm can support most writing systems covered by Unicode. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | Raqm to mała biblioteka opakowująca logikę złożonego układu tekstu i | |
46 | udostępniająca wygodne API. | |
47 | ||
48 | Obecnie zapewnia obsługę tekstu dwukierunkowego (przy użyciu FriBiDi), | |
49 | formowanie (przy użyciu HarfBuzz) i właściwe wyszczególnienie pisma. | |
50 | W efekcie Raqm potrafi obsłużyć większość systemów pisma pokrytych | |
51 | przez Unikod. | |
52 | ||
53 | %package devel | |
54 | Summary: Header files for Raqm library | |
55 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Raqm | |
56 | Group: Development/Libraries | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | Requires: freetype-devel >= 1:2.4.2 | |
d7c1a71d | 59 | Requires: fribidi-devel >= %{fribidi_ver} |
6a1b752e JB |
60 | Requires: harfbuzz-devel |
61 | ||
62 | %description devel | |
63 | Header files for Raqm library. | |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pliki nagłówkowe biblioteki Raqm. | |
67 | ||
68 | %package static | |
69 | Summary: Static Raqm library | |
70 | Summary(pl.UTF-8): Statyczna biblioteka Raqm | |
71 | Group: Development/Libraries | |
72 | Requires: %{name}-devel = %{version}-%{release} | |
73 | ||
74 | %description static | |
75 | Static Raqm library. | |
76 | ||
77 | %description static -l pl.UTF-8 | |
78 | Statyczna biblioteka Raqm. | |
79 | ||
80 | %package apidocs | |
81 | Summary: API documentation for Raqm library | |
82 | Summary(pl.UTF-8): Dokumentacja API biblioteki Raqm | |
83 | Group: Documentation | |
84 | %if "%{_rpmversion}" >= "5" | |
85 | BuildArch: noarch | |
86 | %endif | |
87 | ||
88 | %description apidocs | |
89 | API documentation for Raqm library. | |
90 | ||
91 | %description apidocs -l pl.UTF-8 | |
92 | Dokumentacja API biblioteki Raqm. | |
93 | ||
94 | %prep | |
95 | %setup -q -n raqm-%{version} | |
6a1b752e JB |
96 | |
97 | %build | |
98 | # rebuild ac/am for as-needed to work | |
99 | %{__libtoolize} | |
100 | %{__aclocal} -I m4 | |
101 | %{__autoconf} | |
102 | %{__autoheader} | |
103 | %{__automake} | |
104 | %configure \ | |
105 | --disable-silent-rules \ | |
106 | %{!?with_static_libs:--disable-static} \ | |
107 | --with-html-dir=%{_gtkdocdir} | |
108 | %{__make} | |
109 | ||
110 | %if %{with tests} | |
111 | LC_ALL=C.UTF-8 \ | |
112 | %{__make} check | |
113 | %endif | |
114 | ||
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
118 | %{__make} install \ | |
119 | DESTDIR=$RPM_BUILD_ROOT | |
120 | ||
121 | # obsoleted by pkg-config | |
122 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libraqm.la | |
123 | ||
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %post -p /sbin/ldconfig | |
128 | %postun -p /sbin/ldconfig | |
129 | ||
130 | %files | |
131 | %defattr(644,root,root,755) | |
132 | %doc AUTHORS COPYING NEWS README | |
133 | %attr(755,root,root) %{_libdir}/libraqm.so.*.*.* | |
134 | %attr(755,root,root) %ghost %{_libdir}/libraqm.so.0 | |
135 | ||
136 | %files devel | |
137 | %defattr(644,root,root,755) | |
138 | %attr(755,root,root) %{_libdir}/libraqm.so | |
139 | %{_includedir}/raqm.h | |
140 | %{_pkgconfigdir}/raqm.pc | |
141 | ||
142 | %if %{with static_libs} | |
143 | %files static | |
144 | %defattr(644,root,root,755) | |
145 | %{_libdir}/libraqm.a | |
146 | %endif | |
147 | ||
148 | %if %{with apidocs} | |
149 | %files apidocs | |
150 | %defattr(644,root,root,755) | |
151 | %{_gtkdocdir}/raqm | |
152 | %endif |