File libbpg.spec of Package libbpg
#
# spec file for package libbpg
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
Name: libbpg
Version: 0.9.8
Release: 0
Summary: Library and tools for manipulating BPG image format files
License: LGPL-2.1-only AND BSD-3-Clause
Group: Productivity/Graphics/Convertors
URL: https://bellard.org/bpg/
Source0: https://bellard.org/bpg/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Dont_build_x265.patch
Patch0: Dont_build_x265.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libSDL-devel
BuildRequires: libSDL_image-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: yasm
ExclusiveArch: aarch64 ppc64 ppc64le x86_64
%description
BPG (Better Portable Graphics) is a image format whose purpose is to
replace the JPEG image format when quality or file size is an issue. Its
main advantages are:
* High compression ratio. Files are much smaller than JPEG for similar quality.
* Supported by most Web browsers with a small Javascript decoder.
* Based on a subset of the HEVC open video compression standard.
* Supports the same chroma formats as JPEG (grayscale, YCbCr 4:2:0, 4:2:2,
4:4:4) to reduce the losses during the conversion. An alpha channel is
supported. The RGB, YCgCo and CMYK color spaces are also supported.
* Native support of 8 to 14 bits per channel for a higher dynamic range.
* Lossless compression is supported.
* Various metadata (such as EXIF, ICC profile, XMP) can be included.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%autosetup -p1
# Remove the forbidden x265
rm -rf x265
%build
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{_bindir}
install -s -m755 bpgdec bpgenc %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_includedir}
install -m644 bpgenc.h libbpg.h %{buildroot}%{_includedir}
mkdir -p %{buildroot}%{_libdir}
install -s -m644 %{name}.a %{buildroot}%{_libdir}
%files
%doc README doc html post.js
%{_bindir}/bpgdec
%{_bindir}/bpgenc
%files devel
%{_includedir}/*
%{_libdir}/%{name}.a
%changelog