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: f340daef5a039ec6d25bddc9b3b91a52
11 Patch0: %{realname}-pngminus.patch
12 Patch1: %{realname}-opt.patch
13 Patch2: %{realname}-revert.patch
14 Patch3: %{realname}-norpath.patch
15 Patch4: %{realname}-apng.patch
16 Patch5: %{name}-shared.patch
17 URL: http://www.libpng.org/pub/png/libpng.html
18 BuildRequires: crossmingw32-gcc
19 BuildRequires: crossmingw32-zlib
20 BuildRequires: lzma >= 1:4.42
21 Requires: crossmingw32-zlib
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define no_install_post_strip 1
26 %define target i386-mingw32
27 %define target_platform i386-pc-mingw32
29 %define _sysprefix /usr
30 %define _prefix %{_sysprefix}/%{target}
31 %define _libdir %{_prefix}/lib
32 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
33 %define _dlldir /usr/share/wine/windows/system
34 %define __cc %{target}-gcc
35 %define __cxx %{target}-g++
37 %ifarch alpha sparc sparc64 sparcv9
42 The PNG library is a collection of routines used to create and
43 manipulate PNG format graphics files. The PNG format was designed as a
44 replacement for GIF, with many improvements and extensions.
46 This package contains the cross version for Win32.
48 %description -l pl.UTF-8
49 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
50 plikami w formacie graficznym PNG. Format ten został stworzony jako
51 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
53 Ten pakiet zawiera wersję skrośną dla Win32.
56 Summary: Static libpng library (cross mingw32 version)
57 Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna mingw32)
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
62 Static libpng library (cross mingw32 version).
64 %description static -l pl.UTF-8
65 Statyczna biblioteka libpng (wersja skrośna mingw32).
68 Summary: libpng - DLL library for Windows
69 Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
70 Group: Applications/Emulators
71 Requires: crossmingw32-zlib-dll
75 libpng - DLL library for Windows.
77 %description dll -l pl.UTF-8
78 libpng - biblioteka DLL dla Windows.
81 %setup -q -n %{realname}-%{version} -c -T
82 lzma -dc %{SOURCE0} | tar xf - -C ..
94 --with-pkgconfigdir=%{_pkgconfigdir}
99 rm -rf $RPM_BUILD_ROOT
102 DESTDIR=$RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT%{_dlldir}
105 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
108 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
109 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
112 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
115 rm -rf $RPM_BUILD_ROOT
118 %defattr(644,root,root,755)
119 %{_libdir}/libpng.dll.a
120 %{_libdir}/libpng12.dll.a
122 %{_libdir}/libpng12.la
123 %dir %{_includedir}/libpng12
124 %{_includedir}/libpng12/*
125 %{_pkgconfigdir}/*.pc
128 %defattr(644,root,root,755)
130 %{_libdir}/libpng12.a
133 %defattr(644,root,root,755)
134 %{_dlldir}/libpng-*.dll
135 %{_dlldir}/libpng12-*.dll