1 |
# enable_gtkdoc: Toggle whether gtkdoc stuff should be rebuilt |
2 |
# 0 = No |
3 |
# 1 = Yes |
4 |
%define enable_gtkdoc 1 |
5 |
|
6 |
# Define biarch packages |
7 |
%define biarches_32 %{ix86} ppc |
8 |
%define biarches_64 x86_64 ppc64 |
9 |
%define query_modules_suffix %{nil} |
10 |
|
11 |
%ifarch %{biarches_32} |
12 |
%define query_modules_suffix -32 |
13 |
%endif |
14 |
|
15 |
%ifarch %{biarches_64} |
16 |
%define query_modules_suffix -64 |
17 |
%endif |
18 |
|
19 |
%define query_modules pango-querymodules%{query_modules_suffix} |
20 |
|
21 |
%define api_version 1.0 |
22 |
%define gir_major 1.0 |
23 |
%define module_version 1.8.0 |
24 |
%define lib_major 0 |
25 |
%define lib_name %mklibname %{name} %{api_version} %{lib_major} |
26 |
%define libnamedev %mklibname -d %{name} %{api_version} |
27 |
%define gir_name %mklibname %{name}-gir %{gir_major} |
28 |
|
29 |
%define url_ver %(echo %{version}|cut -d. -f1,2) |
30 |
|
31 |
Summary: System for layout and rendering of internationalized text |
32 |
Name: pango |
33 |
Version: 1.36.5 |
34 |
Release: %mkrel 1 |
35 |
License: LGPLv2+ |
36 |
Group: System/Internationalization |
37 |
URL: http://www.pango.org/ |
38 |
BuildRequires: pkgconfig(cairo) >= 1.7.6 |
39 |
BuildRequires: pkgconfig(fontconfig) >= 2.5.0 |
40 |
BuildRequires: pkgconfig(freetype2) |
41 |
BuildRequires: pkgconfig(glib-2.0) >= 2.33.12 |
42 |
BuildRequires: pkgconfig(gmodule-no-export-2.0) |
43 |
BuildRequires: pkgconfig(gobject-2.0) |
44 |
BuildRequires: pkgconfig(harfbuzz) >= 0.9.9 |
45 |
BuildRequires: pkgconfig(libthai) >= 0.1.9 |
46 |
BuildRequires: pkgconfig(xft) >= 2.0.0 |
47 |
BuildRequires: pkgconfig(xrender) |
48 |
BuildRequires: gobject-introspection-devel >= 0.9.5 |
49 |
%if %enable_gtkdoc |
50 |
BuildRequires: gtk-doc >= 0.10 |
51 |
BuildRequires: libxslt-proc |
52 |
BuildRequires: docbook-style-xsl |
53 |
BuildRequires: docbook-dtd412-xml |
54 |
%endif |
55 |
Source0: https://download.gnome.org/sources/%{name}/%{url_ver}/%{name}-%{version}.tar.xz |
56 |
# (gb) 1.4.0-2mdk biarch support |
57 |
Patch5: pango-1.32.0-lib64.patch |
58 |
|
59 |
%description |
60 |
A library to handle Unicode strings as well as complex bidirectional |
61 |
or context dependent shaped strings. |
62 |
It is the next step on Gtk+ internationalization. |
63 |
|
64 |
%package -n %{lib_name} |
65 |
Summary: %{summary} |
66 |
Group: %{group} |
67 |
Provides: lib%{name}%{api_version} = %{version}-%{release} |
68 |
Provides: lib%{name} = %{version}-%{release} |
69 |
Requires: %{name} = %{version} |
70 |
Requires: fontconfig >= 2.5.0 |
71 |
Requires: glib2 >= 2.33.12 |
72 |
Requires: %{lib_name}-modules = %{version} |
73 |
Requires: cairo >= 1.7.6 |
74 |
Conflicts: gir-repository < 0.6.5 |
75 |
|
76 |
%package -n %{lib_name}-modules |
77 |
Summary: %{summary} |
78 |
Group: %{group} |
79 |
#need this since we launch pango-querymodules in #post |
80 |
Requires(post): %{lib_name} = %{version} |
81 |
Provides: pango-modules = %{version}-%{release} |
82 |
|
83 |
%description -n %{lib_name}-modules |
84 |
A library to handle Unicode strings as well as complex bidirectional |
85 |
or context dependent shaped strings. |
86 |
It is the next step on Gtk+ internationalization. |
87 |
|
88 |
%description -n %{lib_name} |
89 |
A library to handle Unicode strings as well as complex bidirectional |
90 |
or context dependent shaped strings. |
91 |
It is the next step on Gtk+ internationalization. |
92 |
|
93 |
%package -n %{libnamedev} |
94 |
Summary: %{summary} |
95 |
Group: Development/GNOME and GTK+ |
96 |
Obsoletes: %{name}-devel |
97 |
Provides: %{name}-devel = %{version}-%{release} |
98 |
Provides: lib%{name}-devel = %{version}-%{release} |
99 |
Provides: lib%{name}%{api_version}-devel = %{version}-%{release} |
100 |
Requires: %{name} = %{version} |
101 |
Requires: %{lib_name} = %{version} |
102 |
Suggests: %{name}-doc >= %{version} |
103 |
Obsoletes: %mklibname -d %{name} %{api_version} %{lib_major} |
104 |
Conflicts: %{name} < 1.18.0-3mdv |
105 |
Conflicts: %{_lib}pango1.0_0 < 1.28.1-2 |
106 |
|
107 |
%description -n %{libnamedev} |
108 |
This package includes the static libraries and header files |
109 |
for the pango package. |
110 |
|
111 |
%package -n %{gir_name} |
112 |
Summary: GObject Introspection interface description for %{name} |
113 |
Group: System/Libraries |
114 |
Requires: %{lib_name} = %{version}-%{release} |
115 |
Conflicts: %{mklibname %{name}1.0-gir 1.0}} < 1.29.3-4 |
116 |
|
117 |
%description -n %{gir_name} |
118 |
GObject Introspection interface description for %{name}. |
119 |
|
120 |
%package doc |
121 |
Summary: %{summary} |
122 |
Group: Development/GNOME and GTK+ |
123 |
BuildArch: noarch |
124 |
|
125 |
%description doc |
126 |
This package provides API documentation for Pango. |
127 |
|
128 |
%package tests |
129 |
Summary: Tests for the %{name} package |
130 |
Group: Development/GNOME and GTK+ |
131 |
Requires: %{name} = %{version}-%{release} |
132 |
|
133 |
%description tests |
134 |
The %{name}-tests package contains tests that can be used to verify |
135 |
the functionality of the installed %{name} package. |
136 |
|
137 |
%prep |
138 |
%setup -q |
139 |
%patch5 -p1 -b .lib64 |
140 |
|
141 |
%build |
142 |
# generate build scripts using our autotools/libtoolize |
143 |
autoreconf -fi |
144 |
|
145 |
%configure2_5x \ |
146 |
--enable-static=no \ |
147 |
%if %enable_gtkdoc |
148 |
--enable-gtk-doc=yes \ |
149 |
%endif |
150 |
--enable-installed-tests |
151 |
|
152 |
%make ARCH=%{_arch} |
153 |
|
154 |
%check |
155 |
#disabled for https://bugzilla.gnome.org/show_bug.cgi?id=672981 |
156 |
make check || true |
157 |
|
158 |
%install |
159 |
%makeinstall_std |
160 |
mkdir -p %{buildroot}%{_sysconfdir}/pango/%{_arch} |
161 |
touch %{buildroot}%{_sysconfdir}/pango/%{_arch}/pango.modules |
162 |
|
163 |
%ifarch %{biarches_32} %{biarches_64} |
164 |
mv %{buildroot}%{_bindir}/pango-querymodules %{buildroot}%{_bindir}/%{query_modules} |
165 |
%endif |
166 |
|
167 |
%ifarch %{biarches_64} |
168 |
mv %{buildroot}%{_bindir}/pango-view %{buildroot}%{_bindir}/pango-view%{query_modules_suffix} |
169 |
%endif |
170 |
|
171 |
# remove unpackaged files |
172 |
find %{buildroot} -name '*.la' -delete |
173 |
|
174 |
%post -n %{lib_name}-modules |
175 |
if [ "$1" = "2" -a -r %{_sysconfdir}/pango/pango.modules ]; then |
176 |
rm -f %{_sysconfdir}/pango/pango.modules |
177 |
fi |
178 |
%{_bindir}/%{query_modules} --system > %{_sysconfdir}/pango/%{_arch}/pango.modules |
179 |
|
180 |
%files |
181 |
%doc README AUTHORS |
182 |
%doc NEWS |
183 |
%ifnarch %{biarches_32} %{biarches_64} |
184 |
%{_bindir}/pango-querymodules |
185 |
%endif |
186 |
%{_mandir}/man1/* |
187 |
%dir %{_sysconfdir}/pango |
188 |
|
189 |
%files -n %{lib_name}-modules |
190 |
%ifarch %{biarches_32} %{biarches_64} |
191 |
%{_bindir}/pango-querymodules-* |
192 |
%endif |
193 |
%dir %{_libdir}/pango |
194 |
%dir %{_libdir}/pango/%{module_version} |
195 |
%dir %{_libdir}/pango/%{module_version}/modules |
196 |
%{_libdir}/pango/%{module_version}/modules/*.so |
197 |
%dir %{_sysconfdir}/pango/%{_arch} |
198 |
%ghost %verify (not md5 mtime size) %config(noreplace) %{_sysconfdir}/pango/%{_arch}/pango.modules |
199 |
|
200 |
%files -n %{lib_name} |
201 |
%{_libdir}/libpango-%{api_version}.so.%{lib_major}* |
202 |
%{_libdir}/libpangoft2-%{api_version}.so.%{lib_major}* |
203 |
%{_libdir}/libpangoxft-%{api_version}.so.%{lib_major}* |
204 |
%{_libdir}/libpangocairo-%{api_version}.so.%{lib_major}* |
205 |
|
206 |
%files -n %{gir_name} |
207 |
%{_libdir}/girepository-1.0/Pango-%{gir_major}.typelib |
208 |
%{_libdir}/girepository-1.0/PangoCairo-%{gir_major}.typelib |
209 |
%{_libdir}/girepository-1.0/PangoFT2-%{gir_major}.typelib |
210 |
%{_libdir}/girepository-1.0/PangoXft-%{gir_major}.typelib |
211 |
|
212 |
%files -n %{libnamedev} |
213 |
%{_bindir}/pango-view* |
214 |
%{_libdir}/libpango-*.so |
215 |
%{_libdir}/libpangoxft-*.so |
216 |
%{_libdir}/libpangoft2-*.so |
217 |
%{_libdir}/libpangocairo*.so |
218 |
%{_libdir}/pkgconfig/* |
219 |
%{_includedir}/* |
220 |
%{_datadir}/gir-1.0/Pango-%{gir_major}.gir |
221 |
%{_datadir}/gir-1.0/PangoCairo-%{gir_major}.gir |
222 |
%{_datadir}/gir-1.0/PangoFT2-%{gir_major}.gir |
223 |
%{_datadir}/gir-1.0/PangoXft-%{gir_major}.gir |
224 |
|
225 |
%files doc |
226 |
%doc %{_datadir}/gtk-doc/html/pango |
227 |
%doc ChangeLog |
228 |
%doc pango-view/HELLO.txt |
229 |
|
230 |
%files tests |
231 |
%{_libexecdir}/%{name}/installed-tests |
232 |
%{_datadir}/installed-tests |