File sndio.spec of Package sndio

#
# spec file for package sndio
#
# Copyright (c) 2016 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:           sndio
Version:        1.0.1
Release:        0
Summary:        Small audio and MIDI framework
License:        ISC
Group:          Productivity/Multimedia/Sound/Midi
Url:            http://www.sndio.org/
Source:         http://www.sndio.org/sndio-%{version}.tar.gz
BuildRequires:  pkgconfig(alsa)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
It provides an lightweight audio & MIDI server and a fully documented
user-space API to access either the server or directly the hardware in
a uniform way. Sndio is designed to work for desktop applications, but
pays special attention to synchronization mechanisms and reliability
required by music applications. Reliability through simplicity are part
of the project goals.

%package -n libsndio6_0
Summary:        Small audio and MIDI framework
Group:          System/Libraries

%description -n libsndio6_0
It provides an lightweight audio & MIDI server and a fully documented
user-space API to access either the server or directly the hardware in
a uniform way. Sndio is designed to work for desktop applications, but
pays special attention to synchronization mechanisms and reliability
required by music applications. Reliability through simplicity are part
of the project goals.

%package -n sndio-devel
Summary:        Library Developer Files for sndio
Group:          Development/Libraries/C and C++
Requires:       libsndio6_0 = %{version}

%description -n sndio-devel
This package contains files needed for development with the sndio
library.

%prep
%setup -q

%build
export CFLAGS="%{optflags}"
# not autotools configure
./configure --prefix=%{_prefix} --libdir=%{_libdir} --enable-alsa
make %{?_smp_mflags}

%install
%make_install

%post   -n libsndio6_0 -p /sbin/ldconfig
%postun -n libsndio6_0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/aucat
%{_bindir}/midicat
%{_bindir}/sndiod
%{_mandir}/man1/aucat.1%{ext_man}
%{_mandir}/man1/midicat.1%{ext_man}
%{_mandir}/man1/sndiod.1%{ext_man}
%{_mandir}/man7/sndio.7%{ext_man}

%files -n libsndio6_0
%defattr(-,root,root)
%{_libdir}/libsndio.so.6.0

%files -n sndio-devel
%defattr(-,root,root)
%{_includedir}/sndio.h
%{_libdir}/libsndio.so
%{_mandir}/man3/*.3%{ext_man}

%changelog
openSUSE Build Service is sponsored by