]>
Commit | Line | Data |
---|---|---|
9f7aa829 | 1 | %define realname libpng |
2 | Summary: PNG library - Mingw32 cross version | |
b3e04b96 | 3 | Summary(pl.UTF-8): Biblioteka PNG - wersja skrośna dla Mingw32 |
9f7aa829 | 4 | Name: crossmingw32-%{realname} |
7f92beb6 | 5 | Version: 1.2.26 |
0c9d78c2 | 6 | Release: 1 |
9f7aa829 | 7 | License: distributable |
8388a19b | 8 | Group: Development/Libraries |
f2e257f3 | 9 | Source0: http://dl.sourceforge.net/libpng/%{realname}-%{version}.tar.lzma |
7f92beb6 | 10 | # Source0-md5: 08910ba5da02003b81afb30f630b98a5 |
9f7aa829 | 11 | Patch0: %{realname}-pngminus.patch |
a84c2514 JB |
12 | Patch1: %{realname}-opt.patch |
13 | Patch2: %{realname}-revert.patch | |
14 | Patch3: %{realname}-norpath.patch | |
f2e257f3 | 15 | Patch4: %{realname}-apng.patch |
7f92beb6 JB |
16 | Patch5: %{realname}-cve.patch |
17 | Patch6: %{name}-shared.patch | |
9f7aa829 | 18 | URL: http://www.libpng.org/pub/png/libpng.html |
19 | BuildRequires: crossmingw32-gcc | |
9f7aa829 | 20 | BuildRequires: crossmingw32-zlib |
f2e257f3 | 21 | BuildRequires: lzma >= 1:4.42 |
2f40b942 | 22 | Requires: crossmingw32-zlib |
a73e6b35 | 23 | Provides: crossmingw32-libpng(APNG) = 0.10 |
9f7aa829 | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %define no_install_post_strip 1 | |
27 | ||
1cc5645e | 28 | %define target i386-mingw32 |
bec58d81 | 29 | %define target_platform i386-pc-mingw32 |
1cc5645e | 30 | |
31 | %define _sysprefix /usr | |
32 | %define _prefix %{_sysprefix}/%{target} | |
b6948a14 | 33 | %define _libdir %{_prefix}/lib |
1cc5645e | 34 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
8388a19b | 35 | %define _dlldir /usr/share/wine/windows/system |
1cc5645e | 36 | %define __cc %{target}-gcc |
37 | %define __cxx %{target}-g++ | |
9f7aa829 | 38 | |
2b67cc26 | 39 | %ifarch alpha sparc sparc64 sparcv9 |
40 | %define optflags -O2 | |
41 | %endif | |
42 | ||
9f7aa829 | 43 | %description |
44 | The PNG library is a collection of routines used to create and | |
45 | manipulate PNG format graphics files. The PNG format was designed as a | |
46 | replacement for GIF, with many improvements and extensions. | |
47 | ||
8388a19b JB |
48 | This package contains the cross version for Win32. |
49 | ||
cb750922 JR |
50 | %description -l pl.UTF-8 |
51 | Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania | |
52 | plikami w formacie graficznym PNG. Format ten został stworzony jako | |
53 | zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami. | |
9f7aa829 | 54 | |
8388a19b JB |
55 | Ten pakiet zawiera wersję skrośną dla Win32. |
56 | ||
57 | %package static | |
58 | Summary: Static libpng library (cross mingw32 version) | |
59 | Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna mingw32) | |
60 | Group: Development/Libraries | |
61 | Requires: %{name} = %{version}-%{release} | |
a73e6b35 | 62 | Provides: crossmingw32-libpng-static(APNG) = 0.10 |
8388a19b JB |
63 | |
64 | %description static | |
65 | Static libpng library (cross mingw32 version). | |
66 | ||
67 | %description static -l pl.UTF-8 | |
68 | Statyczna biblioteka libpng (wersja skrośna mingw32). | |
69 | ||
70 | %package dll | |
71 | Summary: libpng - DLL library for Windows | |
72 | Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows | |
73 | Group: Applications/Emulators | |
74 | Requires: crossmingw32-zlib-dll | |
75 | Requires: wine | |
a73e6b35 | 76 | Provides: crossmingw32-libpng-dll(APNG) = 0.10 |
8388a19b JB |
77 | |
78 | %description dll | |
79 | libpng - DLL library for Windows. | |
80 | ||
81 | %description dll -l pl.UTF-8 | |
82 | libpng - biblioteka DLL dla Windows. | |
9f7aa829 | 83 | |
84 | %prep | |
f2e257f3 JB |
85 | %setup -q -n %{realname}-%{version} -c -T |
86 | lzma -dc %{SOURCE0} | tar xf - -C .. | |
9f7aa829 | 87 | %patch0 -p1 |
88 | %patch1 -p1 | |
89 | %patch2 -p1 | |
90 | %patch3 -p1 | |
f2e257f3 JB |
91 | %patch4 -p0 |
92 | %patch5 -p1 | |
7f92beb6 | 93 | %patch6 -p1 |
9f7aa829 | 94 | |
95 | %build | |
1cc5645e | 96 | %configure \ |
97 | --target=%{target} \ | |
98 | --host=%{target} \ | |
99 | --with-pkgconfigdir=%{_pkgconfigdir} | |
100 | ||
101 | %{__make} | |
9f7aa829 | 102 | |
9f7aa829 | 103 | %install |
8388a19b JB |
104 | rm -rf $RPM_BUILD_ROOT |
105 | ||
1cc5645e | 106 | %{__make} install \ |
107 | DESTDIR=$RPM_BUILD_ROOT | |
9f7aa829 | 108 | |
8388a19b JB |
109 | install -d $RPM_BUILD_ROOT%{_dlldir} |
110 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
111 | ||
112 | %if 0%{!?debug:1} | |
113 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
114 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
115 | %endif | |
116 | ||
117 | rm -rf $RPM_BUILD_ROOT%{_datadir}/man | |
118 | ||
9f7aa829 | 119 | %clean |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
8388a19b JB |
124 | %{_libdir}/libpng.dll.a |
125 | %{_libdir}/libpng12.dll.a | |
126 | %{_libdir}/libpng.la | |
127 | %{_libdir}/libpng12.la | |
1cc5645e | 128 | %dir %{_includedir}/libpng12 |
129 | %{_includedir}/libpng12/* | |
1cc5645e | 130 | %{_pkgconfigdir}/*.pc |
131 | ||
8388a19b JB |
132 | %files static |
133 | %defattr(644,root,root,755) | |
134 | %{_libdir}/libpng.a | |
135 | %{_libdir}/libpng12.a | |
136 | ||
137 | %files dll | |
138 | %defattr(644,root,root,755) | |
139 | %{_dlldir}/libpng-*.dll | |
140 | %{_dlldir}/libpng12-*.dll |