3 %bcond_without static_libs # static library
4 %bcond_with mmx # MMX instructions
5 %bcond_with sse # SSE instructions
6 %bcond_with sse2 # SSE2 instructions in CIE,two-table,ycbcr modules, sse2-* modules
7 # sse4.1, avx2, f16c are optional (in separate modules)
8 # sse2 is runtime-detected, but whole files are compiled with -msse2, so it's not optional
10 %ifarch pentium2 pentium3 pentium4 athlon %{x8664} x32
13 %ifarch pentium3 pentium4 %{x8664} x32
16 %ifarch pentium4 %{x8664} x32
19 Summary: Library for pixel-format agnosticism
20 Summary(pl.UTF-8): Biblioteka niezależności od formatu piksela
26 Source0: https://download.gimp.org/pub/babl/0.1/%{name}-%{version}.tar.xz
27 # Source0-md5: f0932832cdc4cf9b09c0f97ff48fea07
28 URL: https://www.gegl.org/babl/
29 BuildRequires: gobject-introspection-devel >= 1.32.0
30 BuildRequires: lcms2-devel >= 2.8
31 BuildRequires: meson >= 0.54.0
32 BuildRequires: ninja >= 1.5
33 BuildRequires: python3 >= 1:3
34 BuildRequires: rpm-build >= 4.6
35 BuildRequires: rpmbuild(macros) >= 1.752
36 BuildRequires: tar >= 1:1.22
37 BuildRequires: vala >= 2:0.20.0
39 %{?with_mmx:Requires: cpuinfo(mmx)}
40 %{?with_sse:Requires: cpuinfo(sse)}
41 %{?with_sse:Requires: cpuinfo(sse2)}
42 Requires: lcms2 >= 2.8
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Babl is a dynamic, any to any, pixel format conversion library. It
47 provides conversions between the myriad of buffer types images can be
48 stored in. Babl doesn't only help with existing pixel formats, but
49 also facilitates creation of new and uncommon ones.
51 %description -l pl.UTF-8
52 Babl to biblioteka dynamicznych przekształceń między dowolnymi
53 formatami pikseli. Udostępnia konwersje między wieloma różnymi typami
54 buforów obrazów. Babl nie tylko pomaga przy istniejących formatach
55 pikseli, ale także ułatwia tworzenie nowych i niestandardowych.
58 Summary: Header files for babl library
59 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki babl
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
62 Requires: lcms2-devel >= 2.8
65 Header files for babl library.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe biblioteki babl.
71 Summary: Static babl library
72 Summary(pl.UTF-8): Statyczna biblioteka babl
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
79 %description static -l pl.UTF-8
80 Statyczna biblioteka babl.
83 Summary: Vala API for babl library
84 Summary(pl.UTF-8): API języka Vala dla biblioteki babl
85 Group: Development/Libraries
86 Requires: %{name}-devel = %{version}-%{release}
87 Requires: vala >= 2:0.20.0
90 %description -n vala-babl
91 Vala API for babl library.
93 %description -n vala-babl -l pl.UTF-8
94 API języka Vala dla biblioteki babl.
101 %{!?with_mmx:-Denable-mmx=false} \
102 %{!?with_sse:-Denable-sse=false} \
103 %{!?with_sse2:-Denable-sse2=false}
105 %ninja_build -C build
108 rm -rf $RPM_BUILD_ROOT
110 %ninja_install -C build
113 rm -rf $RPM_BUILD_ROOT
115 %post -p /sbin/ldconfig
116 %postun -p /sbin/ldconfig
119 %defattr(644,root,root,755)
120 %doc AUTHORS MAINTAINERS NEWS TODO
121 %attr(755,root,root) %{_bindir}/babl
122 %attr(755,root,root) %{_libdir}/libbabl-0.1.so.*.*.*
123 %attr(755,root,root) %ghost %{_libdir}/libbabl-0.1.so.0
124 %{_libdir}/girepository-1.0/Babl-0.1.typelib
125 %dir %{_libdir}/babl-0.1
126 %attr(755,root,root) %{_libdir}/babl-0.1/*.so
129 %defattr(644,root,root,755)
130 %doc docs/{*.html,*.css}
131 %attr(755,root,root) %{_libdir}/libbabl-0.1.so
132 %{_includedir}/babl-0.1
133 %{_datadir}/gir-1.0/Babl-0.1.gir
134 %{_pkgconfigdir}/babl-0.1.pc
136 %if %{with static_libs}
138 %defattr(644,root,root,755)
139 %{_libdir}/libbabl-0.1.a
143 %defattr(644,root,root,755)
144 %{_datadir}/vala/vapi/babl-0.1.deps
145 %{_datadir}/vala/vapi/babl-0.1.vapi