libwebp.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. Name: libwebp
  2. Version: 0.2.1
  3. Release: 1%{?dist}
  4. Group: Development/Libraries
  5. URL: http://webmproject.org/
  6. Summary: Library and tools for the WebP graphics format
  7. # Additional IPR is licensed as well. See PATENTS file for details
  8. License: BSD
  9. Source0: http://webp.googlecode.com/files/%{name}-%{version}.tar.gz
  10. Source1: libwebp_jni_example.java
  11. BuildRequires: libjpeg-devel libpng-devel libtool swig
  12. BuildRequires: java-devel
  13. BuildRequires: jpackage-utils
  14. %description
  15. WebP is an image format that does lossy compression of digital
  16. photographic images. WebP consists of a codec based on VP8, and a
  17. container based on RIFF. Webmasters, web developers and browser
  18. developers can use WebP to compress, archive and distribute digital
  19. images more efficiently.
  20. %package tools
  21. Group: Development/Tools
  22. Summary: The WebP command line tools
  23. %description tools
  24. WebP is an image format that does lossy compression of digital
  25. photographic images. WebP consists of a codec based on VP8, and a
  26. container based on RIFF. Webmasters, web developers and browser
  27. developers can use WebP to compress, archive and distribute digital
  28. images more efficiently.
  29. %package devel
  30. Group: Development/Libraries
  31. Summary: Development files for libwebp, a library for the WebP format
  32. Requires: %{name}%{?_isa} = %{version}-%{release}
  33. %description devel
  34. WebP is an image format that does lossy compression of digital
  35. photographic images. WebP consists of a codec based on VP8, and a
  36. container based on RIFF. Webmasters, web developers and browser
  37. developers can use WebP to compress, archive and distribute digital
  38. images more efficiently.
  39. %package java
  40. Group: Development/Libraries
  41. Summary: Java bindings for libwebp, a library for the WebP format
  42. Requires: %{name}%{?_isa} = %{version}-%{release}
  43. Requires: java
  44. Requires: jpackage-utils
  45. %description java
  46. Java bindings for libwebp.
  47. %prep
  48. %setup -q
  49. %build
  50. mkdir -p m4
  51. ./autogen.sh
  52. %configure --disable-static
  53. make %{?_smp_mflags}
  54. # swig generated Java bindings
  55. cp %{SOURCE1} .
  56. cd swig
  57. rm -rf libwebp.jar libwebp_java_wrap.c
  58. mkdir -p java/com/google/webp
  59. swig -ignoremissing -I../src -java \
  60. -package com.google.webp \
  61. -outdir java/com/google/webp \
  62. -o libwebp_java_wrap.c libwebp.i
  63. gcc %{optflags} -shared -fPIC -fno-strict-aliasing \
  64. -I/usr/lib/jvm/java/include \
  65. -I/usr/lib/jvm/java/include/linux \
  66. -I../src \
  67. -L../src/.libs -lwebp libwebp_java_wrap.c \
  68. -o libwebp_jni.so
  69. cd java
  70. javac com/google/webp/libwebp.java
  71. jar cvf ../libwebp.jar com/google/webp/*.class
  72. %install
  73. make install DESTDIR=%{buildroot}
  74. find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete
  75. # swig generated Java bindings
  76. mkdir -p %{buildroot}/%{_libdir}/%{name}-java
  77. cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
  78. %post -n %{name} -p /sbin/ldconfig
  79. %postun -n %{name} -p /sbin/ldconfig
  80. %files tools
  81. %{_bindir}/*
  82. %{_mandir}/man*/*
  83. %files -n %{name}
  84. %doc README PATENTS COPYING NEWS AUTHORS
  85. %{_libdir}/%{name}*.so.*
  86. %files devel
  87. %{_libdir}/%{name}*.so
  88. %{_includedir}/*
  89. %{_libdir}/pkgconfig/*
  90. %files java
  91. %doc libwebp_jni_example.java
  92. %{_libdir}/%{name}-java/
  93. %changelog
  94. * Thu Dec 27 2012 Rahul Sundaram <sundaram@fedoraproject.org> - 0.2.1-1
  95. - new upstream release 0.2.1
  96. * Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 0.1.3-3
  97. - rebuild against new libjpeg
  98. * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-2
  99. - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
  100. * Thu Feb 02 2012 Rahul Sundaram <sundaram@fedoraproject.org> - 0.1.3-1
  101. - Several spec improvements by Scott Tsai <scottt.tw@gmail.com>
  102. * Wed May 25 2011 Rahul Sundaram <sundaram@fedoraproject.org> - 0.1.2-1
  103. - Initial spec. Based on openSUSE one