7acba7
%global maj 0
7acba7
7acba7
Name:       lilv
7acba7
Version:    0.5.0
7acba7
Release:    3%{?dist}
7acba7
Summary:    An LV2 Resource Description Framework Library
7acba7
7acba7
Group:      System Environment/Libraries
7acba7
License:    MIT
7acba7
URL:        http://drobilla.net/software/lilv/
7acba7
Source0:    http://download.drobilla.net/%{name}-%{version}.tar.bz2
7acba7
# correct non-deterministic node retrieval of scale points in test suite,
7acba7
# and increase the size of the test float array
7acba7
Patch0:     lilv-0.5.0-_lilv_test.c-from-3609-to-3610.patch
7acba7
Patch1:     lilv-0.5.0-lilv_test.c-r4011.patch 
7acba7
BuildRequires:  doxygen
7acba7
BuildRequires:  graphviz
7acba7
BuildRequires:  sord-devel >= 0.5.0
7acba7
BuildRequires:  lv2core-devel >= 4.0
7acba7
BuildRequires:  python2-devel
7acba7
BuildRequires:  swig
7acba7
7acba7
%filter_setup
7acba7
7acba7
%description
7acba7
%{name} is a library to make the use of LV2 plugins as simple as possible 
7acba7
for applications. Lilv is the successor to SLV2, rewritten to be significantly 
7acba7
faster and have minimal dependencies. 
7acba7
7acba7
%package devel
7acba7
Summary:    Development libraries and headers for %{name}
7acba7
Group:      Development/Libraries
7acba7
Requires:   %{name}%{_isa} = %{version}-%{release}
7acba7
7acba7
%description devel
7acba7
%{name} is a lightweight C library for Resource Description Syntax which 
7acba7
supports reading and writing Turtle and NTriples.
7acba7
7acba7
This package contains the headers and development libraries for %{name}.
7acba7
7acba7
%package -n python-%{name}
7acba7
Summary:    Python bindings for %{name}
7acba7
Group:      Development/Libraries
7acba7
Requires:   %{name}%{_isa} = %{version}-%{release}
7acba7
7acba7
%description -n python-%{name} 
7acba7
%{name} is a lightweight C library for Resource Description Syntax which 
7acba7
supports reading and writing Turtle and NTriples.
7acba7
7acba7
This package contains the python libraries for %{name}.
7acba7
7acba7
%prep
7acba7
%setup -q 
7acba7
%patch0 
7acba7
%patch1 -p1 
7acba7
7acba7
# we'll run ld config
7acba7
sed -i -e 's|bld.add_post_fun(autowaf.run_ldconfig)||' wscript
7acba7
# for packagers sake, build the tests with debug symbols
7acba7
sed -i -e "s| '-ftest-coverage' \]|\
7acba7
 '-ftest-coverage' \] + '%{optflags}'.split(' ')|" wscript
7acba7
7acba7
%build
7acba7
export CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
7acba7
./waf configure -v \
7acba7
    --prefix=%{_prefix} \
7acba7
    --libdir=%{_libdir} \
7acba7
    --mandir=%{_mandir} \
7acba7
    --datadir=%{_datadir} \
7acba7
    --docdir=%{_docdir}/%{name}-devel-%{version} \
7acba7
    --configdir=%{_sysconfdir} \
7acba7
    --test \
7acba7
    --bindings \
7acba7
    --docs 
7acba7
./waf build -v %{?_smp_mflags}
7acba7
7acba7
%install
7acba7
DESTDIR=%{buildroot} ./waf install
7acba7
chmod +x %{buildroot}%{_libdir}/lib%{name}-0.so.*
7acba7
7acba7
%post -p /sbin/ldconfig
7acba7
7acba7
%postun -p /sbin/ldconfig
7acba7
7acba7
%check
7acba7
./build/test/lilv_test
7acba7
7acba7
%files
7acba7
%doc AUTHORS ChangeLog README COPYING
7acba7
%{_libdir}/lib%{name}-%{maj}.so.*
7acba7
%{_bindir}/lilv-bench
7acba7
%{_bindir}/lv2info
7acba7
%{_bindir}/lv2ls
7acba7
%dir %{_sysconfdir}/bash_completion.d/
7acba7
%{_sysconfdir}/bash_completion.d/lilv
7acba7
%{_mandir}/man1/*
7acba7
7acba7
%files devel
7acba7
%{_libdir}/lib%{name}-%{maj}.so
7acba7
%{_libdir}/pkgconfig/%{name}-%{maj}.pc
7acba7
%{_includedir}/%{name}-%{maj}/
7acba7
%{_docdir}/%{name}-devel-%{version}
7acba7
%{_mandir}/man3/*
7acba7
7acba7
%files -n python-%{name}
7acba7
%{python_sitelib}/%{name}.*
7acba7
%{python_sitearch}/_%{name}.so
7acba7
7acba7
%changelog
7acba7
* Wed Feb 29 2012 Brendan Jones <brendan.jones.it@gmail.com> - 0.5.0-3
7acba7
- Remove redundant build requires, merge python bindings
7acba7
- Move man3 pages to devel package
7acba7
- Apply patch to correct scale points iteration in test suite
7acba7
7acba7
* Sun Feb 26 2012 Brendan Jones <brendan.jones.it@gmail.com> - 0.5.0-2
7acba7
- Add python bindings, and missing build requires
7acba7
- Move man pages to main package
7acba7
7acba7
* Fri Dec 23 2011 Brendan Jones <brendan.jones.it@gmail.com> - 0.5.0-1
7acba7
- Initial build