diff --git a/sratom-0.6.10.tar.bz2 b/sratom-0.6.10.tar.bz2 new file mode 100644 index 0000000..8e6989f Binary files /dev/null and b/sratom-0.6.10.tar.bz2 differ diff --git a/sratom-doc-install-directory.patch b/sratom-doc-install-directory.patch new file mode 100644 index 0000000..c91c9bf --- /dev/null +++ b/sratom-doc-install-directory.patch @@ -0,0 +1,12 @@ +diff --git a/wscript b/wscript +index 7bbf300..abdb163 100644 +--- a/wscript ++++ b/wscript +@@ -174,6 +174,7 @@ def build(bld): + + # Documentation + if bld.env.DOCS: ++ bld.env.SRATOM_MAJOR_VERSION = SRATOM_MAJOR_VERSION + bld.recurse('doc/c') + + bld.add_post_fun(autowaf.run_ldconfig) diff --git a/sratom.spec b/sratom.spec new file mode 100644 index 0000000..bba5e69 --- /dev/null +++ b/sratom.spec @@ -0,0 +1,87 @@ +%global maj 0 +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + +Name: sratom +Version: 0.6.10 +Release: 1 +Summary: A C library for serializing LV2 plugins +License: MIT +URL: http://drobilla.net/software/%{name}/ +Source0: http://download.drobilla.net/%{name}-%{version}.tar.bz2 + +# Patch sent upstream https://github.com/lv2/sratom/pull/4 +Patch0: %{name}-doc-install-directory.patch + +BuildRequires: python3 +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: sord-devel >= 0.14.0 +BuildRequires: serd-devel >= 0.30.0 +BuildRequires: lv2-devel >= 1.16.0 +BuildRequires: gcc +BuildRequires: python3-sphinx +BuildRequires: python3-sphinx_lv2_theme + +%description +%{name} is a new C library for serializing LV2 atoms to/from Turtle. It is +intended to be a full serialization solution for LV2 atoms, allowing +implementations to serialize binary atoms to strings and read them back again. +This is particularly useful for saving plugin state, or implementing plugin +control with network transparency. + +%package devel +Summary: Development libraries and headers for %{name} +Requires: %{name}%{_isa} = %{version}-%{release} + +%description devel +%{name} is a C library for serializing LV2 atoms to/from Turtle. It is +intended to be a full serialization solution for LV2 atoms, allowing +implementations to serialize binary atoms to strings and read them back again. +This is particularly useful for saving plugin state, or implementing plugin +control with network transparency. + +This package contains the headers and development libraries for %{name}. + +%prep +%autosetup -p1 + +# for packagers sake, build the tests with debug symbols +sed -i -e "s| '-ftest-coverage'\]|\ + '-ftest-coverage'\] + '%{optflags}'.split(' ')|" wscript + +%build +%set_build_flags +%{__python3} waf configure -v \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --datadir=%{_datadir} \ + --docdir=%{_pkgdocdir} \ + --test \ + --docs +%{__python3} waf build -v %{?_smp_mflags} + +%install +DESTDIR=%{buildroot} %{__python3} waf install +chmod +x %{buildroot}%{_libdir}/lib%{name}-0.so.* +install -pm 644 COPYING NEWS README.md %{buildroot}%{_pkgdocdir} + +%check +%{__python3} waf test -v + +%files +%{_pkgdocdir} +%exclude %{_pkgdocdir}/%{name}-%{maj}/ +%exclude %{_pkgdocdir}/COPYING +%license COPYING +%{_libdir}/lib%{name}-%{maj}.so.* + +%files devel +%{_pkgdocdir}/%{name}-%{maj}/ +%{_libdir}/lib%{name}-%{maj}.so +%{_libdir}/pkgconfig/%{name}-%{maj}.pc +%{_includedir}/%{name}-%{maj}/ + +%changelog +* Mon Jan 02 2023 lin zhang - 0.6.10-1 +- Init Packaging \ No newline at end of file