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: 0342d1cedb9b9a80294dd1b1e2ec9ae9
11 Patch0: %{realname}-pngminus.patch
12 # http://littlesvr.ca/apng/diff/%{name}-%{version}-apng.patch | dos2unix
13 Patch1: %{realname}-apng.patch
14 URL: http://www.libpng.org/pub/png/libpng.html
15 BuildRequires: crossmingw32-gcc
16 BuildRequires: crossmingw32-zlib
17 BuildRequires: sed >= 4.0
18 BuildRequires: tar >= 1:1.22
19 BuildRequires: xz >= 1:4.999.7
20 Requires: crossmingw32-zlib
21 Provides: crossmingw32-libpng(APNG) = 0.10
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++
38 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
41 # -z options are invalid for mingw linker
42 %define filterout_ld -Wl,-z,.*
45 The PNG library is a collection of routines used to create and
46 manipulate PNG format graphics files. The PNG format was designed as a
47 replacement for GIF, with many improvements and extensions.
49 This package contains the cross version for Win32.
51 %description -l pl.UTF-8
52 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
53 plikami w formacie graficznym PNG. Format ten został stworzony jako
54 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
56 Ten pakiet zawiera wersję skrośną dla Win32.
59 Summary: Static libpng library (cross MinGW32 version)
60 Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna MinGW32)
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
63 Provides: crossmingw32-libpng-static(APNG) = 0.10
66 Static libpng library (cross MinGW32 version).
68 %description static -l pl.UTF-8
69 Statyczna biblioteka libpng (wersja skrośna MinGW32).
72 Summary: libpng - DLL library for Windows
73 Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
74 Group: Applications/Emulators
75 Requires: crossmingw32-zlib-dll
77 Provides: crossmingw32-libpng-dll(APNG) = 0.10
80 libpng - DLL library for Windows.
82 %description dll -l pl.UTF-8
83 libpng - biblioteka DLL dla Windows.
86 %setup -q -n %{realname}-%{version} -c -T
87 xz -dc %{SOURCE0} | tar xf - -C ..
91 # avoid version script
92 sed -i -e 's/^GLD=.*/GLD=/' configure
98 --with-pkgconfigdir=%{_pkgconfigdir}
103 rm -rf $RPM_BUILD_ROOT
106 DESTDIR=$RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{_dlldir}
109 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
111 ln -sf libpng14.dll.a $RPM_BUILD_ROOT%{_libdir}/libpng.dll.a
114 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
115 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
118 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
121 rm -rf $RPM_BUILD_ROOT
124 %defattr(644,root,root,755)
125 %{_libdir}/libpng14.dll.a
126 %{_libdir}/libpng.dll.a
127 %{_libdir}/libpng14.la
129 %{_includedir}/libpng14
130 %{_includedir}/png*.h
131 %{_pkgconfigdir}/libpng14.pc
132 %{_pkgconfigdir}/libpng.pc
135 %defattr(644,root,root,755)
136 %{_libdir}/libpng14.a
140 %defattr(644,root,root,755)
141 %{_dlldir}/libpng14-*.dll