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: 8c57a49f822b12374af7668633c11e45
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++
42 %ifarch alpha sparc sparc64 sparcv9
47 The PNG library is a collection of routines used to create and
48 manipulate PNG format graphics files. The PNG format was designed as a
49 replacement for GIF, with many improvements and extensions.
51 This package contains the cross version for Win32.
53 %description -l pl.UTF-8
54 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
55 plikami w formacie graficznym PNG. Format ten został stworzony jako
56 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
58 Ten pakiet zawiera wersję skrośną dla Win32.
61 Summary: Static libpng library (cross mingw32 version)
62 Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna mingw32)
63 Group: Development/Libraries
64 Requires: %{name} = %{version}-%{release}
65 Provides: crossmingw32-libpng-static(APNG) = 0.10
68 Static libpng library (cross mingw32 version).
70 %description static -l pl.UTF-8
71 Statyczna biblioteka libpng (wersja skrośna mingw32).
74 Summary: libpng - DLL library for Windows
75 Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
76 Group: Applications/Emulators
77 Requires: crossmingw32-zlib-dll
79 Provides: crossmingw32-libpng-dll(APNG) = 0.10
82 libpng - DLL library for Windows.
84 %description dll -l pl.UTF-8
85 libpng - biblioteka DLL dla Windows.
88 %setup -q -n %{realname}-%{version} -c -T
89 lzma -dc %{SOURCE0} | tar xf - -C ..
106 --with-pkgconfigdir=%{_pkgconfigdir}
112 rm -rf $RPM_BUILD_ROOT
115 DESTDIR=$RPM_BUILD_ROOT
117 install -d $RPM_BUILD_ROOT%{_dlldir}
118 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
121 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
122 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
125 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
128 rm -rf $RPM_BUILD_ROOT
131 %defattr(644,root,root,755)
132 %{_libdir}/libpng.dll.a
133 %{_libdir}/libpng12.dll.a
135 %{_libdir}/libpng12.la
136 %dir %{_includedir}/libpng12
137 %{_includedir}/libpng12/*
138 %{_pkgconfigdir}/*.pc
141 %defattr(644,root,root,755)
143 %{_libdir}/libpng12.a
146 %defattr(644,root,root,755)
147 %{_dlldir}/libpng-*.dll
148 %{_dlldir}/libpng12-*.dll