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 Provides: crossmingw32-libpng(APNG) = 0.10
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define no_install_post_strip 1
27 %define target i386-mingw32
28 %define target_platform i386-pc-mingw32
30 %define _sysprefix /usr
31 %define _prefix %{_sysprefix}/%{target}
32 %define _libdir %{_prefix}/lib
33 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
34 %define _dlldir /usr/share/wine/windows/system
35 %define __cc %{target}-gcc
36 %define __cxx %{target}-g++
38 %ifarch alpha sparc sparc64 sparcv9
43 The PNG library is a collection of routines used to create and
44 manipulate PNG format graphics files. The PNG format was designed as a
45 replacement for GIF, with many improvements and extensions.
47 This package contains the cross version for Win32.
49 %description -l pl.UTF-8
50 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
51 plikami w formacie graficznym PNG. Format ten został stworzony jako
52 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
54 Ten pakiet zawiera wersję skrośną dla Win32.
57 Summary: Static libpng library (cross mingw32 version)
58 Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna mingw32)
59 Group: Development/Libraries
60 Requires: %{name} = %{version}-%{release}
61 Provides: crossmingw32-libpng-static(APNG) = 0.10
64 Static libpng library (cross mingw32 version).
66 %description static -l pl.UTF-8
67 Statyczna biblioteka libpng (wersja skrośna mingw32).
70 Summary: libpng - DLL library for Windows
71 Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
72 Group: Applications/Emulators
73 Requires: crossmingw32-zlib-dll
75 Provides: crossmingw32-libpng-dll(APNG) = 0.10
78 libpng - DLL library for Windows.
80 %description dll -l pl.UTF-8
81 libpng - biblioteka DLL dla Windows.
84 %setup -q -n %{realname}-%{version} -c -T
85 lzma -dc %{SOURCE0} | tar xf - -C ..
97 --with-pkgconfigdir=%{_pkgconfigdir}
102 rm -rf $RPM_BUILD_ROOT
105 DESTDIR=$RPM_BUILD_ROOT
107 install -d $RPM_BUILD_ROOT%{_dlldir}
108 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
111 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
112 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
115 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
118 rm -rf $RPM_BUILD_ROOT
121 %defattr(644,root,root,755)
122 %{_libdir}/libpng.dll.a
123 %{_libdir}/libpng12.dll.a
125 %{_libdir}/libpng12.la
126 %dir %{_includedir}/libpng12
127 %{_includedir}/libpng12/*
128 %{_pkgconfigdir}/*.pc
131 %defattr(644,root,root,755)
133 %{_libdir}/libpng12.a
136 %defattr(644,root,root,755)
137 %{_dlldir}/libpng-*.dll
138 %{_dlldir}/libpng12-*.dll