Initial Packaging

This commit is contained in:
zhang__3125 2022-06-16 17:04:52 +08:00
parent 76d752129b
commit c56552a4b3
2 changed files with 78 additions and 0 deletions

BIN
serd-0.30.10.tar.bz2 Normal file

Binary file not shown.

78
serd.spec Normal file
View File

@ -0,0 +1,78 @@
%global maj 0
Name: serd
Version: 0.30.10
Release: 1
Summary: A lightweight C library for RDF syntax
License: ISC
URL: http://drobilla.net/software/serd/
Source0: http://download.drobilla.net/%{name}-%{version}.tar.bz2
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: glib2-devel
BuildRequires: python3
BuildRequires: gcc
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_lv2_theme
%description
%{name} is a lightweight C library for RDF syntax which supports reading and
writing Turtle, TRiG, NTriples, and NQuads.
Serd is suitable for performance-critical or resource-limited applications,
such as serialising very large data sets, network protocols, or embedded
systems that require minimal dependencies and lightweight deployment.
%package devel
Summary: Development libraries and headers for %{name}
Requires: %{name}%{_isa} = %{version}-%{release}
%description devel
%{name} is a lightweight C library for RDF syntax which supports reading and
writing Turtle, TRiG, NTriples, and NQuads.
This package contains the headers and development libraries for %{name}.
%prep
%autosetup -p1
sed -i -e 's|bld.add_post_fun(autowaf.run_ldconfig)||' wscript
%build
%set_build_flags
%{__python3} waf configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--datadir=%{_datadir} \
--docdir=%{_docdir} \
--test \
--docs
%{__python3} waf build -v %{?_smp_mflags}
%install
DESTDIR=%{buildroot} %{__python3} waf install
chmod +x %{buildroot}%{_libdir}/lib%{name}-%{maj}.so.*
# Delete sphinx buildinfo
rm %{buildroot}%{_docdir}/%{name}-%{maj}/c/{html,singlehtml}/.buildinfo
# Move devel docs to the right directory
install -d %{buildroot}%{_docdir}/%{name}/%{name}-%{maj}
mv %{buildroot}%{_docdir}/%{name}-%{maj}/c %{buildroot}%{_docdir}/%{name}/%{name}-%{maj}/c
%files
%license COPYING
%doc AUTHORS NEWS README.md
%doc %{_mandir}/man1/serdi.1*
%{_libdir}/lib%{name}-%{maj}.so.%{maj}*
%{_bindir}/serdi
%files devel
%doc %{_docdir}/%{name}/%{name}-%{maj}/
%{_libdir}/lib%{name}-%{maj}*.so
%{_libdir}/pkgconfig/%{name}*.pc
%{_includedir}/%{name}-%{maj}/
%changelog
* Mon Jun 13 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 0.30.10-1
- Initial Packaging