File suil.spec of Package suil

#
# spec file for package suil
#
# 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/
#


%define _description \
Suil is a lightweight C library for loading and wrapping LV2 plugin UIs.\
\
Suil makes it possible to load a UI of any toolkit in a host using any\
other toolkit (assuming the toolkits are both supported by Suil).\
Hosts do not need to build against or link to foreign toolkit libraries\
to use UIs written with that toolkit (Suil performs its magic at\
runtime using dynamically loaded modules). The API is designed such that\
hosts do not need to explicitly support particular toolkits whatsoever.\
If Suil supports a particular toolkit, then all hosts that use Suil will\
support that toolkit.

Name:           suil
Version:        0.8.2
Release:        0
Summary:        Lightweight C library for loading and wrapping LV2 plugin UIs
License:        ISC
Group:          System/Libraries
Url:            http://drobilla.net/software/suil/
Source:         http://download.drobilla.net/suil-%{version}.tar.bz2
BuildRequires:  gcc-c++
BuildRequires:  gtk2-devel
BuildRequires:  libqt4-devel
BuildRequires:  lv2-devel
BuildRequires:  pkgconfig
BuildRequires:  python
BuildRequires:  python-rdflib

%description
%{_description}

%package -n libsuil-0-0
Summary:        Lightweight C library for loading and wrapping LV2 plugin UIs
Requires:       suil-plugins

%description -n libsuil-0-0
%{_description}

%files -n libsuil-0-0
%defattr(-,root,root,-)
%doc COPYING README
%{_libdir}/libsuil-0.so.*


####################################

%package devel
Summary:        Development files for the suil library
Group:          Development/Libraries/C and C++
Requires:       libsuil-0-0 == %{version}
Requires:       pkgconfig

%description devel
Development files needed to build applications against suil library.

%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/suil-0/
%dir %{_includedir}/suil-0/suil
%{_libdir}/libsuil-0.so
%{_includedir}/suil-0/suil/*.h
%{_libdir}/pkgconfig/suil-0.pc


####################################

%package plugins
Summary:        Shared object for GTK2/Qt4 hosts displaying Qt4/GTK2/X11 LV2 GUIs
Group:          System/Libraries
Requires:       libsuil-0-0 == %{version}
# Requires:       libqt4
# Requires:       libqt4-devel
# Requires:       python-devel
Requires:       gtk2-tools
Requires:       python-qt4
Obsoletes:      libsuil-x11-in-gtk2 <= %{version}
Obsoletes:      libsuil-x11-in-qt4 <= %{version}
Obsoletes:      libsuil-gtk2-in-qt4 <= %{version}
Obsoletes:      libsuil-qt4-in-gtk2 <= %{version}
Provides:       libsuil-x11-in-gtk2 = %{version}
Provides:       libsuil-x11-in-qt4 = %{version}
Provides:       libsuil-gtk2-in-qt4 = %{version}
Provides:       libsuil-qt4-in-gtk2 = %{version}

%description plugins
Module plugins for:
* GTK2 hosts displaying Qt4 LV2 GUIs using suil
* Qt4 hosts displaying GTK2 LV2 GUIs usnig suil
* GTK2 hosts displaying X11 LV2 GUIs using suil
* Qt4 hosts displaying x11 LV2 GUIs using suil

%files plugins
%defattr(-,root,root,-)
%dir %{_libdir}/suil-0/
%{_libdir}/suil-0/libsuil_qt4_in_gtk2.so
%{_libdir}/suil-0/libsuil_gtk2_in_qt4.so
%{_libdir}/suil-0/libsuil_x11_in_gtk2.so
%{_libdir}/suil-0/libsuil_x11_in_qt4.so

####################################

%prep
%setup -q

%build
./waf configure --prefix=%{_prefix} --libdir=%{_libdir} \
--lv2dir=%{_libdir}/lv2
./waf

%install
./waf install --destdir=%{buildroot}

%post -n libsuil-0-0 -p /sbin/ldconfig

%postun -n libsuil-0-0 -p /sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by