]> git.pld-linux.org Git - packages/pixman.git/blob - pixman.spec
add static_libs bcond
[packages/pixman.git] / pixman.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 %bcond_without  tests           # unit tests
5
6 Summary:        Pixel manipulation library
7 Summary(pl.UTF-8):      Biblioteka operacji na pikselach
8 Name:           pixman
9 # 0.42.x is stable, 0.43.x unstable
10 Version:        0.43.2
11 Release:        1
12 License:        MIT
13 Group:          Libraries
14 Source0:        https://www.cairographics.org/releases/%{name}-%{version}.tar.gz
15 # Source0-md5:  b5ad6407cd8c7abf8c1669273a2fb162
16 URL:            http://pixman.org/
17 %{?with_tests:BuildRequires:    libpng-devel}
18 BuildRequires:  meson >= 0.52.0
19 BuildRequires:  ninja
20 BuildRequires:  pkgconfig
21 BuildRequires:  rpmbuild(macros) >= 1.750
22 BuildRequires:  sed >= 4.0
23 Obsoletes:      libic < 0.2
24 Obsoletes:      libpixman < 0.2
25 Obsoletes:      libpixregion < 0.2
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 pixman is a pixel manipulation library.
30
31 %description -l pl.UTF-8
32 pixman to biblioteka do operacji na pikselach.
33
34 %package devel
35 Summary:        Development files for pixman
36 Summary(pl.UTF-8):      Pliki dla programistów do biblioteki pixman
37 Group:          Development/Libraries
38 Requires:       %{name} = %{version}-%{release}
39 Obsoletes:      libic-devel < 0.2
40 Obsoletes:      libpixman-devel < 0.2
41 Obsoletes:      libpixregion-devel < 0.2
42
43 %description devel
44 This package contains development files for pixman library.
45
46 %description devel -l pl.UTF-8
47 Ten pakiet zawiera pliki dla programistów korzystających z biblioteki
48 pixman.
49
50 %package static
51 Summary:        Static pixman library
52 Summary(pl.UTF-8):      Statyczna biblioteka pixman
53 Group:          Development/Libraries
54 Requires:       %{name}-devel = %{version}-%{release}
55 Obsoletes:      libic-static < 0.2
56 Obsoletes:      libpixman-static < 0.2
57 Obsoletes:      libpixregion-static < 0.2
58
59 %description static
60 This package contains static pixman library.
61
62 %description static -l pl.UTF-8
63 Ten pakiet zawiera statyczną wersję biblioteki pixman.
64
65 %prep
66 %setup -q
67
68 %{__sed} -i -e 's#<pixman-version.h>#"pixman-version.h"#' pixman/pixman.h
69
70 %build
71 %meson build \
72         %{!?with_static_libs:--default-library=shared} \
73         -Dgtk=disabled \
74         -Dopenmp=disabled \
75 %ifarch %{x8664}
76 %if %{_ver_lt %{cc_version} 4.2}
77         -Dsse2=disabled
78 %endif
79 %endif
80
81 %ninja_build -C build
82
83 %{?with_tests:%ninja_test -C build}
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %ninja_install -C build
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post   -p /sbin/ldconfig
94 %postun -p /sbin/ldconfig
95
96 %files
97 %defattr(644,root,root,755)
98 %doc COPYING README
99 %attr(755,root,root) %{_libdir}/libpixman-1.so.*.*.*
100 %attr(755,root,root) %ghost %{_libdir}/libpixman-1.so.0
101
102 %files devel
103 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_libdir}/libpixman-1.so
105 %{_includedir}/pixman-1
106 %{_pkgconfigdir}/pixman-1.pc
107
108 %if %{with static_libs}
109 %files static
110 %defattr(644,root,root,755)
111 %{_libdir}/libpixman-1.a
112 %endif
This page took 0.095916 seconds and 4 git commands to generate.