]> git.pld-linux.org Git - packages/libimagequant.git/blame - libimagequant.spec
- updated to 2.12.1
[packages/libimagequant.git] / libimagequant.spec
CommitLineData
e0da65aa
JB
1# TODO:
2# - finish java (create .jar, install)
3# - build C#, rust bindings
4#
5# Conditional build:
6%bcond_without static_libs # static library
7%bcond_without openmp # OpenMP support
8%bcond_with sse # SSE instructions
9%bcond_with java # Java bindings [TODO: finish]
10#
11%ifarch pentium3 pentium4 %{x8664} x32
12%define with_sse 1
13%endif
14Summary: Image Quantization library
15Summary(pl.UTF-8): Biblioteka do kwantyzacji obrazów
16Name: libimagequant
80d0667f 17Version: 2.12.1
e0da65aa
JB
18Release: 1
19# some original code was on MIT-like license
20License: GPL v3+ with MIT parts or commercial
21Group: Libraries
22#Source0Download: https://github.com/ImageOptim/libimagequant/releases
23Source0: https://github.com/ImageOptim/libimagequant/archive/%{version}/%{name}-%{version}.tar.gz
80d0667f 24# Source0-md5: 0481df2396a1e79302582c757d71bc4c
e0da65aa
JB
25Patch0: %{name}-shared.patch
26URL: https://pngquant.org/lib/
27%{?with_openmp:BuildRequires: gcc >= 6:4.2}
28%{?with_java:BuildRequires: jdk}
29%{?with_openmp:BuildRequires: libgomp-devel}
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Small, portable C library for high-quality conversion of RGBA images
34to 8-bit indexed-color (palette) images.
35
36%description -l pl.UTF-8
37Mała, przenośna biblioteka C do wysokiej jakości konwersji obrazów
38RGBA do obrazów 8-bitowych z indeksowanymi kolorami (paletą).
39
40%package devel
41Summary: Header files for libimagequant library
42Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libimagequant
43Group: Development/Libraries
44Requires: %{name} = %{version}-%{release}
45
46%description devel
47Header files for libimagequant library.
48
49%description devel -l pl.UTF-8
50Pliki nagłówkowe biblioteki libimagequant.
51
52%package static
53Summary: Static libimagequant library
54Summary(pl.UTF-8): Statyczna biblioteka libimagequant
55Group: Development/Libraries
56Requires: %{name}-devel = %{version}-%{release}
57
58%description static
59Static libimagequant library.
60
61%description static -l pl.UTF-8
62Statyczna biblioteka libimagequant.
63
64%prep
65%setup -q
66%patch0 -p1
67
68%build
69# not autoconf configure
70./configure \
71 CC="%{__cc}" \
72 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
73 LDFLAGS="%{rpmldflags}" \
74 --prefix=%{_prefix} \
75 --libdir=%{_libdir} \
76 %{__enable_disable sse} \
77 %{?with_openmp:--with-openmp}
78
79%{__make} shared %{?with_static_libs:static}
80
81%if %{with java}
82%{__make} java \
83 CLASSPATH=.
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89%{__make} install \
90 DESTDIR=$RPM_BUILD_ROOT
91
92%if %{with static_libs}
93cp -p libimagequant.a $RPM_BUILD_ROOT%{_libdir}
94%endif
95
96%clean
97rm -rf $RPM_BUILD_ROOT
98
99%post -p /sbin/ldconfig
100%postun -p /sbin/ldconfig
101
102%files
103%defattr(644,root,root,755)
104%doc CHANGELOG COPYRIGHT README.md
105%attr(755,root,root) %{_libdir}/libimagequant.so.0
106
107%files devel
108%defattr(644,root,root,755)
109%attr(755,root,root) %{_libdir}/libimagequant.so
110%{_includedir}/libimagequant.h
111%{_pkgconfigdir}/imagequant.pc
112
113%if %{with static_libs}
114%files static
115%defattr(644,root,root,755)
116%{_libdir}/libimagequant.a
117%endif
This page took 0.156901 seconds and 4 git commands to generate.