sratom/sratom.spec

87 lines
2.6 KiB
RPMSpec
Raw Normal View History

2023-02-01 21:53:52 +08:00
%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 <lin.zhang@turbolinux.com.cn> - 0.6.10-1
- Init Packaging