]> git.pld-linux.org Git - packages/pngquant.git/blame - pngquant.spec
- renamed gomp bcond to compiler-agnostic openmp
[packages/pngquant.git] / pngquant.spec
CommitLineData
683a4347
JB
1#
2# Conditional build:
3%bcond_without static_libs # static library
0ce2e68e 4%bcond_without openmp # OpenMP support
683a4347
JB
5%bcond_without lcms # LCMS support
6%bcond_with sse # SSE instructions
7#
8%ifarch pentium3 pentium4 %{x8664} x32
9%define with_sse 1
10%endif
11Summary: PNG converter and lossy image compressor
12Summary(pl.UTF-8): Konwerter i stratny kompresor dla plików PNG
13Name: pngquant
14Version: 2.4.1
15Release: 1
16License: BSD
17Group: Libraries
18#Source0Download: https://pngquant.org/releases.html
19Source0: https://pngquant.org/%{name}-%{version}-src.tar.bz2
20# Source0-md5: 2809b10f8d183853c1283cfdfa292ab3
21Patch0: %{name}-soname.patch
22Patch1: %{name}-shared.patch
23URL: https://pngquant.org/
0ce2e68e
JB
24%{?with_openmp:BuildRequires: gcc >= 6:4.2}
25%{?with_openmp:BuildRequires: libgomp-devel}
683a4347
JB
26%{?with_lcms:BuildRequires: lcms2-devel >= 2}
27BuildRequires: libpng-devel
28BuildRequires: pkgconfig
29BuildRequires: zlib-devel
30Requires: libimagequant = %{version}-%{release}
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34PNG converter and lossy image compressor.
35
36%description -l pl.UTF-8
37Konwerter i stratny kompresor dla plików PNG.
38
39%package -n libimagequant
40Summary: Image Quantization library
41Summary(pl.UTF-8): Biblioteka do kwantyzacji obrazów
42Group: Libraries
43URL: https://pngquant.org/lib/
44
45%description -n libimagequant
46Image Quantization library.
47
48%description -n libimagequant -l pl.UTF-8
49Biblioteka do kwantyzacji obrazów.
50
51%package -n libimagequant-devel
52Summary: Header files for libimagequant library
53Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libimagequant
54Group: Development/Libraries
55URL: https://pngquant.org/lib/
56Requires: libimagequant = %{version}-%{release}
57
58%description -n libimagequant-devel
59Header files for libimagequant library.
60
61%description -n libimagequant-devel -l pl.UTF-8
62Pliki nagłówkowe biblioteki libimagequant.
63
64%package -n libimagequant-static
65Summary: Static libimagequant library
66Summary(pl.UTF-8): Statyczna biblioteka libimagequant
67Group: Development/Libraries
68URL: https://pngquant.org/lib/
69Requires: libimagequant-devel = %{version}-%{release}
70
71%description -n libimagequant-static
72Static libimagequant library.
73
74%description -n libimagequant-static -l pl.UTF-8
75Statyczna biblioteka libimagequant.
76
77%prep
78%setup -q
79%patch0 -p1
80%patch1 -p1
81
82%build
83# not autoconf configure
84./configure \
85 CC="%{__cc}" \
86 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
87 LDFLAGS="%{rpmldflags}" \
88 --prefix=%{_prefix} \
89 %{?with_sse:--enable-sse} \
90 %{?with_lcms:--with-lcms2} \
0ce2e68e 91 %{?with_openmp:--with-openmp}
683a4347
JB
92
93%{__make} -C lib %{!?with_static_libs:shared}
94
95%{__make}
96
97%install
98rm -rf $RPM_BUILD_ROOT
99install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
100
101%{__make} install \
102 DESTDIR=$RPM_BUILD_ROOT
103
104cp -a lib/libimagequant.so* $RPM_BUILD_ROOT%{_libdir}
105%if %{with static_libs}
106cp -p lib/libimagequant.a $RPM_BUILD_ROOT%{_libdir}
107%endif
108cp -p lib/libimagequant.h $RPM_BUILD_ROOT%{_includedir}
109
110%clean
111rm -rf $RPM_BUILD_ROOT
112
113%post -n libimagequant -p /sbin/ldconfig
114%postun -n libimagequant -p /sbin/ldconfig
115
116%files
117%defattr(644,root,root,755)
118%doc CHANGELOG COPYRIGHT README.md
119%attr(755,root,root) %{_bindir}/pngquant
120
121%files -n libimagequant
122%defattr(644,root,root,755)
123%doc lib/{COPYRIGHT,MANUAL.md}
124%attr(755,root,root) %{_libdir}/libimagequant.so.0
125
126%files -n libimagequant-devel
127%defattr(644,root,root,755)
128%attr(755,root,root) %{_libdir}/libimagequant.so
129%{_includedir}/libimagequant.h
130
131%if %{with static_libs}
132%files -n libimagequant-static
133%defattr(644,root,root,755)
134%{_libdir}/libimagequant.a
135%endif
This page took 0.131384 seconds and 4 git commands to generate.