]>
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} |
231a43ad | 5 | Version: 1.2.28 |
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 |
231a43ad | 10 | # Source0-md5: 8c57a49f822b12374af7668633c11e45 |
9f7aa829 | 11 | Patch0: %{realname}-pngminus.patch |
a84c2514 JB |
12 | Patch1: %{realname}-opt.patch |
13 | Patch2: %{realname}-revert.patch | |
14 | Patch3: %{realname}-norpath.patch | |
231a43ad | 15 | # http://littlesvr.ca/apng/ |
f2e257f3 | 16 | Patch4: %{realname}-apng.patch |
231a43ad | 17 | Patch5: %{name}-shared.patch |
9f7aa829 | 18 | URL: http://www.libpng.org/pub/png/libpng.html |
231a43ad JB |
19 | BuildRequires: autoconf >= 2.59 |
20 | BuildRequires: automake | |
9f7aa829 | 21 | BuildRequires: crossmingw32-gcc |
9f7aa829 | 22 | BuildRequires: crossmingw32-zlib |
231a43ad | 23 | BuildRequires: libtool |
f2e257f3 | 24 | BuildRequires: lzma >= 1:4.42 |
2f40b942 | 25 | Requires: crossmingw32-zlib |
a73e6b35 | 26 | Provides: crossmingw32-libpng(APNG) = 0.10 |
9f7aa829 | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %define no_install_post_strip 1 | |
30 | ||
1cc5645e | 31 | %define target i386-mingw32 |
bec58d81 | 32 | %define target_platform i386-pc-mingw32 |
1cc5645e | 33 | |
34 | %define _sysprefix /usr | |
35 | %define _prefix %{_sysprefix}/%{target} | |
b6948a14 | 36 | %define _libdir %{_prefix}/lib |
1cc5645e | 37 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
8388a19b | 38 | %define _dlldir /usr/share/wine/windows/system |
1cc5645e | 39 | %define __cc %{target}-gcc |
40 | %define __cxx %{target}-g++ | |
9f7aa829 | 41 | |
2b67cc26 | 42 | %ifarch alpha sparc sparc64 sparcv9 |
43 | %define optflags -O2 | |
44 | %endif | |
45 | ||
9f7aa829 | 46 | %description |
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. | |
50 | ||
8388a19b JB |
51 | This package contains the cross version for Win32. |
52 | ||
cb750922 JR |
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. | |
9f7aa829 | 57 | |
8388a19b JB |
58 | Ten pakiet zawiera wersję skrośną dla Win32. |
59 | ||
60 | %package static | |
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} | |
a73e6b35 | 65 | Provides: crossmingw32-libpng-static(APNG) = 0.10 |
8388a19b JB |
66 | |
67 | %description static | |
68 | Static libpng library (cross mingw32 version). | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Statyczna biblioteka libpng (wersja skrośna mingw32). | |
72 | ||
73 | %package dll | |
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 | |
78 | Requires: wine | |
a73e6b35 | 79 | Provides: crossmingw32-libpng-dll(APNG) = 0.10 |
8388a19b JB |
80 | |
81 | %description dll | |
82 | libpng - DLL library for Windows. | |
83 | ||
84 | %description dll -l pl.UTF-8 | |
85 | libpng - biblioteka DLL dla Windows. | |
9f7aa829 | 86 | |
87 | %prep | |
f2e257f3 JB |
88 | %setup -q -n %{realname}-%{version} -c -T |
89 | lzma -dc %{SOURCE0} | tar xf - -C .. | |
9f7aa829 | 90 | %patch0 -p1 |
91 | %patch1 -p1 | |
92 | %patch2 -p1 | |
93 | %patch3 -p1 | |
f2e257f3 JB |
94 | %patch4 -p0 |
95 | %patch5 -p1 | |
9f7aa829 | 96 | |
97 | %build | |
231a43ad JB |
98 | %{__libtoolize} |
99 | %{__aclocal} | |
100 | %{__autoconf} | |
101 | %{__autoheader} | |
102 | %{__automake} | |
1cc5645e | 103 | %configure \ |
104 | --target=%{target} \ | |
105 | --host=%{target} \ | |
106 | --with-pkgconfigdir=%{_pkgconfigdir} | |
107 | ||
231a43ad JB |
108 | %{__make} \ |
109 | ECHO=echo | |
9f7aa829 | 110 | |
9f7aa829 | 111 | %install |
8388a19b JB |
112 | rm -rf $RPM_BUILD_ROOT |
113 | ||
1cc5645e | 114 | %{__make} install \ |
115 | DESTDIR=$RPM_BUILD_ROOT | |
9f7aa829 | 116 | |
8388a19b JB |
117 | install -d $RPM_BUILD_ROOT%{_dlldir} |
118 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
119 | ||
120 | %if 0%{!?debug:1} | |
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 | |
123 | %endif | |
124 | ||
125 | rm -rf $RPM_BUILD_ROOT%{_datadir}/man | |
126 | ||
9f7aa829 | 127 | %clean |
128 | rm -rf $RPM_BUILD_ROOT | |
129 | ||
130 | %files | |
131 | %defattr(644,root,root,755) | |
8388a19b JB |
132 | %{_libdir}/libpng.dll.a |
133 | %{_libdir}/libpng12.dll.a | |
134 | %{_libdir}/libpng.la | |
135 | %{_libdir}/libpng12.la | |
1cc5645e | 136 | %dir %{_includedir}/libpng12 |
137 | %{_includedir}/libpng12/* | |
1cc5645e | 138 | %{_pkgconfigdir}/*.pc |
139 | ||
8388a19b JB |
140 | %files static |
141 | %defattr(644,root,root,755) | |
142 | %{_libdir}/libpng.a | |
143 | %{_libdir}/libpng12.a | |
144 | ||
145 | %files dll | |
146 | %defattr(644,root,root,755) | |
147 | %{_dlldir}/libpng-*.dll | |
148 | %{_dlldir}/libpng12-*.dll |