]>
Commit | Line | Data |
---|---|---|
9f7aa829 | 1 | %define realname libpng |
2 | Summary: PNG library - Mingw32 cross version | |
cb750922 | 3 | Summary(pl.UTF-8): Biblioteka PNG - wersja skrośna dla Mingw32 |
9f7aa829 | 4 | Name: crossmingw32-%{realname} |
c1c85050 | 5 | Version: 1.2.16 |
0c9d78c2 | 6 | Release: 1 |
9f7aa829 | 7 | License: distributable |
8 | Group: Libraries | |
b8eda397 | 9 | Source0: http://dl.sourceforge.net/libpng/%{realname}-%{version}.tar.bz2 |
c1c85050 | 10 | # Source0-md5: 7a1ca4f49bcffdec60d50f48460642bd |
9f7aa829 | 11 | Patch0: %{realname}-pngminus.patch |
a84c2514 JB |
12 | Patch1: %{realname}-opt.patch |
13 | Patch2: %{realname}-revert.patch | |
14 | Patch3: %{realname}-norpath.patch | |
15 | Patch4: %{realname}-libdirfix.patch | |
16 | Patch5: %{name}-shared.patch | |
9f7aa829 | 17 | URL: http://www.libpng.org/pub/png/libpng.html |
18 | BuildRequires: crossmingw32-gcc | |
19 | BuildRequires: crossmingw32-w32api | |
20 | BuildRequires: crossmingw32-zlib | |
2f40b942 | 21 | Requires: crossmingw32-zlib |
9f7aa829 | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %define no_install_post_strip 1 | |
25 | ||
26 | %define target i386-mingw32 | |
27 | %define target_platform i386-pc-mingw32 | |
28 | %define arch %{_prefix}/%{target} | |
29 | %define gccarch %{_prefix}/lib/gcc-lib/%{target} | |
30 | %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version} | |
31 | ||
32 | %define __cc %{target}-gcc | |
33 | %define __cxx %{target}-g++ | |
34 | ||
2b67cc26 | 35 | %ifarch alpha sparc sparc64 sparcv9 |
36 | %define optflags -O2 | |
37 | %endif | |
38 | ||
9f7aa829 | 39 | %description |
40 | The PNG library is a collection of routines used to create and | |
41 | manipulate PNG format graphics files. The PNG format was designed as a | |
42 | replacement for GIF, with many improvements and extensions. | |
43 | ||
cb750922 JR |
44 | %description -l pl.UTF-8 |
45 | Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania | |
46 | plikami w formacie graficznym PNG. Format ten został stworzony jako | |
47 | zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami. | |
9f7aa829 | 48 | |
49 | %package dll | |
50 | Summary: libpng - DLL library for Windows | |
cb750922 | 51 | Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows |
9f7aa829 | 52 | Group: Applications/Emulators |
53 | ||
54 | %description dll | |
55 | libpng - DLL library for Windows. | |
56 | ||
cb750922 | 57 | %description dll -l pl.UTF-8 |
9f7aa829 | 58 | libpng - biblioteka DLL dla Windows. |
59 | ||
60 | %prep | |
b8eda397 | 61 | %setup -q -n %{realname}-%{version} |
9f7aa829 | 62 | %patch0 -p1 |
63 | %patch1 -p1 | |
64 | %patch2 -p1 | |
65 | %patch3 -p1 | |
66 | %patch4 -p1 | |
9f7aa829 | 67 | |
9f7aa829 | 68 | ln -sf scripts/makefile.gcmmx ./Makefile |
9f7aa829 | 69 | |
a84c2514 | 70 | %patch5 -p1 |
9f7aa829 | 71 | |
72 | %build | |
73 | %{__make} \ | |
74 | prefix=%{_arch} \ | |
75 | LIBPATH=%{_arch}/lib \ | |
76 | CC="%{target}-gcc" \ | |
77 | RANLIB="%{target}-ranlib" | |
78 | OPT_FLAGS="%{rpmcflags}" | |
79 | ||
80 | %if 0%{!?debug:1} | |
81 | %{target}-strip -R.comment -R.note *.dll | |
82 | %{target}-strip -g -R.comment -R.note *.a | |
83 | %endif | |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | install -d $RPM_BUILD_ROOT%{arch}/{include,lib} | |
88 | install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
89 | ||
90 | install *.a $RPM_BUILD_ROOT%{arch}/lib | |
91 | install png.h pngconf.h $RPM_BUILD_ROOT%{arch}/include | |
92 | install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system | |
93 | ||
94 | %clean | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %files | |
98 | %defattr(644,root,root,755) | |
99 | %{arch}/include/* | |
100 | %{arch}/lib/* | |
101 | ||
102 | %files dll | |
103 | %defattr(644,root,root,755) | |
a84c2514 | 104 | %{_datadir}/wine/windows/system/*.dll |