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