| 1 | %define ver 0.2.1 |
|---|
| 2 | %define rel 1 |
|---|
| 3 | |
|---|
| 4 | Name: libwebp |
|---|
| 5 | Version: %{ver} |
|---|
| 6 | Release: %{rel}%{?_dist_release} |
|---|
| 7 | Group: Development/Libraries |
|---|
| 8 | URL: http://webmproject.org/ |
|---|
| 9 | Summary: Library and tools for the WebP graphics format |
|---|
| 10 | Summary(ja): WebP 画像フォーマットのためのライブラリとツール |
|---|
| 11 | # Additional IPR is licensed as well. See PATENTS file for details |
|---|
| 12 | License: BSD |
|---|
| 13 | Source0: http://webp.googlecode.com/files/%{name}-%{version}.tar.gz |
|---|
| 14 | Source1: libwebp_jni_example.java |
|---|
| 15 | BuildRequires: libjpeg-devel libpng-devel libtool swig |
|---|
| 16 | BuildRequires: java-devel |
|---|
| 17 | BuildRequires: jpackage-utils |
|---|
| 18 | |
|---|
| 19 | %description |
|---|
| 20 | WebP is an image format that does lossy compression of digital |
|---|
| 21 | photographic images. WebP consists of a codec based on VP8, and a |
|---|
| 22 | container based on RIFF. Webmasters, web developers and browser |
|---|
| 23 | developers can use WebP to compress, archive and distribute digital |
|---|
| 24 | images more efficiently. |
|---|
| 25 | |
|---|
| 26 | %package tools |
|---|
| 27 | Group: Development/Tools |
|---|
| 28 | Summary: The WebP command line tools |
|---|
| 29 | Summary(ja): WebP コマンドラインツール |
|---|
| 30 | |
|---|
| 31 | %description tools |
|---|
| 32 | WebP is an image format that does lossy compression of digital |
|---|
| 33 | photographic images. WebP consists of a codec based on VP8, and a |
|---|
| 34 | container based on RIFF. Webmasters, web developers and browser |
|---|
| 35 | developers can use WebP to compress, archive and distribute digital |
|---|
| 36 | images more efficiently. |
|---|
| 37 | |
|---|
| 38 | %package devel |
|---|
| 39 | Group: Development/Libraries |
|---|
| 40 | Summary: Development files for libwebp, a library for the WebP format |
|---|
| 41 | Summary(ja): WebP フォーマットのためのライブラリ libwebp の開発ファイル |
|---|
| 42 | Requires: %{name} = %{version}-%{release} |
|---|
| 43 | |
|---|
| 44 | %description devel |
|---|
| 45 | WebP is an image format that does lossy compression of digital |
|---|
| 46 | photographic images. WebP consists of a codec based on VP8, and a |
|---|
| 47 | container based on RIFF. Webmasters, web developers and browser |
|---|
| 48 | developers can use WebP to compress, archive and distribute digital |
|---|
| 49 | images more efficiently. |
|---|
| 50 | |
|---|
| 51 | %package java |
|---|
| 52 | Group: Development/Libraries |
|---|
| 53 | Summary: Java bindings for libwebp, a library for the WebP format |
|---|
| 54 | Summary(ja): WebP フォーマットのためのライブラリ libwebp の Java バインディング |
|---|
| 55 | Requires: %{name} = %{version}-%{release} |
|---|
| 56 | Requires: java |
|---|
| 57 | Requires: jpackage-utils |
|---|
| 58 | |
|---|
| 59 | %description java |
|---|
| 60 | Java bindings for libwebp. |
|---|
| 61 | |
|---|
| 62 | Vendor: Project Vine |
|---|
| 63 | Distribution: Vine Linux |
|---|
| 64 | Packager: iwaim |
|---|
| 65 | |
|---|
| 66 | %prep |
|---|
| 67 | %setup -q |
|---|
| 68 | |
|---|
| 69 | %build |
|---|
| 70 | mkdir -p m4 |
|---|
| 71 | ./autogen.sh |
|---|
| 72 | %configure --disable-static |
|---|
| 73 | make %{?_smp_mflags} |
|---|
| 74 | |
|---|
| 75 | # swig generated Java bindings |
|---|
| 76 | cp %{SOURCE1} . |
|---|
| 77 | cd swig |
|---|
| 78 | rm -rf libwebp.jar libwebp_java_wrap.c |
|---|
| 79 | mkdir -p java/com/google/webp |
|---|
| 80 | swig -ignoremissing -I../src -java \ |
|---|
| 81 | -package com.google.webp \ |
|---|
| 82 | -outdir java/com/google/webp \ |
|---|
| 83 | -o libwebp_java_wrap.c libwebp.i |
|---|
| 84 | |
|---|
| 85 | gcc %{optflags} -shared -fPIC -fno-strict-aliasing \ |
|---|
| 86 | -I/usr/lib/jvm/java/include \ |
|---|
| 87 | -I/usr/lib/jvm/java/include/linux \ |
|---|
| 88 | -I../src \ |
|---|
| 89 | -L../src/.libs -lwebp libwebp_java_wrap.c \ |
|---|
| 90 | -o libwebp_jni.so |
|---|
| 91 | |
|---|
| 92 | cd java |
|---|
| 93 | javac com/google/webp/libwebp.java |
|---|
| 94 | jar cvf ../libwebp.jar com/google/webp/*.class |
|---|
| 95 | |
|---|
| 96 | %install |
|---|
| 97 | make install DESTDIR=%{buildroot} |
|---|
| 98 | find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete |
|---|
| 99 | |
|---|
| 100 | # swig generated Java bindings |
|---|
| 101 | mkdir -p %{buildroot}/%{_libdir}/%{name}-java |
|---|
| 102 | cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/ |
|---|
| 103 | |
|---|
| 104 | %post -n %{name} -p /sbin/ldconfig |
|---|
| 105 | |
|---|
| 106 | %postun -n %{name} -p /sbin/ldconfig |
|---|
| 107 | |
|---|
| 108 | %files tools |
|---|
| 109 | %{_bindir}/* |
|---|
| 110 | %{_mandir}/man*/* |
|---|
| 111 | |
|---|
| 112 | %files -n %{name} |
|---|
| 113 | %doc README PATENTS COPYING NEWS AUTHORS |
|---|
| 114 | %{_libdir}/%{name}*.so.* |
|---|
| 115 | |
|---|
| 116 | %files devel |
|---|
| 117 | %{_libdir}/%{name}*.so |
|---|
| 118 | %{_includedir}/* |
|---|
| 119 | %{_libdir}/pkgconfig/* |
|---|
| 120 | |
|---|
| 121 | %files java |
|---|
| 122 | %doc libwebp_jni_example.java |
|---|
| 123 | %{_libdir}/%{name}-java/ |
|---|
| 124 | |
|---|
| 125 | %changelog |
|---|
| 126 | * Sat Jan 12 2013 IWAI, Masaharu <iwai@alib.jp> 0.2.1-1 |
|---|
| 127 | - initial build for Vine Linux |
|---|
| 128 | |
|---|
| 129 | * Thu Dec 27 2012 Rahul Sundaram <sundaram@fedoraproject.org> - 0.2.1-1 |
|---|
| 130 | - new upstream release 0.2.1 |
|---|
| 131 | |
|---|
| 132 | * Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 0.1.3-3 |
|---|
| 133 | - rebuild against new libjpeg |
|---|
| 134 | |
|---|
| 135 | * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-2 |
|---|
| 136 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
|---|
| 137 | |
|---|
| 138 | * Thu Feb 02 2012 Rahul Sundaram <sundaram@fedoraproject.org> - 0.1.3-1 |
|---|
| 139 | - Several spec improvements by Scott Tsai <scottt.tw@gmail.com> |
|---|
| 140 | |
|---|
| 141 | * Wed May 25 2011 Rahul Sundaram <sundaram@fedoraproject.org> - 0.1.2-1 |
|---|
| 142 | - Initial spec. Based on openSUSE one |
|---|
| 143 | |
|---|