File zopfli.spec of Package zopfli
#
# spec file for package zopfli
#
# Copyright (c) 2015 SUSE LINUX 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: zopfli
Version: 1.0.0
Release: 0
Summary: Zlib compression library
License: Apache-2.0
Group: Productivity/Archiving/Compression
Url: https://github.com/google/zopfli
Source: https://github.com/google/zopfli/archive/zopfli-%{version}.tar.gz
BuildRequires: help2man
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Zopfli Compression Algorithm is a compression library programmed in C to perform
very good, but slow, deflate or zlib compression.
The basic function to compress data is ZopfliCompress in zopfli.h. Use the
ZopfliOptions object to set parameters that affect the speed and compression.
Use the ZopfliInitOptions function to place the default values in the
ZopfliOptions first.
%prep
%setup -q -n %{name}-%{name}-%{version}
%build
# do not use provided makefile as it hardcodes CFLAGS
cc src/zopfli/*.c %{optflags} -O2 -W -Wall -Wextra -ansi -pedantic -lm -o %{name}
help2man -h "h" -v "" -no-info --no-discard-stderr ./%{name} > %{name}.1
%install
install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
install -D -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
%files
%defattr(-,root,root)
%doc README COPYING
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.gz
%changelog