File libsixel.spec of Package libsixel

#
# spec file for package libsixel
#
# Copyright (c) 2021 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 1
Name:           libsixel
Version:        1.8.6
Release:        0
Summary:        Sixel encoding and decoding
License:        MIT
URL:            https://github.com/saitoha/libsixel
Source:         https://github.com/saitoha/libsixel/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libpng)

%description
An encoder/decoder implementation for DEC SIXEL graphics.

%package -n %{name}%{sover}
Summary:        A library for encoding/decoding DEC SIXEL graphics
Group:          Development/Libraries/C and C++

%description -n %{name}%{sover}
A library for encoding/decoding DEC SIXEL graphics.

%package -n sixel-devel
Summary:        Development files for %{name}
Requires:       %{name}%{sover} = %{version}

%description -n sixel-devel
This subpackage contains libraries and header files for developing
applications that want to make use of the libsixel library.

%package -n sixel-utils
Summary:        Utilities from the libsixel project

%description -n sixel-utils
Utilities from the libsixel project.

%prep
%setup -q

%build
%configure --disable-python --disable-static
%make_build

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%post -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{sover} -p /sbin/ldconfig

%files -n %{name}%{sover}
%license LICENSE*
%doc ChangeLog README.md
%{_libdir}/libsixel.so.%{sover}*
%{_mandir}/man5/*.5%{?ext_man}

%files -n sixel-devel
%{_includedir}/sixel.h
%{_libdir}/libsixel.so
%{_libdir}/pkgconfig/libsixel.pc
%{_bindir}/libsixel-config

%files -n sixel-utils
%{_bindir}/img2sixel
%{_bindir}/sixel2png
%{_mandir}/man1/*.1%{?ext_man}
%{_datadir}/bash-completion/*
%dir %{_datadir}/zsh/
%{_datadir}/zsh/*

%changelog
openSUSE Build Service is sponsored by