OBS-URL: https://build.opensuse.org/package/show/graphics/optipng?expand=0&rev=44
72 lines
2.0 KiB
RPMSpec
72 lines
2.0 KiB
RPMSpec
#
|
|
# spec file for package optipng
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define asan_build 0
|
|
Name: optipng
|
|
Version: 7.9.1
|
|
Release: 0
|
|
Summary: A PNG File Compressor
|
|
License: Zlib
|
|
Group: Productivity/Archiving/Compression
|
|
URL: https://optipng.sourceforge.net/
|
|
Source0: https://downloads.sourceforge.net/project/optipng/OptiPNG/optipng-%{version}/optipng-%{version}.tar.gz
|
|
BuildRequires: libpng-devel >= 1.6.35
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: pkgconfig(zlib) >= 1.2.8
|
|
|
|
%description
|
|
OptiPNG is a PNG optimizer that recompresses image files to a smaller
|
|
size, without losing any information. This program also converts
|
|
external formats (BMP, GIF, PNM; TIFF support is coming up) to
|
|
optimized PNG, and performs PNG integrity checks and corrections.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
# not autotools generated configure
|
|
export CFLAGS="%{optflags}"
|
|
%if %{asan_build}
|
|
CFLAGS="$CFLAGS -fsanitize=address"
|
|
%endif
|
|
./configure \
|
|
-with-system-zlib \
|
|
-with-system-libpng \
|
|
-prefix=%{_prefix} \
|
|
-mandir=%{_mandir}
|
|
|
|
#don't strip binaries
|
|
sed -i "s:\(LDFLAGS = \)-s:\1:" src/optipng/Makefile
|
|
%if %{asan_build}
|
|
sed -i 's:\(ALL_LIBS = \)\(.*\):\1-lasan \2:' src/optipng/Makefile
|
|
%endif
|
|
%make_build
|
|
|
|
%install
|
|
%make_install
|
|
|
|
%check
|
|
%make_build check
|
|
|
|
%files
|
|
%doc README.md doc
|
|
%{_bindir}/optipng
|
|
%{_mandir}/man1/optipng.1%{?ext_man}
|
|
|
|
%changelog
|