]>
Commit | Line | Data |
---|---|---|
2ddcaa5b JB |
1 | # |
2 | # Conditional build: | |
fe212b9f | 3 | %bcond_without apidocs # gi-docgen API documentation |
bb114a76 | 4 | %bcond_without static_libs # static library |
1a9af4b8 JB |
5 | %bcond_with mmx # MMX instructions |
6 | %bcond_with sse # SSE instructions | |
7 | %bcond_with sse2 # SSE2 instructions in CIE,two-table,ycbcr modules, sse2-* modules | |
8 | # sse4.1, avx2, f16c are optional (in separate modules) | |
9 | # sse2 is runtime-detected, but whole files are compiled with -msse2, so it's not optional | |
2ddcaa5b | 10 | # |
1a9af4b8 JB |
11 | %ifarch pentium2 pentium3 pentium4 athlon %{x8664} x32 |
12 | %define with_mmx 1 | |
13 | %endif | |
14 | %ifarch pentium3 pentium4 %{x8664} x32 | |
15 | %define with_sse 1 | |
16 | %endif | |
17 | %ifarch pentium4 %{x8664} x32 | |
18 | %define with_sse2 1 | |
19 | %endif | |
afa57aa4 | 20 | Summary: Library for pixel-format agnosticism |
2a41f84a | 21 | Summary(pl.UTF-8): Biblioteka niezależności od formatu piksela |
afa57aa4 | 22 | Name: babl |
fe212b9f | 23 | Version: 0.1.108 |
bb114a76 | 24 | Release: 1 |
84fad386 | 25 | License: LGPL v3+ |
c5542464 | 26 | Group: Libraries |
1a9af4b8 | 27 | Source0: https://download.gimp.org/pub/babl/0.1/%{name}-%{version}.tar.xz |
fe212b9f | 28 | # Source0-md5: 749169721b551882332a64ac17735de6 |
7e5b9121 | 29 | URL: https://www.gegl.org/babl/ |
9187e13b JB |
30 | BuildRequires: gobject-introspection-devel >= 1.32.0 |
31 | BuildRequires: lcms2-devel >= 2.8 | |
344d0cef | 32 | BuildRequires: meson >= 0.55.0 |
1a9af4b8 | 33 | BuildRequires: ninja >= 1.5 |
67670070 | 34 | BuildRequires: pkgconfig |
9187e13b | 35 | BuildRequires: python3 >= 1:3 |
7e5b9121 | 36 | BuildRequires: rpm-build >= 4.6 |
fe212b9f | 37 | BuildRequires: rpmbuild(macros) >= 2.029 |
1a9af4b8 | 38 | BuildRequires: tar >= 1:1.22 |
9187e13b | 39 | BuildRequires: vala >= 2:0.20.0 |
1a9af4b8 JB |
40 | BuildRequires: xz |
41 | %{?with_mmx:Requires: cpuinfo(mmx)} | |
42 | %{?with_sse:Requires: cpuinfo(sse)} | |
43 | %{?with_sse:Requires: cpuinfo(sse2)} | |
9187e13b | 44 | Requires: lcms2 >= 2.8 |
afa57aa4 | 45 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
46 | ||
47 | %description | |
48 | Babl is a dynamic, any to any, pixel format conversion library. It | |
49 | provides conversions between the myriad of buffer types images can be | |
50 | stored in. Babl doesn't only help with existing pixel formats, but | |
51 | also facilitates creation of new and uncommon ones. | |
52 | ||
2a41f84a JB |
53 | %description -l pl.UTF-8 |
54 | Babl to biblioteka dynamicznych przekształceń między dowolnymi | |
55 | formatami pikseli. Udostępnia konwersje między wieloma różnymi typami | |
56 | buforów obrazów. Babl nie tylko pomaga przy istniejących formatach | |
57 | pikseli, ale także ułatwia tworzenie nowych i niestandardowych. | |
58 | ||
afa57aa4 | 59 | %package devel |
60 | Summary: Header files for babl library | |
61 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki babl | |
62 | Group: Development/Libraries | |
2a41f84a | 63 | Requires: %{name} = %{version}-%{release} |
9187e13b | 64 | Requires: lcms2-devel >= 2.8 |
afa57aa4 | 65 | |
66 | %description devel | |
67 | Header files for babl library. | |
68 | ||
69 | %description devel -l pl.UTF-8 | |
70 | Pliki nagłówkowe biblioteki babl. | |
71 | ||
72 | %package static | |
73 | Summary: Static babl library | |
74 | Summary(pl.UTF-8): Statyczna biblioteka babl | |
75 | Group: Development/Libraries | |
76 | Requires: %{name}-devel = %{version}-%{release} | |
77 | ||
78 | %description static | |
79 | Static babl library. | |
80 | ||
81 | %description static -l pl.UTF-8 | |
82 | Statyczna biblioteka babl. | |
83 | ||
2ddcaa5b JB |
84 | %package -n vala-babl |
85 | Summary: Vala API for babl library | |
86 | Summary(pl.UTF-8): API języka Vala dla biblioteki babl | |
87 | Group: Development/Libraries | |
88 | Requires: %{name}-devel = %{version}-%{release} | |
9187e13b | 89 | Requires: vala >= 2:0.20.0 |
e28a4d04 | 90 | BuildArch: noarch |
2ddcaa5b JB |
91 | |
92 | %description -n vala-babl | |
93 | Vala API for babl library. | |
94 | ||
95 | %description -n vala-babl -l pl.UTF-8 | |
96 | API języka Vala dla biblioteki babl. | |
97 | ||
fe212b9f JB |
98 | %package apidocs |
99 | Summary: API documentation for babl library | |
100 | Summary(pl.UTF-8): Dokumentacja API biblioteki babl | |
101 | Group: Documentation | |
102 | BuildArch: noarch | |
103 | ||
104 | %description apidocs | |
105 | API documentation for babl library. | |
106 | ||
107 | %description apidocs -l pl.UTF-8 | |
108 | Dokumentacja API biblioteki babl. | |
109 | ||
afa57aa4 | 110 | %prep |
111 | %setup -q | |
afa57aa4 | 112 | |
113 | %build | |
1a9af4b8 | 114 | %meson build \ |
eea58eef | 115 | %{!?with_static_libs:--default-library=shared} \ |
1a9af4b8 JB |
116 | %{!?with_mmx:-Denable-mmx=false} \ |
117 | %{!?with_sse:-Denable-sse=false} \ | |
fe212b9f JB |
118 | %{!?with_sse2:-Denable-sse2=false} \ |
119 | %{!?with_apidocs:-Dgi-docgen=disabled} | |
1a9af4b8 JB |
120 | |
121 | %ninja_build -C build | |
afa57aa4 | 122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
1a9af4b8 | 126 | %ninja_install -C build |
067734f3 | 127 | |
fe212b9f JB |
128 | %if %{with apidocs} |
129 | install -d $RPM_BUILD_ROOT%{_gidocdir} | |
130 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/babl-0.1 $RPM_BUILD_ROOT%{_gidocdir} | |
131 | %endif | |
132 | ||
afa57aa4 | 133 | %clean |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %post -p /sbin/ldconfig | |
137 | %postun -p /sbin/ldconfig | |
138 | ||
139 | %files | |
140 | %defattr(644,root,root,755) | |
1a9af4b8 | 141 | %doc AUTHORS MAINTAINERS NEWS TODO |
f1dadb98 | 142 | %attr(755,root,root) %{_bindir}/babl |
44d1c6ca AM |
143 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so.*.*.* |
144 | %attr(755,root,root) %ghost %{_libdir}/libbabl-0.1.so.0 | |
1a9af4b8 | 145 | %{_libdir}/girepository-1.0/Babl-0.1.typelib |
44d1c6ca | 146 | %dir %{_libdir}/babl-0.1 |
35584e15 | 147 | %attr(755,root,root) %{_libdir}/babl-0.1/*.so |
9a2c082b JB |
148 | |
149 | %files devel | |
150 | %defattr(644,root,root,755) | |
151 | %doc docs/{*.html,*.css} | |
44d1c6ca | 152 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so |
44d1c6ca | 153 | %{_includedir}/babl-0.1 |
1a9af4b8 | 154 | %{_datadir}/gir-1.0/Babl-0.1.gir |
a6351e13 | 155 | %{_pkgconfigdir}/babl-0.1.pc |
9a2c082b | 156 | |
bb114a76 | 157 | %if %{with static_libs} |
9a2c082b JB |
158 | %files static |
159 | %defattr(644,root,root,755) | |
44d1c6ca | 160 | %{_libdir}/libbabl-0.1.a |
bb114a76 | 161 | %endif |
2ddcaa5b | 162 | |
2ddcaa5b JB |
163 | %files -n vala-babl |
164 | %defattr(644,root,root,755) | |
9187e13b | 165 | %{_datadir}/vala/vapi/babl-0.1.deps |
2ddcaa5b | 166 | %{_datadir}/vala/vapi/babl-0.1.vapi |
fe212b9f JB |
167 | |
168 | %if %{with apidocs} | |
169 | %files apidocs | |
170 | %defattr(644,root,root,755) | |
171 | %{_gidocdir}/babl-0.1 | |
172 | %endif |