File brunsli.spec of Package brunsli
#
# spec file for package brunsli
#
# Copyright (c) 2020 SUSE LLC
#
# 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/
#
Name: brunsli
Version: 0.1
Release: 0
Summary: Lossless JPEG repacking library
License: MIT
Group: Productivity/Office/Other
URL: https://github.com/google/brunsli
# The release tarball is missing some git submodules (which are dropped in latest git),
# so keep _service file until next release
#Source: https://github.com/google/brunsli/archive/%{version}.tar.gz#/%{name}-%{version}.tar.xz
Source: %{name}-v%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
%description
Brunsli is a lossless JPEG repacking library.
Brunsli allows for a 22% decrease in file size while allowing the original
JPEG to be recovered byte-by-byte.
%package -n %{name}-libs
Summary: Lossless JPEG repacking library
%description -n %{name}-libs
Brunsli is a lossless JPEG repacking library.
Brunsli allows for a 22% decrease in file size while allowing the original
JPEG to be recovered byte-by-byte.
%package devel
Summary: Files for developing with Brunsli
Requires: %{name}-libs = %{version}
%description devel
Includes and definitions for developing with Brunsli
%prep
%autosetup -p1 -n %{name}-v%{version}
%build
%cmake -DCMAKE_C_FLAGS="-DBROTLI_ENCODER_CLEANUP_ON_OOM"
%make_build
%install
%cmake_install
%check
# No test found
%files devel
%license LICENSE
%doc README.md
%{_includedir}/%{name}
%files -n %{name}-libs
%{_libdir}/libbrunslienc-c.so
%{_libdir}/libbrunslidec-c.so
%changelog