]> git.pld-linux.org Git - packages/babl.git/blob - babl.spec
BR: pkgconfig
[packages/babl.git] / babl.spec
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.55.0
33 BuildRequires:  ninja >= 1.5
34 BuildRequires:  pkgconfig
35 BuildRequires:  python3 >= 1:3
36 BuildRequires:  rpm-build >= 4.6
37 BuildRequires:  rpmbuild(macros) >= 2.029
38 BuildRequires:  tar >= 1:1.22
39 BuildRequires:  vala >= 2:0.20.0
40 BuildRequires:  xz
41 %{?with_mmx:Requires:   cpuinfo(mmx)}
42 %{?with_sse:Requires:   cpuinfo(sse)}
43 %{?with_sse:Requires:   cpuinfo(sse2)}
44 Requires:       lcms2 >= 2.8
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
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
59 %package devel
60 Summary:        Header files for babl library
61 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki babl
62 Group:          Development/Libraries
63 Requires:       %{name} = %{version}-%{release}
64 Requires:       lcms2-devel >= 2.8
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
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}
89 Requires:       vala >= 2:0.20.0
90 BuildArch:      noarch
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
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
110 %prep
111 %setup -q
112
113 %build
114 %meson build \
115         %{!?with_static_libs:--default-library=shared} \
116         %{!?with_mmx:-Denable-mmx=false} \
117         %{!?with_sse:-Denable-sse=false} \
118         %{!?with_sse2:-Denable-sse2=false} \
119         %{!?with_apidocs:-Dgi-docgen=disabled}
120
121 %ninja_build -C build
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125
126 %ninja_install -C build
127
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
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)
141 %doc AUTHORS MAINTAINERS NEWS TODO
142 %attr(755,root,root) %{_bindir}/babl
143 %attr(755,root,root) %{_libdir}/libbabl-0.1.so.*.*.*
144 %attr(755,root,root) %ghost %{_libdir}/libbabl-0.1.so.0
145 %{_libdir}/girepository-1.0/Babl-0.1.typelib
146 %dir %{_libdir}/babl-0.1
147 %attr(755,root,root) %{_libdir}/babl-0.1/*.so
148
149 %files devel
150 %defattr(644,root,root,755)
151 %doc docs/{*.html,*.css}
152 %attr(755,root,root) %{_libdir}/libbabl-0.1.so
153 %{_includedir}/babl-0.1
154 %{_datadir}/gir-1.0/Babl-0.1.gir
155 %{_pkgconfigdir}/babl-0.1.pc
156
157 %if %{with static_libs}
158 %files static
159 %defattr(644,root,root,755)
160 %{_libdir}/libbabl-0.1.a
161 %endif
162
163 %files -n vala-babl
164 %defattr(644,root,root,755)
165 %{_datadir}/vala/vapi/babl-0.1.deps
166 %{_datadir}/vala/vapi/babl-0.1.vapi
167
168 %if %{with apidocs}
169 %files apidocs
170 %defattr(644,root,root,755)
171 %{_gidocdir}/babl-0.1
172 %endif
This page took 0.084994 seconds and 4 git commands to generate.