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://downloads.sourceforge.net/libpng/%{realname}-%{version}.tar.xz
10 # Source0-md5: 9c2ac3c3a31de2ab867875718f8de18e
11 Patch0: %{realname}-pngminus.patch
12 Patch1: http://downloads.sourceforge.net/libpng-apng/%{realname}-%{version}-apng.patch.gz
13 # Patch1-md5: 88517ab0e9c0be2590800116e2b50c8d
14 Patch2: %{realname}-apng-fix.patch
15 URL: http://www.libpng.org/pub/png/libpng.html
16 BuildRequires: crossmingw32-gcc
17 BuildRequires: crossmingw32-zlib
18 BuildRequires: sed >= 4.0
19 BuildRequires: tar >= 1:1.22
20 BuildRequires: xz >= 1:4.999.7
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++
39 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
42 # -z options are invalid for mingw linker
43 %define filterout_ld -Wl,-z,.*
46 The PNG library is a collection of routines used to create and
47 manipulate PNG format graphics files. The PNG format was designed as a
48 replacement for GIF, with many improvements and extensions.
50 This package contains the cross version for Win32.
52 %description -l pl.UTF-8
53 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
54 plikami w formacie graficznym PNG. Format ten został stworzony jako
55 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
57 Ten pakiet zawiera wersję skrośną dla Win32.
60 Summary: Static libpng library (cross MinGW32 version)
61 Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna MinGW32)
62 Group: Development/Libraries
63 Requires: %{name} = %{version}-%{release}
64 Provides: crossmingw32-libpng-static(APNG) = 0.10
67 Static libpng library (cross MinGW32 version).
69 %description static -l pl.UTF-8
70 Statyczna biblioteka libpng (wersja skrośna MinGW32).
73 Summary: libpng - DLL library for Windows
74 Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
75 Group: Applications/Emulators
76 Requires: crossmingw32-zlib-dll
78 Provides: crossmingw32-libpng-dll(APNG) = 0.10
81 libpng - DLL library for Windows.
83 %description dll -l pl.UTF-8
84 libpng - biblioteka DLL dla Windows.
87 %setup -q -n %{realname}-%{version}
92 # avoid version script
93 sed -i -e 's/^GLD=.*/GLD=/' configure
99 --with-pkgconfigdir=%{_pkgconfigdir}
104 rm -rf $RPM_BUILD_ROOT
107 DESTDIR=$RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{_dlldir}
110 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
112 ln -sf libpng15.dll.a $RPM_BUILD_ROOT%{_libdir}/libpng.dll.a
115 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
116 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
119 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/man
122 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
126 %{_libdir}/libpng15.dll.a
127 %{_libdir}/libpng.dll.a
128 %{_libdir}/libpng15.la
130 %{_includedir}/libpng15
131 %{_includedir}/png*.h
132 %{_pkgconfigdir}/libpng15.pc
133 %{_pkgconfigdir}/libpng.pc
136 %defattr(644,root,root,755)
137 %{_libdir}/libpng15.a
141 %defattr(644,root,root,755)
142 %{_dlldir}/libpng15-*.dll