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