optipng/optipng.spec

62 lines
1.4 KiB
RPMSpec
Raw Normal View History

2021-05-19 10:04:11 +08:00
Name: optipng
Version: 0.7.7
2021-05-19 10:04:11 +08:00
Release: 1
Summary: PNG optimizer and converter
License: zlib
URL: http://optipng.sourceforge.net/
Source0: http://downloads.sourceforge.net/optipng/%{name}-%{version}.tar.gz
BuildRequires: gcc
2021-05-19 10:04:11 +08:00
BuildRequires: zlib-devel libpng-devel
%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 and TIFF) to optimized PNG, and performs PNG integrity checks
and corrections.
%prep
%setup -q
for f in AUTHORS.txt doc/history.txt ; do
iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
done
2021-05-19 10:04:11 +08:00
# Ensure system libs and headers are used; as of 0.6.3 pngxtern will use
# the bundled headers if present even with -with-system-*, causing failures.
rm -rf src/libpng src/zlib
%build
%set_build_flags
2021-05-19 10:04:11 +08:00
./configure -prefix=%{_prefix} -mandir=%{_mandir} \
-with-system-zlib -with-system-libpng
%make_build
2021-05-19 10:04:11 +08:00
%install
rm -rf $RPM_BUILD_ROOT
%make_install
2021-05-19 10:04:11 +08:00
chmod -c 755 $RPM_BUILD_ROOT%{_bindir}/optipng
%check
%__make test
2021-05-19 10:04:11 +08:00
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE.txt
%doc AUTHORS.txt README.txt doc/*
2021-05-19 10:04:11 +08:00
%{_bindir}/optipng
%{_mandir}/man1/optipng.1*
%changelog
* Tue Jun 8 2021 wutao <wutao61@huawei.com> - 0.7.7-1
- upgrade to 0.7.7 to fix CVE-2016-3981 CVE-2016-3982
* Thu May 06 2021 wulei <wulei80@huawei.com> 0.7.4 - 1
- Initial package