File wildmidi.spec of Package wildmidi

#
# spec file for package wildmidi
#
# Copyright (c) 2007-2016 Hans de Goede <j.w.r.degoede@hhs.nl>
# Copyright (c) 2016 Pauline Emily <vilene@posteo.net>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# 
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Name:           wildmidi
%define soname  libWildMidi2
Version:        0.4.3
Release:        0
Summary:        Softsynth midi player

Group:          Productivity/Multimedia/Sound/Midi
License:        GPL-3.0+
URL:            http://www.mindwerks.net/projects/wildmidi
Source:         %{name}-%{name}-%{version}.tar.gz
Source1:        %{name}.cfg
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  cmake
BuildRequires:  dos2unix
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(openal)
Requires:       %{soname} = %{version}-%{release}

%description
WildMidi is a software midi player which has a core softsynth library that can
be used with other applications.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
License:        LGPL-3.0+
Requires:       %{soname} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package -n     %{soname}
Summary:        WildMidi Midi Wavetable Synth Lib
Group:          System/Libraries
License:        LGPL-3.0+
Requires:       timidity

%description -n %{soname}
This package contains the WildMidi core softsynth library. The library is
designed to process a midi file and stream out the stereo audio data
through a buffer which an external program can then process further.

%prep
%setup -q -n %{name}-%{name}-%{version}
dos2unix -c ascii COPYING

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install

install -d %{buildroot}%{_sysconfdir}/wildmidi
install -m 644 %{S:1} %{buildroot}%{_sysconfdir}/wildmidi

%post -n %{soname} -p /sbin/ldconfig

%postun -n %{soname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING README.md docs/license/GPLv3.txt
%doc %{_mandir}/man1/*
%{_bindir}/%{name}

%files devel
%defattr(-,root,root)
%doc %{_mandir}/man3/*
%{_includedir}/*
%{_libdir}/libWildMidi.so
%{_libdir}/pkgconfig/wildmidi.pc

%files -n %{soname}
%defattr(-,root,root)
%doc docs/license/LGPLv3.txt
%doc %{_mandir}/man5/*
%{_libdir}/libWildMidi.so.*
%config(noreplace) %{_sysconfdir}/wildmidi

%changelog
openSUSE Build Service is sponsored by