SHA256
1
0
forked from pool/lilv
lilv/lilv.spec
Dave Plater f0064adc23 Accepting request 454006 from home:jengelh:branches:multimedia:libs
- Rename soname to sover to better reflect its use
- Update descriptions/ensure neutral POV
- Since there is no %pre section, replace questionable
  Requires(pre) by Requires.

OBS-URL: https://build.opensuse.org/request/show/454006
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/lilv?expand=0&rev=25
2017-02-02 04:47:12 +00:00

138 lines
4.2 KiB
RPMSpec

#
# spec file for package lilv
#
# Copyright (c) 2017 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 sover 0
%define sordversion %(pkg-config --modversion sord-0)
Name: lilv
Version: 0.22.0
Release: 0
Summary: C library to make use of LV2 plugins
License: ISC
Group: Development/Libraries/C and C++
Url: http://drobilla.net/software/lilv/
Source0: http://download.drobilla.net/lilv-%{version}.tar.bz2
Source98: baselibs.conf
Source99: lilv-rpmlintrc
# Patch backported from v 0.22.1 http://dev.drobilla.net/changeset/5759
Patch0: lilv-python-bindings-fix.diff
# lilv 0.22 require new API of sord 0.13
# Since sord sover unchanged from 0.12, explicitly require here.
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: graphviz
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRequires: python-numpy-devel
BuildRequires: swig
BuildRequires: pkgconfig(lv2) >= 1.8.0
BuildRequires: pkgconfig(serd-0) >= 0.14.0
BuildRequires: pkgconfig(sord-0) >= 0.13
BuildRequires: pkgconfig(sratom-0) >= 0.4.0
Requires(pre): liblilv-0-%{sover} = %{version}
%description
Lilv is a C library to make use of LV2 plugins in applications.
%package -n liblilv-0-%{sover}
Summary: C library to make use of LV2 plugins
# NOTE: This is the only way to ensure that the correct version of sord is installed.
Group: System/Libraries
Requires: libsord-0-0 = %{sordversion}
%description -n liblilv-0-%{sover}
Lilv is a C library to make use of LV2 plugins in applications.
%package -n liblilv-0-devel
Summary: Development files for liblilv
Group: Development/Libraries/C and C++
Requires: liblilv-0-%{sover} = %{version}
%description -n liblilv-0-devel
Lilv is a C library to make use of LV2 plugins in applications.
This subpackage contains the development files for liblilv.
%package -n python-lilv
Summary: Python bindings for lilv
Group: Development/Libraries/Python
%description -n python-lilv
Lilv is a C library to make use of LV2 plugins in applications.
This subpackage contains the Python bindings for lilv.
%prep
%setup -q
%patch0 -p1
echo %{sordversion}
%build
# TODO: The numpy path here is a hack. Check how to properly fix it.
export CFLAGS='%{optflags} -I%{python_sitearch}/numpy/core/include/'
export CXXFLAGS='%{optflags} -I%{python_sitearch}/numpy/core/include/'
./waf configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--docdir=%{_defaultdocdir} \
--configdir=%{_sysconfdir} \
--bindings \
--docs
# waf only understands -j, so do not use smp_mflags
./waf build -v %{?jobs:-j%jobs}
%install
./waf install --destdir=%{?buildroot}
if [ %{python_sitelib} != %{python_sitearch} ]; then
mv %{buildroot}%{python_sitelib}/lilv.py %{buildroot}%{python_sitearch}/
fi
%post -n liblilv-0-%{sover} -p /sbin/ldconfig
%postun -n liblilv-0-%{sover} -p /sbin/ldconfig
%files
%defattr(0644,root,root,0755)
%attr(0755,-,-) %{_bindir}/lilv-bench
%attr(0755,-,-) %{_bindir}/lv2bench
%attr(0755,-,-) %{_bindir}/lv2info
%attr(0755,-,-) %{_bindir}/lv2ls
%{_mandir}/man1/lv2info.1*
%{_mandir}/man1/lv2ls.1*
%{_sysconfdir}/bash_completion.d/lilv
%files -n liblilv-0-%{sover}
%defattr(0644,root,root,0755)
%doc AUTHORS COPYING NEWS README
%{_libdir}/liblilv-0.so.%{sover}*
%files -n liblilv-0-devel
%defattr(0644,root,root,0755)
%{_libdir}/liblilv-0.so
%{_includedir}/lilv-0/
%{_libdir}/pkgconfig/lilv-0.pc
%{_defaultdocdir}/lilv-0/
%{_mandir}/man3/*
%files -n python-lilv
%defattr(0644,root,root,0755)
%{python_sitearch}/lilv.py
%{python_sitearch}/_lilv.so
%changelog