File libsap.spec of Package libsap

#
# spec file for package libsap
#
# Copyright (c) 2015 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 http://bugs.opensuse.org/
#


Name:           libsap
Version:        1.51.1
Release:        0
Summary:        Library for Playing Atari XL/XE Tunes
# See LICENSE file
License:        SUSE-Freeware
Group:          System/Libraries
Url:            http://kunik.republika.pl/sap/
Source:         libsap-1.51.1.tar.gz
Source1:        sapplay-0.2.tar.gz
Patch0:         libsap-1.51.1.dif
Patch1:         sapplay-0.2.dif
BuildRequires:  gcc-c++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
libSap is a Linux port of the SAP Library, a software emulation of the
6502 microprocessor and the Pokey chip. Those two chips are used in
Atari XL/XE computers. SAP Library is used to run programs written in
6502 machine language, programs that are using the Pokey chip to play
tunes and sounds.

This package also contains sapplay, a simple command line-based player.

%package devel
Summary:        Development files for libsap
Group:          Development/Libraries/C and C++
Requires:       libsap

%description devel
Contains header for developing applications unsing libsap.
libSap is a Linux port of the SAP Library, a software emulation of the
6502 microprocessor and the Pokey chip.

%package -n sapplay
Summary:        Plays Atari XL/XE tune files (files with .sap extension)
Group:          Applications/Multimedia

%description -n sapplay
Sapplay is a console based player. It plays Atari XL/XE tune files, files
which have .sap extension.
To play tunes it uses libsap which is a software emulation of CPU 6502
microprocessor and Pokey chip. Those two chips are used in Atari XL/XE
computers. Libsap runs porgrams written in 6502 machine language, programs
that use Pokey chip to play tunes and sounds.

%prep
%setup -q -a 1
%patch0
cd sapplay-0.2
%patch1

%build
make %{?_smp_mflags} dynamic OPTS="-fPIC %{optflags}"
make %{?_smp_mflags} -C sapplay-0.2 OPTS="%{optflags}"

%install
make install libdir=%{_libdir} DESTDIR=%{buildroot}
make -C sapplay-0.2 install MANDIR=%{_mandir} DESTDIR=%{buildroot}

%files
%defattr(-,root,root,-)
%doc LICENSE README
%{_libdir}/libsap.so

%files devel
%defattr(-,root,root)
%{_includedir}/libsap.h

%files -n sapplay
%defattr(-,root,root)
%{_bindir}/sapplay
%{_mandir}/man1/sapplay.1.gz

%changelog
openSUSE Build Service is sponsored by