summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--libwebp.spec85
2 files changed, 71 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 1e65467..91b0fd5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
SRCDIR := $(shell pwd)
NAME := $(shell basename $(SRCDIR))
-include ../common/Makefile
+include ../../common/Makefile
diff --git a/libwebp.spec b/libwebp.spec
index 1e6545f..2017efb 100644
--- a/libwebp.spec
+++ b/libwebp.spec
@@ -1,22 +1,43 @@
+# remirepo spec file for libwebp5
+# renamed for parallel installation, from:
+#
+# Fedora spec file for libwebp
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
%global _hardened_build 1
+%global libname libwebp
+%global soname 5
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%global with_java 1
+%else
+%global with_java 0
+%endif
-Name: libwebp
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Name: %{libname}
+%else
+Name: %{libname}%{soname}
+%endif
Version: 1.0.2
-Release: 2%{?dist}
+Release: 1%{?dist}
URL: http://webmproject.org/
Summary: Library and tools for the WebP graphics format
# Additional IPR is licensed as well. See PATENTS file for details
License: BSD
-Source0: http://downloads.webmproject.org/releases/webp/%{name}-%{version}.tar.gz
+Source0: http://downloads.webmproject.org/releases/webp/%{libname}-%{version}.tar.gz
Source1: libwebp_jni_example.java
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: giflib-devel
BuildRequires: libtiff-devel
+%if %{with_java}
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: swig
+%endif
BuildRequires: autoconf automake libtool
BuildRequires: freeglut-devel
@@ -26,10 +47,19 @@ photographic images. WebP consists of a codec based on VP8, and a
container based on RIFF. Webmasters, web developers and browser
developers can use WebP to compress, archive and distribute digital
images more efficiently.
+%if "%{name}" != "%{libname}"
+%{name} is designed to be installed beside %{libname}.
+%endif
%package tools
Summary: The WebP command line tools
+%if "%{name}" != "%{libname}"
+Conflicts: %{libname}-tools < %{version}
+Provides: %{libname}-tools = %{version}-%{release}
+%else
+Obsoletes: %{libname}%{soname}-tools <= %{version}
+%endif
%description tools
WebP is an image format that does lossy compression of digital
@@ -42,6 +72,12 @@ images more efficiently.
%package devel
Summary: Development files for libwebp, a library for the WebP format
Requires: %{name}%{?_isa} = %{version}-%{release}
+%if "%{name}" != "%{libname}"
+Conflicts: %{libname}-devel < %{version}
+Provides: %{libname}-devel = %{version}-%{release}
+%else
+Obsoletes: %{libname}%{soname}-devel <= %{version}
+%endif
%description devel
WebP is an image format that does lossy compression of digital
@@ -51,18 +87,26 @@ developers can use WebP to compress, archive and distribute digital
images more efficiently.
+%if %{with_java}
%package java
Summary: Java bindings for libwebp, a library for the WebP format
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: java-headless
Requires: jpackage-utils
+%if "%{name}" != "%{libname}"
+Conflicts: %{libname}-java < %{version}
+Provides: %{libname}-java = %{version}-%{release}
+%else
+Obsoletes: %{libname}%{soname}-java <= %{version}
+%endif
%description java
Java bindings for libwebp.
+%endif
%prep
-%autosetup -p1
+%setup -q -n %{libname}-%{version}
%build
@@ -75,8 +119,9 @@ export CFLAGS="%{optflags} -frename-registers"
%configure --disable-static --enable-libwebpmux \
--enable-libwebpdemux --enable-libwebpdecoder \
--disable-neon
-%make_build V=1
+make %{?_smp_mflags}
+%if %{with_java}
# swig generated Java bindings
cp %{SOURCE1} .
cd swig
@@ -97,18 +142,24 @@ gcc %{__global_ldflags} %{optflags} -shared \
cd java
javac com/google/webp/libwebp.java
jar cvf ../libwebp.jar com/google/webp/*.class
+%endif
%install
-%make_install
+make install DESTDIR=%{buildroot} INSTALL='install -p'
find "%{buildroot}/%{_libdir}" -type f -name "*.la" -delete
+%if %{with_java}
# swig generated Java bindings
mkdir -p %{buildroot}/%{_libdir}/%{name}-java
cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
+%endif
-%ldconfig_scriptlets
+%if 0%{?fedora} < 28 && 0%{?rhel} < 8
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+%endif
%files tools
@@ -123,25 +174,29 @@ cp swig/*.jar swig/*.so %{buildroot}/%{_libdir}/%{name}-java/
%files -n %{name}
%doc README PATENTS NEWS AUTHORS
+%{!?_licensedir:%global license %%doc}
%license COPYING
-%{_libdir}/%{name}.so.7*
-%{_libdir}/%{name}decoder.so.3*
-%{_libdir}/%{name}demux.so.2*
-%{_libdir}/%{name}mux.so.3*
+%{_libdir}/%{libname}.so.7*
+%{_libdir}/%{libname}decoder.so.3*
+%{_libdir}/%{libname}demux.so.2*
+%{_libdir}/%{libname}mux.so.3*
%files devel
-%{_libdir}/%{name}*.so
+%{_libdir}/%{libname}*.so
%{_includedir}/*
%{_libdir}/pkgconfig/*
+%if %{with_java}
%files java
%doc libwebp_jni_example.java
-%{_libdir}/%{name}-java/
+%{_libdir}/%{libname}-java/
+%endif
%changelog
-* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+* Mon Mar 11 2019 Remi Collet <remi@remirepo.net> - 1.0.2-1
+- rename to libwebp5 to allow parallel installation on EL
+- drop java subpackage on EL
* Tue Jan 22 2019 Sandro Mani <manisandro@gmail.com> - 1.0.2-1
- Update to 1.0.2