1 # NOTE: there is intel SSE optimization available but with no runtime detection;
2 # it's enabled based on compiler flags (-msse*, either explicit or implied by -march=)
5 %bcond_without tests # don't perform "make check"
6 %bcond_without default_libpng # don't use this libpng as default system libpng
8 %define apng_version %{version}
11 Summary(de.UTF-8): PNG-Library
12 Summary(es.UTF-8): Biblioteca PNG
13 Summary(fr.UTF-8): Librarie PNG
14 Summary(pl.UTF-8): Biblioteka PNG
15 Summary(pt_BR.UTF-8): Biblioteca PNG
16 Summary(tr.UTF-8): PNG kitaplığı
21 License: distributable
23 Source0: https://downloads.sourceforge.net/libpng/%{name}-%{version}.tar.xz
24 # Source0-md5: 122e6b7837811698563083b352bc8ca2
25 Patch0: https://downloads.sourceforge.net/libpng-apng/%{name}-%{apng_version}-apng.patch.gz
26 # Patch0-md5: 831a5f302970a91a8168647366c2e0af
27 Patch1: %{name}-pngminus.patch
28 Patch2: %{name}-drop-Llibdir.patch
29 URL: http://www.libpng.org/pub/png/libpng.html
30 BuildRequires: rpmbuild(macros) >= 2.007
31 BuildRequires: tar >= 1:1.22
32 BuildRequires: xz >= 1:4.999.7
33 BuildRequires: zlib-devel >= 1.2.9
34 Provides: libpng(APNG) = 0.10
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 The PNG library is a collection of routines used to create and
39 manipulate PNG format graphics files. The PNG format was designed as a
40 replacement for GIF, with many improvements and extensions.
42 %description -l de.UTF-8
43 Die PNG-Library ist eine Sammlung von Routinen zum Erstellen und
44 Bearbeiten von Grafiken im PNG-Format. Das PNG-Format wurde als Ersatz
45 für GIF entwickelt und enthält viele Verbesserungen und Erweiterungen.
47 %description -l es.UTF-8
48 Esta biblioteca es una colección de rutinas para crear y manipular
49 archivos gráficos en el formato PNG. Este formato fue proyectado para
52 %description -l fr.UTF-8
53 La librairie PNG est un ensemble de routines utilisées pour créer et
54 manipuler des fichiers graphiques au format PNG. Le format PNG a été
55 élaboré pour remplacer le GIF, avec de nombreuses améliorations et
58 %description -l pl.UTF-8
59 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
60 plikami w formacie graficznym PNG. Format ten został stworzony jako
61 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
63 %description -l pt_BR.UTF-8
64 Esta biblioteca é uma coleção de rotinas para criar e manipular
65 arquivos gráficos no formato PNG. Este formato foi projetado para
66 substituir o formato GIF, com extensões e melhorias.
68 %description -l tr.UTF-8
69 PNG kitaplığı, PNG formatındaki resim dosyalarını işlemeye yönelik
70 yordamları içerir. PNG, GIF formatının yerini almak üzere tasarlanmış
74 Summary: Header files for libpng
75 Summary(de.UTF-8): libpng Headers
76 Summary(es.UTF-8): Archivos de inclusión y bibliotecas estáticas
77 Summary(fr.UTF-8): en-têtes et bibliothèques statiques
78 Summary(pl.UTF-8): Pliki nagłówkowe libpng
79 Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas estáticas
80 Summary(tr.UTF-8): başlık dosyaları ve statik kitaplıklar
81 Group: Development/Libraries
82 Requires: %{name} = %{epoch}:%{version}-%{release}
84 Provides: libpng(APNG)-devel = 0.10
85 Conflicts: libpng < 1.0.15
88 The header files are only needed for development of programs using the
91 %description devel -l de.UTF-8
92 Die Header-Dateien werden nur zur Entwicklung von Programmen mit der
95 %description devel -l es.UTF-8
96 Archivos de inclusión y bibliotecas estáticas que son necesarios
97 solamente para el desarrollo de programas que usan la biblioteca PNG.
99 %description devel -l fr.UTF-8
100 Fichiers d'en-tete et les librairies qui sont requis seulement pour le
101 développement avec la librairie PNG.
103 %description devel -l pl.UTF-8
104 W pakiecie tym znajdują się pliki nagłówkowe, przeznaczone dla
105 programistów używających bibliotek PNG.
107 %description devel -l pt_BR.UTF-8
108 Arquivos de inclusão e bibliotecas estáticas que são necessários
109 somente para o desenvolvimento de programas que usam a biblioteca PNG.
111 %description devel -l tr.UTF-8
112 PNG kitaplığını kullanan programlar geliştirmek için gereken
113 kitaplıklar ve başlık dosyaları.
116 Summary: Static PNG library
117 Summary(de.UTF-8): Statisch PNG Library
118 Summary(pl.UTF-8): Biblioteka statyczna PNG
119 Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libpng
120 Group: Development/Libraries
121 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
122 Provides: libpng(APNG)-static = 0.10
127 %description static -l de.UTF-8
128 Statisch PNG Library.
130 %description static -l pl.UTF-8
131 Biblioteka statyczna PNG.
133 %description static -l pt_BR.UTF-8
134 Bibliotecas estáticas para desenvolvimento com libpng.
137 Summary: libpng utility programs
138 Summary(pl.UTF-8): Narzędzia do plików PNG
139 Group: Applications/Graphics
140 Requires: %{name} = %{epoch}:%{version}-%{release}
143 This package contains utility programs to convert PNG files to and
146 %description progs -l pl.UTF-8
147 Narzędzia do konwersji plików PNG z lub do plików PNM.
157 %ifarch %{arm} aarch64
158 %ifarch %{arm_with_neon}
159 --enable-arm-neon=yes \
161 --enable-arm-neon=check \
164 %ifarch mipsel mips64el
165 --enable-mips-msa=check \
168 --enable-powerpc-vsx=check
173 %{__make} -C contrib/pngminus \
176 OPT_FLAGS="%{rpmcppflags} %{rpmcflags}"
178 %{?with_tests:%{__make} -j1 check}
181 rm -rf $RPM_BUILD_ROOT
182 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
185 DESTDIR=$RPM_BUILD_ROOT
187 install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir}
188 install example.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
190 %if %{without default_libpng}
191 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{libpng-config,pn?2pn?} \
192 $RPM_BUILD_ROOT%{_libdir}/libpng.{so,la,a} \
193 $RPM_BUILD_ROOT%{_includedir}/png*.h \
194 $RPM_BUILD_ROOT%{_pkgconfigdir}/libpng.pc \
195 $RPM_BUILD_ROOT%{_mandir}/man[35]/*png*
199 rm -rf $RPM_BUILD_ROOT
201 %post -p /sbin/ldconfig
202 %postun -p /sbin/ldconfig
205 %defattr(644,root,root,755)
206 %doc ANNOUNCE CHANGES LICENSE README TODO
207 %attr(755,root,root) %{_libdir}/libpng16.so.*.*.*
208 %attr(755,root,root) %ghost %{_libdir}/libpng16.so.16
211 %defattr(644,root,root,755)
212 %doc libpng-manual.txt
213 %attr(755,root,root) %{_bindir}/libpng16-config
214 %attr(755,root,root) %{_libdir}/libpng16.so
215 %{_libdir}/libpng16.la
216 %{_includedir}/libpng16
217 %{_pkgconfigdir}/libpng16.pc
218 %{_examplesdir}/%{name}-%{version}
219 %if %{with default_libpng}
220 %attr(755,root,root) %{_bindir}/libpng-config
221 %attr(755,root,root) %{_libdir}/libpng.so
223 %{_pkgconfigdir}/libpng.pc
224 %{_includedir}/png*.h
225 %{_mandir}/man3/libpng.3*
226 %{_mandir}/man3/libpngpf.3*
227 %{_mandir}/man5/png.5*
231 %defattr(644,root,root,755)
232 %{_libdir}/libpng16.a
233 %if %{with default_libpng}
237 %if %{with default_libpng}
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_bindir}/png2pnm
241 %attr(755,root,root) %{_bindir}/pngfix
242 %attr(755,root,root) %{_bindir}/png-fix-itxt
243 %attr(755,root,root) %{_bindir}/pnm2png