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: e3122e7b5b5c36c034a4624c65f8a9d8
11 Patch0: %{realname}-pngminus.patch
12 Patch1: http://downloads.sourceforge.net/libpng-apng/%{realname}-1.5.15-apng.patch.gz
13 # Patch1-md5: 3ae9ea7e4bd201f0b25e25cd6049b094
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, most of -f options are Linux-specific
42 %define filterout_ld -Wl,-z,.*
43 %define filterout_c -f[-a-z0-9=]*
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}
95 --with-pkgconfigdir=%{_pkgconfigdir}
100 rm -rf $RPM_BUILD_ROOT
103 DESTDIR=$RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT%{_dlldir}
106 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
108 ln -sf libpng15.dll.a $RPM_BUILD_ROOT%{_libdir}/libpng.dll.a
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} -r $RPM_BUILD_ROOT%{_datadir}/man
118 rm -rf $RPM_BUILD_ROOT
121 %defattr(644,root,root,755)
122 %{_libdir}/libpng15.dll.a
123 %{_libdir}/libpng.dll.a
124 %{_libdir}/libpng15.la
126 %{_includedir}/libpng15
127 %{_includedir}/png*.h
128 %{_pkgconfigdir}/libpng15.pc
129 %{_pkgconfigdir}/libpng.pc
132 %defattr(644,root,root,755)
133 %{_libdir}/libpng15.a
137 %defattr(644,root,root,755)
138 %{_dlldir}/libpng15-*.dll