File FLIF.spec of Package FLIF

#
# spec file for package FLIF
#
# Copyright (c) 2024 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/
#


%define  sover  0
Name:           FLIF
Version:        0.4
Release:        0
Summary:        Free Lossless Image Format
License:        Apache-2.0 AND LGPL-3.0-or-later AND GPL-3.0-or-later
Group:          Productivity/Graphics/Convertors
URL:            https://flif.info/
Source0:        https://github.com/FLIF-hub/FLIF/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source99:       %{name}-rpmlintrc
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(tslib)
Requires(post): shared-mime-info
Requires(postun): shared-mime-info
Recommends:     exiv2

%description
FLIF is a lossless image format which outperforms PNG, lossless WebP,
lossless BPG and lossless JPEG2000 in terms of compression ratio.

%package        devel
Summary:        Development files for %{name}
License:        Apache-2.0 AND LGPL-3.0-or-later AND GPL-3.0-or-later
Group:          Development/Libraries/C and C++
Requires:       libflif%{sover} = %{version}-%{release}
Requires:       libflif_dec%{sover} = %{version}-%{release}

%description    devel
These development headers are required if you plan on coding against %{name}.

%package        -n libflif%{sover}
Summary:        Free Lossless Image Format encoder library
License:        LGPL-3.0-or-later AND Apache-2.0
Group:          System/Libraries

%description    -n libflif%{sover}
FLIF is a lossless image format which outperforms PNG, lossless WebP,
lossless BPG and lossless JPEG2000 in terms of compression ratio.

%package        -n libflif_dec%{sover}
Summary:        Free Lossless Image Format decoder library
License:        LGPL-3.0-or-later AND Apache-2.0
Group:          System/Libraries

%description    -n libflif_dec%{sover}
FLIF is a lossless image format which outperforms PNG, lossless WebP,
lossless BPG and lossless JPEG2000 in terms of compression ratio.

%prep
%autosetup -p1
sed -i '/DESTINATION lib/s/lib/${CMAKE_INSTALL_LIBDIR}/' src/CMakeLists.txt

%build
pushd src/
%cmake
%cmake_build
popd

%install
pushd src/
%cmake_install
popd

%ldconfig_scriptlets -n libflif%{sover}
%ldconfig_scriptlets -n libflif_dec%{sover}

%files
%license LICENSE LICENSE_Apache2 LICENSE_LGPL LICENSE_GPL FLIF-CLA-template.txt
%doc CONTRIBUTING.md README.md
%{_bindir}/flif
%{_bindir}/dflif
%{_bindir}/apng2flif
%{_bindir}/gif2flif
%{_bindir}/viewflif
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/flif.magic
%{_datadir}/mime/packages/flif-mime.xml
%{_mandir}/man1/flif.1%{?ext_man}

%files devel
%{_includedir}/flif.h
%{_includedir}/flif_common.h
%{_includedir}/flif_dec.h
%{_includedir}/flif_enc.h
%{_libdir}/libflif.so
%{_libdir}/libflif_dec.so

%files -n libflif%{sover}
%{_libdir}/libflif.so.%{sover}

%files -n libflif_dec%{sover}
%{_libdir}/libflif_dec.so.%{sover}

%changelog
openSUSE Build Service is sponsored by