]> git.pld-linux.org Git - packages/crossmingw32-libwebp.git/blob - crossmingw32-libwebp.spec
- added filterout_c to avoid build failures on -f* options
[packages/crossmingw32-libwebp.git] / crossmingw32-libwebp.spec
1 Summary:        WebP image codec library and tools - cross MinGW32 version
2 Summary(pl.UTF-8):      Biblioteka i narzędzia do kodeka obrazów WebP - wersja skrośna MinGW32
3 Name:           crossmingw32-libwebp
4 Version:        0.2.0
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
10 # Source0-md5:  75f33cabe4af0dfb51d751c67ae1b3d0
11 URL:            https://developers.google.com/speed/webp/
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
37 # -z options are invalid for mingw linker, most of -f options are Linux-specific
38 %define         filterout_ld    -Wl,-z,.*
39 %define         filterout_c     -f[-a-z0-9=]*
40
41 %description
42 WebP image codec library.
43
44 This package contains the cross version for Win32.
45
46 %description -l pl.UTF-8
47 Biblioteka kodeka obrazów WebP.
48
49 Ten pakiet zawiera wersję skrośną dla Win32.
50
51 %package static
52 Summary:        Static WebP library (cross MinGW32 version)
53 Summary(pl.UTF-8):      Statyczna biblioteka WebP (wersja skrośna MinGW32)
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56
57 %description static
58 Static WebP library (cross MinGW32 version).
59
60 %description static -l pl.UTF-8
61 Statyczna biblioteka WebP (wersja skrośna MinGW32).
62
63 %package dll
64 Summary:        DLL WebP library for Windows
65 Summary(pl.UTF-8):      Biblioteka DLL WebP dla Windows
66 Group:          Applications/Emulators
67 Requires:       wine
68
69 %description dll
70 DLL WebP library for Windows.
71
72 %description dll -l pl.UTF-8
73 Biblioteka DLL WebP dla Windows.
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}
82 %{__aclocal} -I m4
83 %{__autoconf}
84 %{__autoheader}
85 %{__automake}
86 %configure \
87         --target=%{target} \
88         --host=%{target}
89
90 # -C src to get just the library, no utils
91 %{__make} -C src
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %{__make} -C src install \
97         DESTDIR=$RPM_BUILD_ROOT
98
99 install -d $RPM_BUILD_ROOT%{_dlldir}
100 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
101
102 %if 0%{!?debug:1}
103 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
104 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
105 %endif
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %files
111 %defattr(644,root,root,755)
112 %doc AUTHORS COPYING ChangeLog NEWS PATENTS README
113 %{_libdir}/libwebp.dll.a
114 %{_libdir}/libwebp.la
115 %{_includedir}/webp
116 %{_pkgconfigdir}/libwebp.pc
117
118 %files static
119 %defattr(644,root,root,755)
120 %{_libdir}/libwebp.a
121
122 %files dll
123 %defattr(644,root,root,755)
124 %{_dlldir}/libwebp-4.dll
This page took 0.072658 seconds and 3 git commands to generate.