]>
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 |
de28cc00 | 4 | Version: 1.0.0 |
8eead148 | 5 | Release: 1 |
ab9a3276 JB |
6 | License: BSD |
7 | Group: Development/Libraries | |
de28cc00 JB |
8 | #Source0Download: http://downloads.webmproject.org/releases/webp/index.html |
9 | Source0: http://downloads.webmproject.org/releases/webp/libwebp-%{version}.tar.gz | |
10 | # Source0-md5: 967b8f087cb392e6cc94d5e116a120c0 | |
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++ | |
c8206670 | 32 | %define __pkgconfig_provides %{nil} |
0a7e21ab | 33 | %define __pkgconfig_requires %{nil} |
ab9a3276 JB |
34 | |
35 | %ifnarch %{ix86} | |
36 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
37 | %define optflags -O2 | |
38 | %endif | |
23670506 | 39 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
ab9a3276 | 40 | %define filterout_ld -Wl,-z,.* |
23670506 | 41 | %define filterout_c -f[-a-z0-9=]* |
ab9a3276 JB |
42 | |
43 | %description | |
cc84f5de | 44 | WebP image codec libraries. |
ab9a3276 JB |
45 | |
46 | This package contains the cross version for Win32. | |
47 | ||
48 | %description -l pl.UTF-8 | |
cc84f5de | 49 | Biblioteki kodeka obrazów WebP. |
ab9a3276 JB |
50 | |
51 | Ten pakiet zawiera wersję skrośną dla Win32. | |
52 | ||
53 | %package static | |
cc84f5de JB |
54 | Summary: Static WebP libraries (cross MinGW32 version) |
55 | Summary(pl.UTF-8): Statyczne biblioteki WebP (wersja skrośna MinGW32) | |
ab9a3276 JB |
56 | Group: Development/Libraries |
57 | Requires: %{name} = %{version}-%{release} | |
58 | ||
59 | %description static | |
cc84f5de | 60 | Static WebP libraries (cross MinGW32 version). |
ab9a3276 JB |
61 | |
62 | %description static -l pl.UTF-8 | |
cc84f5de | 63 | Statyczne biblioteki WebP (wersja skrośna MinGW32). |
ab9a3276 JB |
64 | |
65 | %package dll | |
cc84f5de JB |
66 | Summary: DLL WebP libraries for Windows |
67 | Summary(pl.UTF-8): Biblioteki DLL WebP dla Windows | |
ab9a3276 JB |
68 | Group: Applications/Emulators |
69 | Requires: wine | |
70 | ||
71 | %description dll | |
cc84f5de | 72 | DLL WebP libraries for Windows. |
ab9a3276 JB |
73 | |
74 | %description dll -l pl.UTF-8 | |
cc84f5de | 75 | Biblioteki DLL WebP dla Windows. |
ab9a3276 JB |
76 | |
77 | %prep | |
78 | %setup -q -n libwebp-%{version} | |
79 | ||
80 | sed -i -e 's/libwebp_la_LDFLAGS.*/& -no-undefined/' src/Makefile.am | |
81 | ||
82 | %build | |
83 | %{__libtoolize} | |
b39a2c4e | 84 | %{__aclocal} -I m4 |
ab9a3276 JB |
85 | %{__autoconf} |
86 | %{__autoheader} | |
87 | %{__automake} | |
88 | %configure \ | |
89 | --target=%{target} \ | |
cc84f5de JB |
90 | --host=%{target} \ |
91 | --disable-silent-rules \ | |
92 | --enable-libwebpdemux \ | |
93 | --enable-libwebpmux | |
ab9a3276 JB |
94 | |
95 | # -C src to get just the library, no utils | |
96 | %{__make} -C src | |
97 | ||
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %{__make} -C src install \ | |
102 | DESTDIR=$RPM_BUILD_ROOT | |
103 | ||
104 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
de28cc00 | 105 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
ab9a3276 JB |
106 | |
107 | %if 0%{!?debug:1} | |
108 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
109 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
110 | %endif | |
111 | ||
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc AUTHORS COPYING ChangeLog NEWS PATENTS README | |
118 | %{_libdir}/libwebp.dll.a | |
119 | %{_libdir}/libwebp.la | |
cc84f5de JB |
120 | %{_libdir}/libwebpdemux.dll.a |
121 | %{_libdir}/libwebpdemux.la | |
122 | %{_libdir}/libwebpmux.dll.a | |
123 | %{_libdir}/libwebpmux.la | |
ab9a3276 JB |
124 | %{_includedir}/webp |
125 | %{_pkgconfigdir}/libwebp.pc | |
cc84f5de JB |
126 | %{_pkgconfigdir}/libwebpdemux.pc |
127 | %{_pkgconfigdir}/libwebpmux.pc | |
ab9a3276 JB |
128 | |
129 | %files static | |
130 | %defattr(644,root,root,755) | |
131 | %{_libdir}/libwebp.a | |
cc84f5de JB |
132 | %{_libdir}/libwebpdemux.a |
133 | %{_libdir}/libwebpmux.a | |
ab9a3276 JB |
134 | |
135 | %files dll | |
136 | %defattr(644,root,root,755) | |
de28cc00 JB |
137 | %{_dlldir}/libwebp-7.dll |
138 | %{_dlldir}/libwebpmux-3.dll | |
139 | %{_dlldir}/libwebpdemux-2.dll |