]>
Commit | Line | Data |
---|---|---|
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=) | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without tests # don't perform "make check" | |
6 | %bcond_without default_libpng # don't use this libpng as default system libpng | |
7 | # | |
8 | Summary: PNG library | |
9 | Summary(de.UTF-8): PNG-Library | |
10 | Summary(es.UTF-8): Biblioteca PNG | |
11 | Summary(fr.UTF-8): Librarie PNG | |
12 | Summary(pl.UTF-8): Biblioteka PNG | |
13 | Summary(pt_BR.UTF-8): Biblioteca PNG | |
14 | Summary(tr.UTF-8): PNG kitaplığı | |
15 | Name: libpng | |
16 | Version: 1.6.35 | |
17 | Release: 1 | |
18 | Epoch: 2 | |
19 | License: distributable | |
20 | Group: Libraries | |
21 | Source0: http://downloads.sourceforge.net/libpng/%{name}-%{version}.tar.xz | |
22 | # Source0-md5: 678b7e696a62a193ed3503b04bf449d6 | |
23 | Patch0: %{name}-pngminus.patch | |
24 | Patch1: http://downloads.sourceforge.net/libpng-apng/%{name}-%{version}-apng.patch.gz | |
25 | # Patch1-md5: 9b09826862164e2302827f7af3c52431 | |
26 | URL: http://www.libpng.org/pub/png/libpng.html | |
27 | BuildRequires: rpmbuild(macros) >= 1.213 | |
28 | BuildRequires: tar >= 1:1.22 | |
29 | BuildRequires: xz >= 1:4.999.7 | |
30 | BuildRequires: zlib-devel >= 1.2.9 | |
31 | Provides: libpng(APNG) = 0.10 | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | The PNG library is a collection of routines used to create and | |
36 | manipulate PNG format graphics files. The PNG format was designed as a | |
37 | replacement for GIF, with many improvements and extensions. | |
38 | ||
39 | %description -l de.UTF-8 | |
40 | Die PNG-Library ist eine Sammlung von Routinen zum Erstellen und | |
41 | Bearbeiten von Grafiken im PNG-Format. Das PNG-Format wurde als Ersatz | |
42 | für GIF entwickelt und enthält viele Verbesserungen und Erweiterungen. | |
43 | ||
44 | %description -l es.UTF-8 | |
45 | Esta biblioteca es una colección de rutinas para crear y manipular | |
46 | archivos gráficos en el formato PNG. Este formato fue proyectado para | |
47 | substituir el | |
48 | ||
49 | %description -l fr.UTF-8 | |
50 | La librairie PNG est un ensemble de routines utilisées pour créer et | |
51 | manipuler des fichiers graphiques au format PNG. Le format PNG a été | |
52 | élaboré pour remplacer le GIF, avec de nombreuses améliorations et | |
53 | extensions. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania | |
57 | plikami w formacie graficznym PNG. Format ten został stworzony jako | |
58 | zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami. | |
59 | ||
60 | %description -l pt_BR.UTF-8 | |
61 | Esta biblioteca é uma coleção de rotinas para criar e manipular | |
62 | arquivos gráficos no formato PNG. Este formato foi projetado para | |
63 | substituir o formato GIF, com extensões e melhorias. | |
64 | ||
65 | %description -l tr.UTF-8 | |
66 | PNG kitaplığı, PNG formatındaki resim dosyalarını işlemeye yönelik | |
67 | yordamları içerir. PNG, GIF formatının yerini almak üzere tasarlanmış | |
68 | bir resim formatıdır. | |
69 | ||
70 | %package devel | |
71 | Summary: Header files for libpng | |
72 | Summary(de.UTF-8): libpng Headers | |
73 | Summary(es.UTF-8): Archivos de inclusión y bibliotecas estáticas | |
74 | Summary(fr.UTF-8): en-têtes et bibliothèques statiques | |
75 | Summary(pl.UTF-8): Pliki nagłówkowe libpng | |
76 | Summary(pt_BR.UTF-8): Arquivos de inclusão e bibliotecas estáticas | |
77 | Summary(tr.UTF-8): başlık dosyaları ve statik kitaplıklar | |
78 | Group: Development/Libraries | |
79 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
80 | Requires: zlib-devel | |
81 | Provides: libpng(APNG)-devel = 0.10 | |
82 | Conflicts: libpng < 1.0.15 | |
83 | ||
84 | %description devel | |
85 | The header files are only needed for development of programs using the | |
86 | PNG library. | |
87 | ||
88 | %description devel -l de.UTF-8 | |
89 | Die Header-Dateien werden nur zur Entwicklung von Programmen mit der | |
90 | PNG-Library benötigt. | |
91 | ||
92 | %description devel -l es.UTF-8 | |
93 | Archivos de inclusión y bibliotecas estáticas que son necesarios | |
94 | solamente para el desarrollo de programas que usan la biblioteca PNG. | |
95 | ||
96 | %description devel -l fr.UTF-8 | |
97 | Fichiers d'en-tete et les librairies qui sont requis seulement pour le | |
98 | développement avec la librairie PNG. | |
99 | ||
100 | %description devel -l pl.UTF-8 | |
101 | W pakiecie tym znajdują się pliki nagłówkowe, przeznaczone dla | |
102 | programistów używających bibliotek PNG. | |
103 | ||
104 | %description devel -l pt_BR.UTF-8 | |
105 | Arquivos de inclusão e bibliotecas estáticas que são necessários | |
106 | somente para o desenvolvimento de programas que usam a biblioteca PNG. | |
107 | ||
108 | %description devel -l tr.UTF-8 | |
109 | PNG kitaplığını kullanan programlar geliştirmek için gereken | |
110 | kitaplıklar ve başlık dosyaları. | |
111 | ||
112 | %package static | |
113 | Summary: Static PNG library | |
114 | Summary(de.UTF-8): Statisch PNG Library | |
115 | Summary(pl.UTF-8): Biblioteka statyczna PNG | |
116 | Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libpng | |
117 | Group: Development/Libraries | |
118 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} | |
119 | Provides: libpng(APNG)-static = 0.10 | |
120 | ||
121 | %description static | |
122 | Static PNG library. | |
123 | ||
124 | %description static -l de.UTF-8 | |
125 | Statisch PNG Library. | |
126 | ||
127 | %description static -l pl.UTF-8 | |
128 | Biblioteka statyczna PNG. | |
129 | ||
130 | %description static -l pt_BR.UTF-8 | |
131 | Bibliotecas estáticas para desenvolvimento com libpng. | |
132 | ||
133 | %package progs | |
134 | Summary: libpng utility programs | |
135 | Summary(pl.UTF-8): Narzędzia do plików PNG | |
136 | Group: Applications/Graphics | |
137 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
138 | ||
139 | %description progs | |
140 | This package contains utility programs to convert PNG files to and | |
141 | from PNM files. | |
142 | ||
143 | %description progs -l pl.UTF-8 | |
144 | Narzędzia do konwersji plików PNG z lub do plików PNM. | |
145 | ||
146 | %prep | |
147 | %setup -q | |
148 | %patch0 -p1 | |
149 | %patch1 -p1 | |
150 | ||
151 | %build | |
152 | %configure \ | |
153 | %ifarch %{arm} aarch64 | |
154 | --enable-arm-neon=check \ | |
155 | %endif | |
156 | %ifarch mipsel mips64el | |
157 | --enable-mips-msa=check \ | |
158 | %endif | |
159 | %ifarch ppc ppc64 | |
160 | --enable-powerpc-vsx=check | |
161 | %endif | |
162 | ||
163 | %{__make} | |
164 | ||
165 | %{__make} -C contrib/pngminus -f makefile.std \ | |
166 | LIBPATH=%{_libdir} \ | |
167 | CC="%{__cc}" \ | |
168 | OPT_FLAGS="%{rpmcppflags} %{rpmcflags}" | |
169 | ||
170 | %{?with_tests:%{__make} check} | |
171 | ||
172 | %install | |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
175 | ||
176 | %{__make} install \ | |
177 | DESTDIR=$RPM_BUILD_ROOT | |
178 | ||
179 | install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir} | |
180 | install example.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
181 | ||
182 | %if %{without default_libpng} | |
183 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{libpng-config,pn?2pn?} \ | |
184 | $RPM_BUILD_ROOT%{_libdir}/libpng.{so,la,a} \ | |
185 | $RPM_BUILD_ROOT%{_includedir}/png*.h \ | |
186 | $RPM_BUILD_ROOT%{_pkgconfigdir}/libpng.pc \ | |
187 | $RPM_BUILD_ROOT%{_mandir}/man[35]/*png* | |
188 | %endif | |
189 | ||
190 | %clean | |
191 | rm -rf $RPM_BUILD_ROOT | |
192 | ||
193 | %post -p /sbin/ldconfig | |
194 | %postun -p /sbin/ldconfig | |
195 | ||
196 | %files | |
197 | %defattr(644,root,root,755) | |
198 | %doc ANNOUNCE CHANGES LICENSE README TODO | |
199 | %attr(755,root,root) %{_libdir}/libpng16.so.*.*.* | |
200 | %attr(755,root,root) %ghost %{_libdir}/libpng16.so.16 | |
201 | ||
202 | %files devel | |
203 | %defattr(644,root,root,755) | |
204 | %doc libpng-manual.txt | |
205 | %attr(755,root,root) %{_bindir}/libpng16-config | |
206 | %attr(755,root,root) %{_libdir}/libpng16.so | |
207 | %{_libdir}/libpng16.la | |
208 | %{_includedir}/libpng16 | |
209 | %{_pkgconfigdir}/libpng16.pc | |
210 | %{_examplesdir}/%{name}-%{version} | |
211 | %if %{with default_libpng} | |
212 | %attr(755,root,root) %{_bindir}/libpng-config | |
213 | %attr(755,root,root) %{_libdir}/libpng.so | |
214 | %{_libdir}/libpng.la | |
215 | %{_pkgconfigdir}/libpng.pc | |
216 | %{_includedir}/png*.h | |
217 | %{_mandir}/man3/libpng.3* | |
218 | %{_mandir}/man3/libpngpf.3* | |
219 | %{_mandir}/man5/png.5* | |
220 | %endif | |
221 | ||
222 | %files static | |
223 | %defattr(644,root,root,755) | |
224 | %{_libdir}/libpng16.a | |
225 | %if %{with default_libpng} | |
226 | %{_libdir}/libpng.a | |
227 | %endif | |
228 | ||
229 | %if %{with default_libpng} | |
230 | %files progs | |
231 | %defattr(644,root,root,755) | |
232 | %attr(755,root,root) %{_bindir}/png2pnm | |
233 | %attr(755,root,root) %{_bindir}/pngfix | |
234 | %attr(755,root,root) %{_bindir}/png-fix-itxt | |
235 | %attr(755,root,root) %{_bindir}/pnm2png | |
236 | %endif |