Add the tool. OBS-URL: https://build.opensuse.org/request/show/258412 OBS-URL: https://build.opensuse.org/package/show/graphics/pngquant?expand=0&rev=1
64 lines
2.0 KiB
RPMSpec
64 lines
2.0 KiB
RPMSpec
#
|
|
# spec file for package pngquant
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: pngquant
|
|
Version: 2.3.1
|
|
Release: 0
|
|
Summary: Converts 24/32-bit RGBA PNGs to 8-bit palette with alpha channel preserved
|
|
License: BSD-2-Clause
|
|
Group: Development/Tools/Other
|
|
Url: http://pngquant.org/
|
|
Source: https://github.com/pornel/pngquant/archive/%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: liblcms2-devel
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: zlib-devel
|
|
|
|
%description
|
|
pngquant is a command-line utility and a library for lossy compression of PNG images.
|
|
|
|
The conversion reduces file sizes significantly (often as much as 70%) and
|
|
preserves full alpha transparency. Generated images are compatible with all
|
|
modern web browsers, and have better fallback in IE6 than 24-bit PNGs.
|
|
|
|
%prep
|
|
%setup -q -n %name-%version
|
|
|
|
%build
|
|
./configure --prefix=%prefix --enable-sse --with-openmp
|
|
|
|
CFLAGS="%optflags -msse2 -DUSE_SSE=1" \
|
|
CXXFLAGS="%optflags -msse2 -DUSE_SSE=1" \
|
|
%__make %{?_smp_mflags}
|
|
|
|
%install
|
|
%__mkdir -p %buildroot%_bindir %buildroot%_docdir/%name
|
|
|
|
install --mode 0755 --strip %name %buildroot%_bindir
|
|
install --mode 0644 CHANGELOG COPYRIGHT INSTALL README.md %buildroot%_docdir/%name
|
|
|
|
%clean
|
|
%__rm -rf %buildroot
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
%_bindir/*
|
|
%_docdir/*
|
|
|
|
%changelog
|