]>
Commit | Line | Data |
---|---|---|
683a4347 JB |
1 | # |
2 | # Conditional build: | |
0ce2e68e | 3 | %bcond_without openmp # OpenMP support |
683a4347 JB |
4 | %bcond_without lcms # LCMS support |
5 | %bcond_with sse # SSE instructions | |
6 | # | |
7 | %ifarch pentium3 pentium4 %{x8664} x32 | |
8 | %define with_sse 1 | |
9 | %endif | |
10 | Summary: PNG converter and lossy image compressor | |
11 | Summary(pl.UTF-8): Konwerter i stratny kompresor dla plików PNG | |
12 | Name: pngquant | |
62ad54c1 | 13 | Version: 2.12.0 |
bd5e7d20 JB |
14 | Release: 1 |
15 | # some original code was on MIT-like license | |
16 | License: GPL v3+ with MIT parts or commercial | |
683a4347 JB |
17 | Group: Libraries |
18 | #Source0Download: https://pngquant.org/releases.html | |
58b7aa3b | 19 | Source0: https://pngquant.org/%{name}-%{version}-src.tar.gz |
62ad54c1 | 20 | # Source0-md5: 6b041c05ad987049ee0e5660a9926e24 |
683a4347 | 21 | URL: https://pngquant.org/ |
0ce2e68e JB |
22 | %{?with_openmp:BuildRequires: gcc >= 6:4.2} |
23 | %{?with_openmp:BuildRequires: libgomp-devel} | |
683a4347 | 24 | %{?with_lcms:BuildRequires: lcms2-devel >= 2} |
62ad54c1 | 25 | BuildRequires: libimagequant-devel >= 2.12 |
683a4347 JB |
26 | BuildRequires: libpng-devel |
27 | BuildRequires: pkgconfig | |
28 | BuildRequires: zlib-devel | |
62ad54c1 | 29 | Requires: libimagequant >= 2.12 |
683a4347 JB |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | PNG converter and lossy image compressor. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Konwerter i stratny kompresor dla plików PNG. | |
37 | ||
683a4347 JB |
38 | %prep |
39 | %setup -q | |
683a4347 JB |
40 | |
41 | %build | |
42 | # not autoconf configure | |
43 | ./configure \ | |
44 | CC="%{__cc}" \ | |
45 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
46 | LDFLAGS="%{rpmldflags}" \ | |
47 | --prefix=%{_prefix} \ | |
3685d99d | 48 | %{__enable_disable sse} \ |
683a4347 | 49 | %{?with_lcms:--with-lcms2} \ |
bd5e7d20 | 50 | --with-libimagequant \ |
0ce2e68e | 51 | %{?with_openmp:--with-openmp} |
683a4347 | 52 | |
683a4347 JB |
53 | %{__make} |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
683a4347 JB |
57 | |
58 | %{__make} install \ | |
59 | DESTDIR=$RPM_BUILD_ROOT | |
60 | ||
683a4347 JB |
61 | %clean |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
683a4347 JB |
64 | %files |
65 | %defattr(644,root,root,755) | |
66 | %doc CHANGELOG COPYRIGHT README.md | |
67 | %attr(755,root,root) %{_bindir}/pngquant | |
58b7aa3b | 68 | %{_mandir}/man1/pngquant.1* |