apply tizen packaging
[platform/upstream/libwebp.git] / packaging / libwebp.spec
1 Summary:        WebP image codec libraries
2 Name:           libwebp
3 Version:        1.1.0
4 Release:        1
5 Group:          Multimedia/Libraries
6 URL:            https://developers.google.com/speed/webp/
7 License:        BSD 3-clause
8 Source0:        %{name}-%{version}.tar.gz
9 Source1:        %{name}.manifest
10
11 BuildRequires:  cmake
12 BuildRequires:  libtool
13 BuildRequires:  giflib-devel
14
15 %description
16 WebP is an image format that does both lossy and lossless compression of
17 digital photographic images. WebP consists of a codec based on VP8, that Google
18 open-sourced in May 2010 and a container based on RIFF. Webmasters, web
19 developers and browser developers can use WebP to compress, archive and
20 distribute digital images more efficiently.
21
22 %package devel
23 Summary:        Libraries and header files for libwebp app development
24 Group:          Development/Libraries
25 Requires:       %{name} = %{version}-%{release}
26
27 %description devel
28 libwebp-devel contains the Libraries and header files you'll need to develop libwebp applications.
29 libwebp is an WebP image codec libraries.
30
31 %package doc
32 Summary:        libwebp documentation
33 Group:          Documentation
34
35 %description doc
36 Documentation for libwebp.
37
38 %package tools
39 Summary:        libwebp tools
40 Group:          Development/Tools
41 Requires:       %{name} = %{version}-%{release}
42
43 %description tools
44 libwebp tools.
45
46 %prep
47 %setup -q
48 cp %{SOURCE1} .
49
50 %build
51 # WEBP_USE_THREAD is added for using multi-thread(pthread)
52 export CFLAGS="$CFLAGS -DWEBP_USE_THREAD"
53 %cmake .
54 make %{?_smp_mflags}
55
56 %install
57 %make_install
58
59 %post -p /sbin/ldconfig
60 %postun -p /sbin/ldconfig
61
62 %files
63 %manifest %{name}.manifest
64 %defattr(-,root,root,-)
65 %license COPYING PATENTS
66 %{_libdir}/*.so.*
67
68 %files devel
69 %defattr(-,root,root,-)
70 %license COPYING PATENTS
71 %{_libdir}/*.so
72 %{_libdir}/pkgconfig/*.pc
73 %{_includedir}/webp
74
75 %files doc
76 %{_mandir}/man[1]/[a-z]*
77
78 %files tools
79 %defattr(-,root,root,-)
80 %{_bindir}/[a-z]*
81 #config
82 /usr/share/WebP/cmake/*