]>
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 | |
32 | BuildRequires: meson >= 0.54.0 | |
1a9af4b8 | 33 | BuildRequires: ninja >= 1.5 |
9187e13b | 34 | BuildRequires: python3 >= 1:3 |
7e5b9121 | 35 | BuildRequires: rpm-build >= 4.6 |
fe212b9f | 36 | BuildRequires: rpmbuild(macros) >= 2.029 |
1a9af4b8 | 37 | BuildRequires: tar >= 1:1.22 |
9187e13b | 38 | BuildRequires: vala >= 2:0.20.0 |
1a9af4b8 JB |
39 | BuildRequires: xz |
40 | %{?with_mmx:Requires: cpuinfo(mmx)} | |
41 | %{?with_sse:Requires: cpuinfo(sse)} | |
42 | %{?with_sse:Requires: cpuinfo(sse2)} | |
9187e13b | 43 | Requires: lcms2 >= 2.8 |
afa57aa4 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %description | |
47 | Babl is a dynamic, any to any, pixel format conversion library. It | |
48 | provides conversions between the myriad of buffer types images can be | |
49 | stored in. Babl doesn't only help with existing pixel formats, but | |
50 | also facilitates creation of new and uncommon ones. | |
51 | ||
2a41f84a JB |
52 | %description -l pl.UTF-8 |
53 | Babl to biblioteka dynamicznych przekształceń między dowolnymi | |
54 | formatami pikseli. Udostępnia konwersje między wieloma różnymi typami | |
55 | buforów obrazów. Babl nie tylko pomaga przy istniejących formatach | |
56 | pikseli, ale także ułatwia tworzenie nowych i niestandardowych. | |
57 | ||
afa57aa4 | 58 | %package devel |
59 | Summary: Header files for babl library | |
60 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki babl | |
61 | Group: Development/Libraries | |
2a41f84a | 62 | Requires: %{name} = %{version}-%{release} |
9187e13b | 63 | Requires: lcms2-devel >= 2.8 |
afa57aa4 | 64 | |
65 | %description devel | |
66 | Header files for babl library. | |
67 | ||
68 | %description devel -l pl.UTF-8 | |
69 | Pliki nagłówkowe biblioteki babl. | |
70 | ||
71 | %package static | |
72 | Summary: Static babl library | |
73 | Summary(pl.UTF-8): Statyczna biblioteka babl | |
74 | Group: Development/Libraries | |
75 | Requires: %{name}-devel = %{version}-%{release} | |
76 | ||
77 | %description static | |
78 | Static babl library. | |
79 | ||
80 | %description static -l pl.UTF-8 | |
81 | Statyczna biblioteka babl. | |
82 | ||
2ddcaa5b JB |
83 | %package -n vala-babl |
84 | Summary: Vala API for babl library | |
85 | Summary(pl.UTF-8): API języka Vala dla biblioteki babl | |
86 | Group: Development/Libraries | |
87 | Requires: %{name}-devel = %{version}-%{release} | |
9187e13b | 88 | Requires: vala >= 2:0.20.0 |
e28a4d04 | 89 | BuildArch: noarch |
2ddcaa5b JB |
90 | |
91 | %description -n vala-babl | |
92 | Vala API for babl library. | |
93 | ||
94 | %description -n vala-babl -l pl.UTF-8 | |
95 | API języka Vala dla biblioteki babl. | |
96 | ||
fe212b9f JB |
97 | %package apidocs |
98 | Summary: API documentation for babl library | |
99 | Summary(pl.UTF-8): Dokumentacja API biblioteki babl | |
100 | Group: Documentation | |
101 | BuildArch: noarch | |
102 | ||
103 | %description apidocs | |
104 | API documentation for babl library. | |
105 | ||
106 | %description apidocs -l pl.UTF-8 | |
107 | Dokumentacja API biblioteki babl. | |
108 | ||
afa57aa4 | 109 | %prep |
110 | %setup -q | |
afa57aa4 | 111 | |
112 | %build | |
1a9af4b8 | 113 | %meson build \ |
eea58eef | 114 | %{!?with_static_libs:--default-library=shared} \ |
1a9af4b8 JB |
115 | %{!?with_mmx:-Denable-mmx=false} \ |
116 | %{!?with_sse:-Denable-sse=false} \ | |
fe212b9f JB |
117 | %{!?with_sse2:-Denable-sse2=false} \ |
118 | %{!?with_apidocs:-Dgi-docgen=disabled} | |
1a9af4b8 JB |
119 | |
120 | %ninja_build -C build | |
afa57aa4 | 121 | |
122 | %install | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
1a9af4b8 | 125 | %ninja_install -C build |
067734f3 | 126 | |
fe212b9f JB |
127 | %if %{with apidocs} |
128 | install -d $RPM_BUILD_ROOT%{_gidocdir} | |
129 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/babl-0.1 $RPM_BUILD_ROOT%{_gidocdir} | |
130 | %endif | |
131 | ||
afa57aa4 | 132 | %clean |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %post -p /sbin/ldconfig | |
136 | %postun -p /sbin/ldconfig | |
137 | ||
138 | %files | |
139 | %defattr(644,root,root,755) | |
1a9af4b8 | 140 | %doc AUTHORS MAINTAINERS NEWS TODO |
f1dadb98 | 141 | %attr(755,root,root) %{_bindir}/babl |
44d1c6ca AM |
142 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so.*.*.* |
143 | %attr(755,root,root) %ghost %{_libdir}/libbabl-0.1.so.0 | |
1a9af4b8 | 144 | %{_libdir}/girepository-1.0/Babl-0.1.typelib |
44d1c6ca | 145 | %dir %{_libdir}/babl-0.1 |
35584e15 | 146 | %attr(755,root,root) %{_libdir}/babl-0.1/*.so |
9a2c082b JB |
147 | |
148 | %files devel | |
149 | %defattr(644,root,root,755) | |
150 | %doc docs/{*.html,*.css} | |
44d1c6ca | 151 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so |
44d1c6ca | 152 | %{_includedir}/babl-0.1 |
1a9af4b8 | 153 | %{_datadir}/gir-1.0/Babl-0.1.gir |
a6351e13 | 154 | %{_pkgconfigdir}/babl-0.1.pc |
9a2c082b | 155 | |
bb114a76 | 156 | %if %{with static_libs} |
9a2c082b JB |
157 | %files static |
158 | %defattr(644,root,root,755) | |
44d1c6ca | 159 | %{_libdir}/libbabl-0.1.a |
bb114a76 | 160 | %endif |
2ddcaa5b | 161 | |
2ddcaa5b JB |
162 | %files -n vala-babl |
163 | %defattr(644,root,root,755) | |
9187e13b | 164 | %{_datadir}/vala/vapi/babl-0.1.deps |
2ddcaa5b | 165 | %{_datadir}/vala/vapi/babl-0.1.vapi |
fe212b9f JB |
166 | |
167 | %if %{with apidocs} | |
168 | %files apidocs | |
169 | %defattr(644,root,root,755) | |
170 | %{_gidocdir}/babl-0.1 | |
171 | %endif |