]>
Commit | Line | Data |
---|---|---|
9f7aa829 | 1 | %define realname libpng |
b15bad05 JB |
2 | Summary: PNG library - MinGW32 cross version |
3 | Summary(pl.UTF-8): Biblioteka PNG - wersja skrośna dla MinGW32 | |
9f7aa829 | 4 | Name: crossmingw32-%{realname} |
8475a47f | 5 | Version: 1.5.10 |
d71feee6 | 6 | Release: 1 |
9f7aa829 | 7 | License: distributable |
8388a19b | 8 | Group: Development/Libraries |
fe64cb93 | 9 | Source0: http://downloads.sourceforge.net/libpng/%{realname}-%{version}.tar.xz |
8475a47f | 10 | # Source0-md5: 9c2ac3c3a31de2ab867875718f8de18e |
9f7aa829 | 11 | Patch0: %{realname}-pngminus.patch |
91788afb | 12 | Patch1: http://downloads.sourceforge.net/libpng-apng/%{realname}-%{version}-apng.patch.gz |
8475a47f | 13 | # Patch1-md5: 88517ab0e9c0be2590800116e2b50c8d |
91788afb | 14 | Patch2: %{realname}-apng-fix.patch |
9f7aa829 | 15 | URL: http://www.libpng.org/pub/png/libpng.html |
16 | BuildRequires: crossmingw32-gcc | |
9f7aa829 | 17 | BuildRequires: crossmingw32-zlib |
81c0d773 | 18 | BuildRequires: sed >= 4.0 |
70f4a7a9 | 19 | BuildRequires: tar >= 1:1.22 |
fe64cb93 | 20 | BuildRequires: xz >= 1:4.999.7 |
2f40b942 | 21 | Requires: crossmingw32-zlib |
a73e6b35 | 22 | Provides: crossmingw32-libpng(APNG) = 0.10 |
9f7aa829 | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %define no_install_post_strip 1 | |
26 | ||
1cc5645e | 27 | %define target i386-mingw32 |
bec58d81 | 28 | %define target_platform i386-pc-mingw32 |
1cc5645e | 29 | |
30 | %define _sysprefix /usr | |
31 | %define _prefix %{_sysprefix}/%{target} | |
b6948a14 | 32 | %define _libdir %{_prefix}/lib |
1cc5645e | 33 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
8388a19b | 34 | %define _dlldir /usr/share/wine/windows/system |
1cc5645e | 35 | %define __cc %{target}-gcc |
36 | %define __cxx %{target}-g++ | |
9f7aa829 | 37 | |
66bd41c2 JB |
38 | %ifnarch %{ix86} |
39 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
2b67cc26 | 40 | %define optflags -O2 |
41 | %endif | |
66bd41c2 | 42 | # -z options are invalid for mingw linker |
e20c2eed | 43 | %define filterout_ld -Wl,-z,.* |
2b67cc26 | 44 | |
9f7aa829 | 45 | %description |
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. | |
49 | ||
8388a19b JB |
50 | This package contains the cross version for Win32. |
51 | ||
cb750922 JR |
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. | |
9f7aa829 | 56 | |
8388a19b JB |
57 | Ten pakiet zawiera wersję skrośną dla Win32. |
58 | ||
59 | %package static | |
b15bad05 JB |
60 | Summary: Static libpng library (cross MinGW32 version) |
61 | Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna MinGW32) | |
8388a19b JB |
62 | Group: Development/Libraries |
63 | Requires: %{name} = %{version}-%{release} | |
a73e6b35 | 64 | Provides: crossmingw32-libpng-static(APNG) = 0.10 |
8388a19b JB |
65 | |
66 | %description static | |
b15bad05 | 67 | Static libpng library (cross MinGW32 version). |
8388a19b JB |
68 | |
69 | %description static -l pl.UTF-8 | |
b15bad05 | 70 | Statyczna biblioteka libpng (wersja skrośna MinGW32). |
8388a19b JB |
71 | |
72 | %package dll | |
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 | |
77 | Requires: wine | |
a73e6b35 | 78 | Provides: crossmingw32-libpng-dll(APNG) = 0.10 |
8388a19b JB |
79 | |
80 | %description dll | |
81 | libpng - DLL library for Windows. | |
82 | ||
83 | %description dll -l pl.UTF-8 | |
84 | libpng - biblioteka DLL dla Windows. | |
9f7aa829 | 85 | |
86 | %prep | |
eb49f919 | 87 | %setup -q -n %{realname}-%{version} |
9f7aa829 | 88 | %patch0 -p1 |
91788afb JB |
89 | %patch1 -p1 |
90 | %patch2 -p1 | |
9f7aa829 | 91 | |
81c0d773 JB |
92 | # avoid version script |
93 | sed -i -e 's/^GLD=.*/GLD=/' configure | |
94 | ||
9f7aa829 | 95 | %build |
1cc5645e | 96 | %configure \ |
97 | --target=%{target} \ | |
98 | --host=%{target} \ | |
99 | --with-pkgconfigdir=%{_pkgconfigdir} | |
100 | ||
0e98fafe | 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 | ||
91788afb | 112 | ln -sf libpng15.dll.a $RPM_BUILD_ROOT%{_libdir}/libpng.dll.a |
fe64cb93 | 113 | |
8388a19b JB |
114 | %if 0%{!?debug:1} |
115 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
116 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
117 | %endif | |
118 | ||
91788afb | 119 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/man |
8388a19b | 120 | |
9f7aa829 | 121 | %clean |
122 | rm -rf $RPM_BUILD_ROOT | |
123 | ||
124 | %files | |
125 | %defattr(644,root,root,755) | |
91788afb | 126 | %{_libdir}/libpng15.dll.a |
8388a19b | 127 | %{_libdir}/libpng.dll.a |
91788afb | 128 | %{_libdir}/libpng15.la |
8388a19b | 129 | %{_libdir}/libpng.la |
91788afb | 130 | %{_includedir}/libpng15 |
fe64cb93 | 131 | %{_includedir}/png*.h |
91788afb | 132 | %{_pkgconfigdir}/libpng15.pc |
fe64cb93 | 133 | %{_pkgconfigdir}/libpng.pc |
1cc5645e | 134 | |
8388a19b JB |
135 | %files static |
136 | %defattr(644,root,root,755) | |
91788afb | 137 | %{_libdir}/libpng15.a |
8388a19b | 138 | %{_libdir}/libpng.a |
8388a19b JB |
139 | |
140 | %files dll | |
141 | %defattr(644,root,root,755) | |
91788afb | 142 | %{_dlldir}/libpng15-*.dll |