]>
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} |
ecef6087 | 5 | Version: 1.6.21 |
7185282e | 6 | Release: 1 |
9f7aa829 | 7 | License: distributable |
8388a19b | 8 | Group: Development/Libraries |
fe64cb93 | 9 | Source0: http://downloads.sourceforge.net/libpng/%{realname}-%{version}.tar.xz |
ecef6087 | 10 | # Source0-md5: 3bacb4728f6694a64ad9052769d6a4ce |
9f7aa829 | 11 | Patch0: %{realname}-pngminus.patch |
217bbcce | 12 | Patch1: http://downloads.sourceforge.net/libpng-apng/%{realname}-%{version}-apng.patch.gz |
ecef6087 | 13 | # Patch1-md5: 360346394543ec0a880f61830541608f |
9f7aa829 | 14 | URL: http://www.libpng.org/pub/png/libpng.html |
15 | BuildRequires: crossmingw32-gcc | |
9f7aa829 | 16 | BuildRequires: crossmingw32-zlib |
81c0d773 | 17 | BuildRequires: sed >= 4.0 |
70f4a7a9 | 18 | BuildRequires: tar >= 1:1.22 |
fe64cb93 | 19 | BuildRequires: xz >= 1:4.999.7 |
2f40b942 | 20 | Requires: crossmingw32-zlib |
a73e6b35 | 21 | Provides: crossmingw32-libpng(APNG) = 0.10 |
9f7aa829 | 22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
23 | ||
24 | %define no_install_post_strip 1 | |
25 | ||
1cc5645e | 26 | %define target i386-mingw32 |
bec58d81 | 27 | %define target_platform i386-pc-mingw32 |
1cc5645e | 28 | |
29 | %define _sysprefix /usr | |
30 | %define _prefix %{_sysprefix}/%{target} | |
b6948a14 | 31 | %define _libdir %{_prefix}/lib |
1cc5645e | 32 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
8388a19b | 33 | %define _dlldir /usr/share/wine/windows/system |
1cc5645e | 34 | %define __cc %{target}-gcc |
35 | %define __cxx %{target}-g++ | |
d6e9f2d7 | 36 | %define __pkgconfig_provides %{nil} |
f45d7586 | 37 | %define __pkgconfig_requires %{nil} |
9f7aa829 | 38 | |
66bd41c2 JB |
39 | %ifnarch %{ix86} |
40 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
2b67cc26 | 41 | %define optflags -O2 |
42 | %endif | |
d9707029 | 43 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
e20c2eed | 44 | %define filterout_ld -Wl,-z,.* |
d9707029 | 45 | %define filterout_c -f[-a-z0-9=]* |
2b67cc26 | 46 | |
9f7aa829 | 47 | %description |
48 | The PNG library is a collection of routines used to create and | |
49 | manipulate PNG format graphics files. The PNG format was designed as a | |
50 | replacement for GIF, with many improvements and extensions. | |
51 | ||
8388a19b JB |
52 | This package contains the cross version for Win32. |
53 | ||
cb750922 JR |
54 | %description -l pl.UTF-8 |
55 | Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania | |
56 | plikami w formacie graficznym PNG. Format ten został stworzony jako | |
57 | zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami. | |
9f7aa829 | 58 | |
8388a19b JB |
59 | Ten pakiet zawiera wersję skrośną dla Win32. |
60 | ||
61 | %package static | |
b15bad05 JB |
62 | Summary: Static libpng library (cross MinGW32 version) |
63 | Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna MinGW32) | |
8388a19b JB |
64 | Group: Development/Libraries |
65 | Requires: %{name} = %{version}-%{release} | |
a73e6b35 | 66 | Provides: crossmingw32-libpng-static(APNG) = 0.10 |
8388a19b JB |
67 | |
68 | %description static | |
b15bad05 | 69 | Static libpng library (cross MinGW32 version). |
8388a19b JB |
70 | |
71 | %description static -l pl.UTF-8 | |
b15bad05 | 72 | Statyczna biblioteka libpng (wersja skrośna MinGW32). |
8388a19b JB |
73 | |
74 | %package dll | |
75 | Summary: libpng - DLL library for Windows | |
76 | Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows | |
77 | Group: Applications/Emulators | |
78 | Requires: crossmingw32-zlib-dll | |
79 | Requires: wine | |
a73e6b35 | 80 | Provides: crossmingw32-libpng-dll(APNG) = 0.10 |
8388a19b JB |
81 | |
82 | %description dll | |
83 | libpng - DLL library for Windows. | |
84 | ||
85 | %description dll -l pl.UTF-8 | |
86 | libpng - biblioteka DLL dla Windows. | |
9f7aa829 | 87 | |
88 | %prep | |
eb49f919 | 89 | %setup -q -n %{realname}-%{version} |
9f7aa829 | 90 | %patch0 -p1 |
91788afb | 91 | %patch1 -p1 |
81c0d773 | 92 | |
9f7aa829 | 93 | %build |
1cc5645e | 94 | %configure \ |
95 | --target=%{target} \ | |
96 | --host=%{target} \ | |
97 | --with-pkgconfigdir=%{_pkgconfigdir} | |
98 | ||
0e98fafe | 99 | %{__make} |
9f7aa829 | 100 | |
9f7aa829 | 101 | %install |
8388a19b JB |
102 | rm -rf $RPM_BUILD_ROOT |
103 | ||
1cc5645e | 104 | %{__make} install \ |
105 | DESTDIR=$RPM_BUILD_ROOT | |
9f7aa829 | 106 | |
8388a19b JB |
107 | install -d $RPM_BUILD_ROOT%{_dlldir} |
108 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
109 | ||
a9760a6d | 110 | ln -sf libpng16.dll.a $RPM_BUILD_ROOT%{_libdir}/libpng.dll.a |
fe64cb93 | 111 | |
8388a19b JB |
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 | ||
91788afb | 117 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/man |
8388a19b | 118 | |
9f7aa829 | 119 | %clean |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
a9760a6d | 124 | %{_libdir}/libpng16.dll.a |
8388a19b | 125 | %{_libdir}/libpng.dll.a |
a9760a6d | 126 | %{_libdir}/libpng16.la |
8388a19b | 127 | %{_libdir}/libpng.la |
a9760a6d | 128 | %{_includedir}/libpng16 |
fe64cb93 | 129 | %{_includedir}/png*.h |
a9760a6d | 130 | %{_pkgconfigdir}/libpng16.pc |
fe64cb93 | 131 | %{_pkgconfigdir}/libpng.pc |
1cc5645e | 132 | |
8388a19b JB |
133 | %files static |
134 | %defattr(644,root,root,755) | |
a9760a6d | 135 | %{_libdir}/libpng16.a |
8388a19b | 136 | %{_libdir}/libpng.a |
8388a19b JB |
137 | |
138 | %files dll | |
139 | %defattr(644,root,root,755) | |
a9760a6d | 140 | %{_dlldir}/libpng16-*.dll |