From 38a09254c8cd8db76e28d7c000aa1966297c6a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 19 Apr 2017 11:22:11 +0100 Subject: [PATCH] Update pngquant to 2.9.1 Update Makefile to better handle build the shared libraries Remove libimagequant sub-package and use the new libimagequant package. --- pngquant-2.9.2-Makefile.patch | 18 +++++++----- pngquant.spec | 55 ++++------------------------------- 2 files changed, 16 insertions(+), 57 deletions(-) diff --git a/pngquant-2.9.2-Makefile.patch b/pngquant-2.9.2-Makefile.patch index f88777d..7b8e6f2 100644 --- a/pngquant-2.9.2-Makefile.patch +++ b/pngquant-2.9.2-Makefile.patch @@ -1,6 +1,8 @@ ---- ./Makefile.orig 2017-04-16 04:03:50.371539956 +0100 -+++ ./Makefile 2017-04-16 04:57:42.147558976 +0100 -@@ -24,38 +24,35 @@ TESTBIN = test/test +diff --git a/Makefile b/Makefile +index 50213fa..2874e80 100644 +--- a/Makefile ++++ b/Makefile +@@ -24,38 +24,34 @@ TESTBIN = test/test all: $(BIN) @@ -18,11 +20,11 @@ $(MAKE) -C lib static -sharedlib: lib/libimagequant.h -+$(SHAREDLIB): config.mk $(LIBDISTFILES) - $(MAKE) -C lib shared - --$(SHAREDLIB): config.mk sharedlib +- $(MAKE) -C lib shared - +-$(SHAREDLIB): config.mk sharedlib ++$(SHAREDLIB): config.mk + $(OBJS): $(wildcard *.h) config.mk rwpng_cocoa.o: rwpng_cocoa.m @@ -51,7 +53,7 @@ dist: $(TARFILE) -@@ -94,5 +91,5 @@ endif +@@ -94,5 +90,5 @@ endif lib/libimagequant.h: git submodule init && git submodule update || true diff --git a/pngquant.spec b/pngquant.spec index 01e26ee..3614618 100644 --- a/pngquant.spec +++ b/pngquant.spec @@ -12,12 +12,12 @@ License: GPLv3+ URL: http://%{name}.org Source0: https://github.com/pornel/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Source1: https://github.com/ImageOptim/libimagequant/archive/%{version}/%{libname}-%{version}.tar.gz Patch1: pngquant-2.9.2-Makefile.patch BuildRequires: libpng-devel >= 1.2.46-1 BuildRequires: zlib-devel >= 1.2.3-1 BuildRequires: lcms2-devel +BuildRequires: %{libname}-devel >= %{version}-%{release} Requires: libpng%{?_isa} >= 1.2.46-1 Requires: zlib%{?_isa} >= 1.2.3-1 Requires: %{libname}%{?_isa} = %{version}-%{release} @@ -31,33 +31,10 @@ Internet Explorer 6. Quantized files are often 40-70 percent smaller than their 24/32-bit version. %{name} uses the median cut algorithm. -%package -n %{libname} -Summary: Small, portable C lib for HQ conversion of RGBA to 8-bit indexed-color - - -%description -n %{libname} -%{libname} converts 24/32-bit RGBA PNG images to 8-bit palette with alpha -channel preserved. Such images are compatible with all modern web browsers and -a compatibility setting is available to help transparency degrade well in -Internet Explorer 6. Quantized files are often 40-70 percent smaller than -their 24/32-bit version. %{libname} uses the median cut algorithm. - - -%package -n %{libname}-devel -Summary: Development files for %{libname} -Requires: %{libname}%{?_isa} = %{version}-%{release} - - -%description -n %{libname}-devel -This package contains files for development with %{libname}. -There is also some brief API-documentation. - - %prep -%setup -q -a1 -rmdir lib/ -mv %{libname}-%{version} lib -#rm lib/configure +%setup -q +ln -s /usr/include/libimagequant.h lib/ +ln -s %{_libdir}/libimagequant.so lib %patch1 -p1 @@ -72,42 +49,22 @@ mv %{libname}-%{version} lib mkdir -p %{buildroot}%{_includedir}/imagequant \ %{buildroot}%{_libdir} -# install libimagequant -install -pm 0755 lib/%{libname}.so.0 \ - %{buildroot}%{_libdir} -ln -fs %{libname}.so.0 %{buildroot}%{_libdir}/%{libname}.so - -install -pm 0644 lib/*.h \ - %{buildroot}%{_includedir}/imagequant - %check make test SHARED=1 -%post -n %{libname} -p /sbin/ldconfig -%postun -n %{libname} -p /sbin/ldconfig - - %files %doc README.md CHANGELOG %license COPYRIGHT %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* -%files -n %{libname} -%license lib/COPYRIGHT -%{_libdir}/%{libname}.so.* - -%files -n %{libname}-devel -%doc lib/README.md -%{_includedir}/imagequant -%{_libdir}/%{libname}.so - %changelog -* Sun Apr 16 2017 Sérgio Basto - 2.9.1-1 +* Wed Apr 19 2017 Sérgio Basto - 2.9.1-2 - Update pngquant to 2.9.1 - Update Makefile to better handle build the shared libraries +- Remove libimagequant sub-package and use the new libimagequant package. * Sat Feb 11 2017 Fedora Release Engineering - 2.8.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild