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