]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # gi-docgen API documentation | |
4 | %bcond_without static_libs # static library | |
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 | |
10 | # | |
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 | |
20 | Summary: Library for pixel-format agnosticism | |
21 | Summary(pl.UTF-8): Biblioteka niezależności od formatu piksela | |
22 | Name: babl | |
23 | Version: 0.1.108 | |
24 | Release: 1 | |
25 | License: LGPL v3+ | |
26 | Group: Libraries | |
27 | Source0: https://download.gimp.org/pub/babl/0.1/%{name}-%{version}.tar.xz | |
28 | # Source0-md5: 749169721b551882332a64ac17735de6 | |
29 | URL: https://www.gegl.org/babl/ | |
30 | BuildRequires: gobject-introspection-devel >= 1.32.0 | |
31 | BuildRequires: lcms2-devel >= 2.8 | |
32 | BuildRequires: meson >= 0.54.0 | |
33 | BuildRequires: ninja >= 1.5 | |
34 | BuildRequires: python3 >= 1:3 | |
35 | BuildRequires: rpm-build >= 4.6 | |
36 | BuildRequires: rpmbuild(macros) >= 2.029 | |
37 | BuildRequires: tar >= 1:1.22 | |
38 | BuildRequires: vala >= 2:0.20.0 | |
39 | BuildRequires: xz | |
40 | %{?with_mmx:Requires: cpuinfo(mmx)} | |
41 | %{?with_sse:Requires: cpuinfo(sse)} | |
42 | %{?with_sse:Requires: cpuinfo(sse2)} | |
43 | Requires: lcms2 >= 2.8 | |
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 | ||
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 | ||
58 | %package devel | |
59 | Summary: Header files for babl library | |
60 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki babl | |
61 | Group: Development/Libraries | |
62 | Requires: %{name} = %{version}-%{release} | |
63 | Requires: lcms2-devel >= 2.8 | |
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 | ||
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} | |
88 | Requires: vala >= 2:0.20.0 | |
89 | BuildArch: noarch | |
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 | ||
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 | ||
109 | %prep | |
110 | %setup -q | |
111 | ||
112 | %build | |
113 | %meson build \ | |
114 | %{!?with_static_libs:--default-library=shared} \ | |
115 | %{!?with_mmx:-Denable-mmx=false} \ | |
116 | %{!?with_sse:-Denable-sse=false} \ | |
117 | %{!?with_sse2:-Denable-sse2=false} \ | |
118 | %{!?with_apidocs:-Dgi-docgen=disabled} | |
119 | ||
120 | %ninja_build -C build | |
121 | ||
122 | %install | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %ninja_install -C build | |
126 | ||
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 | ||
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) | |
140 | %doc AUTHORS MAINTAINERS NEWS TODO | |
141 | %attr(755,root,root) %{_bindir}/babl | |
142 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so.*.*.* | |
143 | %attr(755,root,root) %ghost %{_libdir}/libbabl-0.1.so.0 | |
144 | %{_libdir}/girepository-1.0/Babl-0.1.typelib | |
145 | %dir %{_libdir}/babl-0.1 | |
146 | %attr(755,root,root) %{_libdir}/babl-0.1/*.so | |
147 | ||
148 | %files devel | |
149 | %defattr(644,root,root,755) | |
150 | %doc docs/{*.html,*.css} | |
151 | %attr(755,root,root) %{_libdir}/libbabl-0.1.so | |
152 | %{_includedir}/babl-0.1 | |
153 | %{_datadir}/gir-1.0/Babl-0.1.gir | |
154 | %{_pkgconfigdir}/babl-0.1.pc | |
155 | ||
156 | %if %{with static_libs} | |
157 | %files static | |
158 | %defattr(644,root,root,755) | |
159 | %{_libdir}/libbabl-0.1.a | |
160 | %endif | |
161 | ||
162 | %files -n vala-babl | |
163 | %defattr(644,root,root,755) | |
164 | %{_datadir}/vala/vapi/babl-0.1.deps | |
165 | %{_datadir}/vala/vapi/babl-0.1.vapi | |
166 | ||
167 | %if %{with apidocs} | |
168 | %files apidocs | |
169 | %defattr(644,root,root,755) | |
170 | %{_gidocdir}/babl-0.1 | |
171 | %endif |