]>
Commit | Line | Data |
---|---|---|
2ddcaa5b JB |
1 | # |
2 | # Conditional build: | |
bb114a76 | 3 | %bcond_without static_libs # static library |
1a9af4b8 JB |
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 | |
2ddcaa5b | 9 | # |
1a9af4b8 JB |
10 | %ifarch pentium2 pentium3 pentium4 athlon %{x8664} x32 |
11 | %define with_mmx 1 | |
12 | %endif | |
13 | %ifarch pentium3 pentium4 %{x8664} x32 | |
14 | %define with_sse 1 | |
15 | %endif | |
16 | %ifarch pentium4 %{x8664} x32 | |
17 | %define with_sse2 1 | |
18 | %endif | |
afa57aa4 | 19 | Summary: Library for pixel-format agnosticism |
2a41f84a | 20 | Summary(pl.UTF-8): Biblioteka niezależności od formatu piksela |
afa57aa4 | 21 | Name: babl |
3556fa67 | 22 | Version: 0.1.82 |
bb114a76 | 23 | Release: 1 |
84fad386 | 24 | License: LGPL v3+ |
c5542464 | 25 | Group: Libraries |
1a9af4b8 | 26 | Source0: https://download.gimp.org/pub/babl/0.1/%{name}-%{version}.tar.xz |
3556fa67 | 27 | # Source0-md5: 48256ceaeb76719bb9975601b1d1667c |
1a9af4b8 | 28 | Patch0: %{name}-modules.patch |
afa57aa4 | 29 | URL: http://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 |
3556fa67 | 35 | BuildRequires: rpmbuild(macros) >= 1.752 |
1a9af4b8 | 36 | BuildRequires: tar >= 1:1.22 |
9187e13b | 37 | BuildRequires: vala >= 2:0.20.0 |
1a9af4b8 JB |
38 | BuildRequires: xz |
39 | %{?with_mmx:Requires: cpuinfo(mmx)} | |
40 | %{?with_sse:Requires: cpuinfo(sse)} | |
41 | %{?with_sse:Requires: cpuinfo(sse2)} | |
9187e13b | 42 | Requires: lcms2 >= 2.8 |
afa57aa4 | 43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
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. | |
50 | ||
2a41f84a JB |
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. | |
56 | ||
afa57aa4 | 57 | %package devel |
58 | Summary: Header files for babl library | |
59 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki babl | |
60 | Group: Development/Libraries | |
2a41f84a | 61 | Requires: %{name} = %{version}-%{release} |
9187e13b | 62 | Requires: lcms2-devel >= 2.8 |
afa57aa4 | 63 | |
64 | %description devel | |
65 | Header files for babl library. | |
66 | ||
67 | %description devel -l pl.UTF-8 | |
68 | Pliki nagłówkowe biblioteki babl. | |
69 | ||
70 | %package static | |
71 | Summary: Static babl library | |
72 | Summary(pl.UTF-8): Statyczna biblioteka babl | |
73 | Group: Development/Libraries | |
74 | Requires: %{name}-devel = %{version}-%{release} | |
75 | ||
76 | %description static | |
77 | Static babl library. | |
78 | ||
79 | %description static -l pl.UTF-8 | |
80 | Statyczna biblioteka babl. | |
81 | ||
2ddcaa5b JB |
82 | %package -n vala-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} | |
9187e13b | 87 | Requires: vala >= 2:0.20.0 |
e28a4d04 | 88 | BuildArch: noarch |
2ddcaa5b JB |
89 | |
90 | %description -n vala-babl | |
91 | Vala API for babl library. | |
92 | ||
93 | %description -n vala-babl -l pl.UTF-8 | |
94 | API języka Vala dla biblioteki babl. | |
95 | ||
afa57aa4 | 96 | %prep |
97 | %setup -q | |
1a9af4b8 | 98 | %patch0 -p1 |
afa57aa4 | 99 | |
100 | %build | |
1a9af4b8 JB |
101 | %meson build \ |
102 | %{!?with_mmx:-Denable-mmx=false} \ | |
103 | %{!?with_sse:-Denable-sse=false} \ | |
104 | %{!?with_sse2:-Denable-sse2=false} | |
105 | ||
106 | %ninja_build -C build | |
afa57aa4 | 107 | |
108 | %install | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
1a9af4b8 | 111 | %ninja_install -C build |
067734f3 | 112 | |
afa57aa4 | 113 | %clean |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %post -p /sbin/ldconfig | |
117 | %postun -p /sbin/ldconfig | |
118 | ||
119 | %files | |
120 | %defattr(644,root,root,755) | |
1a9af4b8 | 121 | %doc AUTHORS MAINTAINERS NEWS TODO |
44d1c6ca AM |
122 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so.*.*.* |
123 | %attr(755,root,root) %ghost %{_libdir}/libbabl-0.1.so.0 | |
1a9af4b8 | 124 | %{_libdir}/girepository-1.0/Babl-0.1.typelib |
44d1c6ca | 125 | %dir %{_libdir}/babl-0.1 |
35584e15 | 126 | %attr(755,root,root) %{_libdir}/babl-0.1/*.so |
9a2c082b JB |
127 | |
128 | %files devel | |
129 | %defattr(644,root,root,755) | |
130 | %doc docs/{*.html,*.css} | |
44d1c6ca | 131 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so |
44d1c6ca | 132 | %{_includedir}/babl-0.1 |
1a9af4b8 | 133 | %{_datadir}/gir-1.0/Babl-0.1.gir |
9a2c082b JB |
134 | %{_pkgconfigdir}/babl.pc |
135 | ||
bb114a76 | 136 | %if %{with static_libs} |
9a2c082b JB |
137 | %files static |
138 | %defattr(644,root,root,755) | |
44d1c6ca | 139 | %{_libdir}/libbabl-0.1.a |
bb114a76 | 140 | %endif |
2ddcaa5b | 141 | |
2ddcaa5b JB |
142 | %files -n vala-babl |
143 | %defattr(644,root,root,755) | |
9187e13b | 144 | %{_datadir}/vala/vapi/babl-0.1.deps |
2ddcaa5b | 145 | %{_datadir}/vala/vapi/babl-0.1.vapi |