optipng/optipng.spec

62 lines
1.4 KiB
RPMSpec
Raw Normal View History

2021-05-18 16:57:25 +08:00
Name: optipng
2021-06-08 14:58:39 +08:00
Version: 0.7.7
2021-05-18 16:57:25 +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
2021-06-08 14:58:39 +08:00
BuildRequires: gcc
2021-05-18 16:57:25 +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
2021-06-08 14:58:39 +08:00
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-18 16:57:25 +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
2021-06-08 14:58:39 +08:00
%set_build_flags
2021-05-18 16:57:25 +08:00
./configure -prefix=%{_prefix} -mandir=%{_mandir} \
-with-system-zlib -with-system-libpng
2021-06-08 14:58:39 +08:00
%make_build
2021-05-18 16:57:25 +08:00
%install
rm -rf $RPM_BUILD_ROOT
2021-06-08 14:58:39 +08:00
%make_install
2021-05-18 16:57:25 +08:00
chmod -c 755 $RPM_BUILD_ROOT%{_bindir}/optipng
%check
2021-06-08 14:58:39 +08:00
%__make test
2021-05-18 16:57:25 +08:00
%files
2021-06-08 14:58:39 +08:00
%{!?_licensedir:%global license %%doc}
%license LICENSE.txt
%doc AUTHORS.txt README.txt doc/*
2021-05-18 16:57:25 +08:00
%{_bindir}/optipng
%{_mandir}/man1/optipng.1*
%changelog
2021-06-08 14:58:39 +08:00
* 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