File libspectrum.spec of Package libspectrum

#
# spec file for package libspectrum
#
# 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 _soname 9
Name:           libspectrum
Version:        1.5.0
Release:        0
Summary:        Library for reading and writing ZX Spectrum disk/tape images and snapshots
License:        GPL-2.0-or-later
Group:          System/Emulators/Other
URL:            https://sourceforge.net/projects/fuse-emulator/files/libspectrum/
Source:         %{name}-%{version}.tar.gz
BuildRequires:  glib2-devel
BuildRequires:  libbz2-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libtool
BuildRequires:  zlib-devel
%if 0%{?undefined rhel_version}
BuildRequires:  audiofile-devel
%endif

%description
Libspectrum is a library designed to make the input and output of some
ZX Spectrum emulator files slightly easier. It is intended to be usable
on Unix variants, Win32 and Mac OS X. Currently, it is mainly used by
Fuse, but other Spectrum emulator and utility authors are encouraged to
use it.

%package -n libspectrum%{_soname}
Summary:        Library for reading and writing ZX Spectrum disk/tape images and snapshots
Group:          System/Emulators/Other

%description -n libspectrum%{_soname}
Libspectrum is a library designed to make the input and output of some
ZX Spectrum emulator files slightly easier. It is intended to be usable
on Unix variants, Win32 and Mac OS X. Currently, it is mainly used by
Fuse, but other Spectrum emulator and utility authors are encouraged to
use it.

%package devel
Summary:        Development files for libspectrum
Group:          Development/Libraries/C and C++
Requires:       libspectrum%{_soname} = %{version}

%description devel
Libspectrum is a library designed to make the input and output of some
ZX Spectrum emulator files slightly easier. It is intended to be usable
on Unix variants, Win32 and Mac OS X. Currently, it is mainly used by
Fuse, but other Spectrum emulator and utility authors are encouraged to
use it.

%prep
%setup -q -n libspectrum-%{version}

%build
%configure \
    --disable-static
make %{?_smp_mflags}

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

%post -n libspectrum%{_soname} -p /sbin/ldconfig
%postun -n libspectrum%{_soname} -p /sbin/ldconfig

%files -n libspectrum%{_soname}
%license COPYING
%{_libdir}/libspectrum.so.*
%{_mandir}/man3/libspectrum.3%{?ext_man}

%files devel
%doc AUTHORS
%doc ChangeLog
%doc README
%doc THANKS
%doc doc/libspectrum.txt
%{_includedir}/libspectrum.h
%{_libdir}/libspectrum.so
%{_libdir}/pkgconfig/libspectrum.pc

%changelog
openSUSE Build Service is sponsored by