2017-12-20 18:51:39 +01:00
|
|
|
#
|
|
|
|
# spec file for package brotli
|
|
|
|
#
|
2018-03-05 20:31:03 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-12-20 18:51:39 +01:00
|
|
|
# Copyright (c) 2017 Buschmann <buschmann23@opensuse.org>
|
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
|
|
|
|
%define sover 1
|
2017-12-20 18:51:39 +01:00
|
|
|
|
|
|
|
Name: brotli
|
2018-06-29 23:50:45 +02:00
|
|
|
Version: 1.0.5
|
2017-12-20 18:51:39 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Lossless Compression Algorithm
|
2018-03-05 20:31:03 +01:00
|
|
|
License: MIT
|
2017-12-20 18:51:39 +01:00
|
|
|
Group: Productivity/Archiving/Compression
|
2018-03-05 20:31:03 +01:00
|
|
|
Url: https://github.com/google/brotli
|
2017-12-20 18:51:39 +01:00
|
|
|
Source0: https://github.com/google/brotli/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2018-07-25 15:33:43 +02:00
|
|
|
Source99: baselibs.conf
|
2017-12-20 18:51:39 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: cmake >= 2.8.6
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: gzip
|
2018-03-05 20:31:03 +01:00
|
|
|
BuildRequires: pkg-config
|
2017-12-20 18:51:39 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains the brotli command line utility to compress and decompress data with the brotli compression algorithm.
|
|
|
|
|
|
|
|
Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant
|
|
|
|
of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best
|
|
|
|
currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression.
|
|
|
|
|
|
|
|
The specification of the Brotli Compressed Data Format is defined in RFC 7932.
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%package -n libbrotlicommon%{sover}
|
|
|
|
Summary: Common Library for Brotli Compression
|
|
|
|
Group: System/Libraries
|
2017-12-20 18:51:39 +01:00
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%description -n libbrotlicommon%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
Common library for the Brotli general purpose lossless data compression algorithm.
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%package -n libbrotlidec%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
Summary: Library for Brotli Decompression
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%description -n libbrotlidec%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
Decompression library for the Brotli general purpose lossless data compression algorithm.
|
|
|
|
|
|
|
|
The specification of the Brotli Compressed Data Format is defined in RFC 7932.
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%package -n libbrotlienc%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
Summary: Library for Brotli Compression
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%description -n libbrotlienc%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
Compression library for the Brotli general purpose lossless data compression algorithm.
|
|
|
|
|
|
|
|
The specification of the Brotli Compressed Data Format is defined in RFC 7932.
|
|
|
|
|
2018-01-03 21:26:39 +01:00
|
|
|
%package -n libbrotli-devel
|
2017-12-20 18:51:39 +01:00
|
|
|
Summary: Development and Header Files for Brotli Compression
|
|
|
|
Group: Development/Libraries/C and C++
|
2018-05-02 08:05:53 +02:00
|
|
|
Requires: libbrotlicommon%{sover} = %{version}-%{release}
|
|
|
|
Requires: libbrotlidec%{sover} = %{version}-%{release}
|
2018-03-05 20:31:03 +01:00
|
|
|
Requires: libbrotlienc%{sover} = %{version}-%{release}
|
2018-01-03 21:26:39 +01:00
|
|
|
Provides: libbrotlicommon-devel = %version-%release
|
|
|
|
Provides: libbrotlidec-devel = %version-%release
|
|
|
|
Provides: libbrotlienc-devel = %version-%release
|
|
|
|
Obsoletes: libbrotlicommon-devel < %version-%release
|
|
|
|
Obsoletes: libbrotlidec-devel < %version-%release
|
|
|
|
Obsoletes: libbrotlienc-devel < %version-%release
|
2017-12-20 18:51:39 +01:00
|
|
|
|
2018-01-03 21:26:39 +01:00
|
|
|
%description -n libbrotli-devel
|
|
|
|
Development and headers files for (de)compressing data using the
|
|
|
|
Brotli general purpose lossless compression algorithm.
|
2017-12-20 18:51:39 +01:00
|
|
|
|
|
|
|
The specification of the Brotli Compressed Data Format is defined in RFC 7932.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
%cmake -DCMAKE_INSTALL_PREFIX:PATH="%{_prefix}" \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR:PATH="%{_libdir}" \
|
|
|
|
-DBROTLI_DISABLE_TESTS:BOOL=off \
|
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=off
|
2018-07-24 10:43:35 +02:00
|
|
|
%make_jobs
|
2017-12-20 18:51:39 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
|
|
|
rm %{buildroot}%{_libdir}/libbrotli*-static.a
|
|
|
|
%if 0%{?suse_version} > 1315
|
|
|
|
for i in docs/{brotli.1,decode.h.3,encode.h.3,types.h.3}; do
|
|
|
|
install -D -t %{buildroot}%{_datadir}/man/man$(echo $i | sed 's:.*\.\([^\.]\)$:\1:') $i
|
|
|
|
done
|
|
|
|
%else
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/man/man{1,3}
|
|
|
|
for i in docs/{brotli.1,decode.h.3,encode.h.3,types.h.3}; do
|
|
|
|
cp $i %{buildroot}%{_datadir}/man/man$(echo $i | sed 's:.*\.\([^\.]\)$:\1:')
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%check
|
2018-07-24 10:43:35 +02:00
|
|
|
%ctest
|
2017-12-20 18:51:39 +01:00
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%post -n libbrotlicommon%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n libbrotlicommon%{sover} -p /sbin/ldconfig
|
2017-12-20 18:51:39 +01:00
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%post -n libbrotlidec%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n libbrotlidec%{sover} -p /sbin/ldconfig
|
2017-12-20 18:51:39 +01:00
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%post -n libbrotlienc%{sover} -p /sbin/ldconfig
|
|
|
|
%postun -n libbrotlienc%{sover} -p /sbin/ldconfig
|
2017-12-20 18:51:39 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(0644,root,root,755)
|
|
|
|
%doc LICENSE
|
|
|
|
%attr(755,root,root) /usr/bin/brotli
|
|
|
|
%{_mandir}/man1/brotli.1%{ext_man}
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%files -n libbrotlicommon%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
%defattr(0644,root,root,755)
|
|
|
|
%{_libdir}/libbrotlicommon.so.*
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%files -n libbrotlidec%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
%defattr(0644,root,root,755)
|
|
|
|
%{_libdir}/libbrotlidec.so.*
|
|
|
|
|
2018-03-05 20:31:03 +01:00
|
|
|
%files -n libbrotlienc%{sover}
|
2017-12-20 18:51:39 +01:00
|
|
|
%defattr(0644,root,root,755)
|
|
|
|
%{_libdir}/libbrotlienc.so.*
|
|
|
|
|
2018-01-03 21:26:39 +01:00
|
|
|
%files -n libbrotli-devel
|
2017-12-20 18:51:39 +01:00
|
|
|
%defattr(0644,root,root,755)
|
2018-01-03 21:26:39 +01:00
|
|
|
%{_includedir}/brotli/
|
|
|
|
%{_libdir}/libbrotlicommon.so
|
|
|
|
%{_libdir}/libbrotlidec.so
|
2017-12-20 18:51:39 +01:00
|
|
|
%{_libdir}/libbrotlienc.so
|
2018-01-03 21:26:39 +01:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%{_mandir}/man3/*.3%{ext_man}
|
2017-12-20 18:51:39 +01:00
|
|
|
|
|
|
|
%changelog
|