]>
Commit | Line | Data |
---|---|---|
cc84f5de JB |
1 | Summary: WebP image codec libraries - cross MinGW32 version |
2 | Summary(pl.UTF-8): Biblioteki do kodeka obrazów WebP - wersja skrośna MinGW32 | |
ab9a3276 | 3 | Name: crossmingw32-libwebp |
cc84f5de | 4 | Version: 0.3.0 |
ab9a3276 JB |
5 | Release: 1 |
6 | License: BSD | |
7 | Group: Development/Libraries | |
8 | #Source0Download: http://code.google.com/p/webp/downloads/list | |
9 | Source0: http://webp.googlecode.com/files/libwebp-%{version}.tar.gz | |
cc84f5de | 10 | # Source0-md5: 4183f4f51ada98976f14e7bd51f30938 |
b39a2c4e | 11 | URL: https://developers.google.com/speed/webp/ |
ab9a3276 JB |
12 | BuildRequires: autoconf >= 2.50 |
13 | BuildRequires: automake | |
14 | BuildRequires: crossmingw32-gcc | |
15 | BuildRequires: libtool | |
16 | BuildRequires: rpmbuild(macros) >= 1.197 | |
17 | BuildRequires: sed >= 4.0 | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define no_install_post_strip 1 | |
21 | ||
22 | %define target i386-mingw32 | |
23 | %define target_platform i386-pc-mingw32 | |
24 | ||
25 | %define _sysprefix /usr | |
26 | %define _prefix %{_sysprefix}/%{target} | |
27 | %define _libdir %{_prefix}/lib | |
28 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
29 | %define _dlldir /usr/share/wine/windows/system | |
30 | %define __cc %{target}-gcc | |
31 | %define __cxx %{target}-g++ | |
32 | ||
33 | %ifnarch %{ix86} | |
34 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
35 | %define optflags -O2 | |
36 | %endif | |
23670506 | 37 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
ab9a3276 | 38 | %define filterout_ld -Wl,-z,.* |
23670506 | 39 | %define filterout_c -f[-a-z0-9=]* |
ab9a3276 JB |
40 | |
41 | %description | |
cc84f5de | 42 | WebP image codec libraries. |
ab9a3276 JB |
43 | |
44 | This package contains the cross version for Win32. | |
45 | ||
46 | %description -l pl.UTF-8 | |
cc84f5de | 47 | Biblioteki kodeka obrazów WebP. |
ab9a3276 JB |
48 | |
49 | Ten pakiet zawiera wersję skrośną dla Win32. | |
50 | ||
51 | %package static | |
cc84f5de JB |
52 | Summary: Static WebP libraries (cross MinGW32 version) |
53 | Summary(pl.UTF-8): Statyczne biblioteki WebP (wersja skrośna MinGW32) | |
ab9a3276 JB |
54 | Group: Development/Libraries |
55 | Requires: %{name} = %{version}-%{release} | |
56 | ||
57 | %description static | |
cc84f5de | 58 | Static WebP libraries (cross MinGW32 version). |
ab9a3276 JB |
59 | |
60 | %description static -l pl.UTF-8 | |
cc84f5de | 61 | Statyczne biblioteki WebP (wersja skrośna MinGW32). |
ab9a3276 JB |
62 | |
63 | %package dll | |
cc84f5de JB |
64 | Summary: DLL WebP libraries for Windows |
65 | Summary(pl.UTF-8): Biblioteki DLL WebP dla Windows | |
ab9a3276 JB |
66 | Group: Applications/Emulators |
67 | Requires: wine | |
68 | ||
69 | %description dll | |
cc84f5de | 70 | DLL WebP libraries for Windows. |
ab9a3276 JB |
71 | |
72 | %description dll -l pl.UTF-8 | |
cc84f5de | 73 | Biblioteki DLL WebP dla Windows. |
ab9a3276 JB |
74 | |
75 | %prep | |
76 | %setup -q -n libwebp-%{version} | |
77 | ||
78 | sed -i -e 's/libwebp_la_LDFLAGS.*/& -no-undefined/' src/Makefile.am | |
79 | ||
80 | %build | |
81 | %{__libtoolize} | |
b39a2c4e | 82 | %{__aclocal} -I m4 |
ab9a3276 JB |
83 | %{__autoconf} |
84 | %{__autoheader} | |
85 | %{__automake} | |
86 | %configure \ | |
87 | --target=%{target} \ | |
cc84f5de JB |
88 | --host=%{target} \ |
89 | --disable-silent-rules \ | |
90 | --enable-libwebpdemux \ | |
91 | --enable-libwebpmux | |
ab9a3276 JB |
92 | |
93 | # -C src to get just the library, no utils | |
94 | %{__make} -C src | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %{__make} -C src install \ | |
100 | DESTDIR=$RPM_BUILD_ROOT | |
101 | ||
102 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
103 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
104 | ||
105 | %if 0%{!?debug:1} | |
106 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
107 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
108 | %endif | |
109 | ||
110 | %clean | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %doc AUTHORS COPYING ChangeLog NEWS PATENTS README | |
116 | %{_libdir}/libwebp.dll.a | |
117 | %{_libdir}/libwebp.la | |
cc84f5de JB |
118 | %{_libdir}/libwebpdemux.dll.a |
119 | %{_libdir}/libwebpdemux.la | |
120 | %{_libdir}/libwebpmux.dll.a | |
121 | %{_libdir}/libwebpmux.la | |
ab9a3276 JB |
122 | %{_includedir}/webp |
123 | %{_pkgconfigdir}/libwebp.pc | |
cc84f5de JB |
124 | %{_pkgconfigdir}/libwebpdemux.pc |
125 | %{_pkgconfigdir}/libwebpmux.pc | |
ab9a3276 JB |
126 | |
127 | %files static | |
128 | %defattr(644,root,root,755) | |
129 | %{_libdir}/libwebp.a | |
cc84f5de JB |
130 | %{_libdir}/libwebpdemux.a |
131 | %{_libdir}/libwebpmux.a | |
ab9a3276 JB |
132 | |
133 | %files dll | |
134 | %defattr(644,root,root,755) | |
b39a2c4e | 135 | %{_dlldir}/libwebp-4.dll |
cc84f5de JB |
136 | %{_dlldir}/libwebpmux-0.dll |
137 | %{_dlldir}/libwebpdemux-0.dll |