1 %define realname libpng
2 Summary: PNG library - Mingw32 cross version
3 Summary(pl.UTF-8): Biblioteka PNG - wersja skrośna dla Mingw32
4 Name: crossmingw32-%{realname}
8 Group: Development/Libraries
9 Source0: http://dl.sourceforge.net/libpng/%{realname}-%{version}.tar.lzma
10 # Source0-md5: bc4f03c61e74ddca22620888b1118d48
11 Patch0: %{realname}-pngminus.patch
12 Patch1: %{realname}-opt.patch
13 Patch2: %{realname}-revert.patch
14 Patch3: %{realname}-norpath.patch
15 # http://littlesvr.ca/apng/
16 Patch4: %{realname}-apng.patch
17 Patch5: %{name}-shared.patch
18 URL: http://www.libpng.org/pub/png/libpng.html
19 BuildRequires: autoconf >= 2.59
20 BuildRequires: automake
21 BuildRequires: crossmingw32-gcc
22 BuildRequires: crossmingw32-zlib
23 BuildRequires: libtool
24 BuildRequires: lzma >= 1:4.42
25 Requires: crossmingw32-zlib
26 Provides: crossmingw32-libpng(APNG) = 0.10
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define no_install_post_strip 1
31 %define target i386-mingw32
32 %define target_platform i386-pc-mingw32
34 %define _sysprefix /usr
35 %define _prefix %{_sysprefix}/%{target}
36 %define _libdir %{_prefix}/lib
37 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
38 %define _dlldir /usr/share/wine/windows/system
39 %define __cc %{target}-gcc
40 %define __cxx %{target}-g++
43 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
46 # -z options are invalid for mingw linker
47 %define filterout_ld -Wl,-z,.*
50 The PNG library is a collection of routines used to create and
51 manipulate PNG format graphics files. The PNG format was designed as a
52 replacement for GIF, with many improvements and extensions.
54 This package contains the cross version for Win32.
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.
61 Ten pakiet zawiera wersję skrośną dla Win32.
64 Summary: Static libpng library (cross mingw32 version)
65 Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna mingw32)
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
68 Provides: crossmingw32-libpng-static(APNG) = 0.10
71 Static libpng library (cross mingw32 version).
73 %description static -l pl.UTF-8
74 Statyczna biblioteka libpng (wersja skrośna mingw32).
77 Summary: libpng - DLL library for Windows
78 Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
79 Group: Applications/Emulators
80 Requires: crossmingw32-zlib-dll
82 Provides: crossmingw32-libpng-dll(APNG) = 0.10
85 libpng - DLL library for Windows.
87 %description dll -l pl.UTF-8
88 libpng - biblioteka DLL dla Windows.
91 %setup -q -n %{realname}-%{version} -c -T
92 lzma -dc %{SOURCE0} | tar xf - -C ..
109 --with-pkgconfigdir=%{_pkgconfigdir}
114 rm -rf $RPM_BUILD_ROOT
117 DESTDIR=$RPM_BUILD_ROOT
119 install -d $RPM_BUILD_ROOT%{_dlldir}
120 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
123 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
124 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
127 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
130 rm -rf $RPM_BUILD_ROOT
133 %defattr(644,root,root,755)
134 %{_libdir}/libpng.dll.a
135 %{_libdir}/libpng12.dll.a
137 %{_libdir}/libpng12.la
138 %dir %{_includedir}/libpng12
139 %{_includedir}/libpng12/*
140 %{_pkgconfigdir}/*.pc
143 %defattr(644,root,root,755)
145 %{_libdir}/libpng12.a
148 %defattr(644,root,root,755)
149 %{_dlldir}/libpng-*.dll
150 %{_dlldir}/libpng12-*.dll