diff --git a/lv2.spec b/lv2.spec index 81c394d..84e4ffd 100644 --- a/lv2.spec +++ b/lv2.spec @@ -1,8 +1,10 @@ %global debug_package %{nil} +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + Name: lv2 Version: 1.6.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Audio Plugin Standard Group: System Environment/Libraries @@ -12,6 +14,11 @@ URL: http://lv2plug.in Source: http://lv2plug.in/spec/lv2-%{version}.tar.bz2 BuildRequires: doxygen graphviz python-rdflib +# TODO: it complains about missing this, +# (Error importing pygments, syntax highlighting disabled) +# but the syntax-highlighting in the generated docs looks strange +#BuildRequires: python-pygments + # this package replaces lv2core Provides: lv2core = 6.0-4 Obsoletes: lv2core < 6.0-4 @@ -50,13 +57,14 @@ Definitive technical documentation on LV2 plug-ins for both the host and plug-in is contained within copious comments within the lv2.h header file. -%package docs +%package doc Summary: Documentation for the LV2 Audio Plugin Standard -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Group: Documentation BuildArch: noarch +Obsoletes: %{name}-docs < 1.6.0-2 +Provides: %{name}-docs = %{version}-%{release} -%description docs +%description doc Documentation for the LV2 plugin API. %prep @@ -64,19 +72,27 @@ Documentation for the LV2 plugin API. %build ./waf configure -vv --prefix=%{_prefix} --libdir=%{_libdir} --debug \ - --docs --no-plugins + --docs --docdir=%{_pkgdocdir} --no-plugins ./waf -vv %{?_smp_mflags} %install rm -rf %buildroot DESTDIR=%buildroot ./waf -vv install -mv %{buildroot}%{_docdir}/%name/* %{buildroot}%{_docdir}/%{name}-%{version} +mv %{buildroot}%{_pkgdocdir}/%{name}/lv2plug.in/* %{buildroot}%{_pkgdocdir} +find %{buildroot}%{_pkgdocdir} -type d -empty | xargs rmdir +for f in COPYING NEWS README ; do + install -p -m0644 $f %{buildroot}%{_pkgdocdir} +done %clean rm -rf %buildroot %files -%doc COPYING NEWS README +# don't include doc files via %%doc here (bz 913540) +%dir %{_pkgdocdir} +%{_pkgdocdir}/COPYING +%{_pkgdocdir}/NEWS +%{_pkgdocdir}/README %{_libdir}/%{name}/ %exclude %{_libdir}/%{name}/*/*.[ch] @@ -87,10 +103,19 @@ rm -rf %buildroot %{_libdir}/pkgconfig/lv2core.pc %{_libdir}/pkgconfig/%{name}.pc -%files docs -%{_docdir}/%{name}-%{version}/* +%files doc +%{_pkgdocdir}/ %changelog +* Sun Sep 22 2013 Michael Schwendt - 1.6.0-2 +- Don't duplicate -doc package contents in base package (#913540). +- Define and use %%_pkgdocdir as suggested by the Unversioned Docdirs + change for Fedora 20 (#993908). +- Pass --docdir= to waf. +- Use Group Documentation in -doc subpackage. +- Rename -docs package to -doc as recommended in the guidelines. +- The documentation subpackage does not need the base package. + * Fri Aug 23 2013 Brendan Jones 1.6.0-1 - Update to 1.6.0