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.bz2
10 # Source0-md5: 1e676c5cc7dfa4ef78affe8fb8f1011d
11 Patch0: %{realname}-pngminus.patch
12 Patch1: %{realname}-opt.patch
13 Patch2: %{realname}-revert.patch
14 Patch3: %{realname}-norpath.patch
15 Patch4: %{name}-shared.patch
16 URL: http://www.libpng.org/pub/png/libpng.html
17 BuildRequires: crossmingw32-gcc
18 BuildRequires: crossmingw32-zlib
19 Requires: crossmingw32-zlib
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define no_install_post_strip 1
24 %define target i386-mingw32
25 %define target_platform i386-pc-mingw32
27 %define _sysprefix /usr
28 %define _prefix %{_sysprefix}/%{target}
29 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
30 %define _dlldir /usr/share/wine/windows/system
31 %define __cc %{target}-gcc
32 %define __cxx %{target}-g++
34 %ifarch alpha sparc sparc64 sparcv9
39 The PNG library is a collection of routines used to create and
40 manipulate PNG format graphics files. The PNG format was designed as a
41 replacement for GIF, with many improvements and extensions.
43 This package contains the cross version for Win32.
45 %description -l pl.UTF-8
46 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
47 plikami w formacie graficznym PNG. Format ten został stworzony jako
48 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
50 Ten pakiet zawiera wersję skrośną dla Win32.
53 Summary: Static libpng library (cross mingw32 version)
54 Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna mingw32)
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
59 Static libpng library (cross mingw32 version).
61 %description static -l pl.UTF-8
62 Statyczna biblioteka libpng (wersja skrośna mingw32).
65 Summary: libpng - DLL library for Windows
66 Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
67 Group: Applications/Emulators
68 Requires: crossmingw32-zlib-dll
72 libpng - DLL library for Windows.
74 %description dll -l pl.UTF-8
75 libpng - biblioteka DLL dla Windows.
78 %setup -q -n %{realname}-%{version}
89 --with-pkgconfigdir=%{_pkgconfigdir}
94 rm -rf $RPM_BUILD_ROOT
97 DESTDIR=$RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{_dlldir}
100 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
103 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
104 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
107 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
110 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
114 %{_libdir}/libpng.dll.a
115 %{_libdir}/libpng12.dll.a
117 %{_libdir}/libpng12.la
118 %dir %{_includedir}/libpng12
119 %{_includedir}/libpng12/*
120 %{_pkgconfigdir}/*.pc
123 %defattr(644,root,root,755)
125 %{_libdir}/libpng12.a
128 %defattr(644,root,root,755)
129 %{_dlldir}/libpng-*.dll
130 %{_dlldir}/libpng12-*.dll