File sord.spec of Package sord

#
# spec file for package sord
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define sover 0

Name:           sord
Version:        0.14.0
Release:        0
Summary:        Utilities to work with RDF data
License:        ISC
Group:          Productivity/File utilities
Url:            http://drobilla.net/software/sord/
Source0:        http://download.drobilla.net/sord-%{version}.tar.bz2
Source1:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  doxygen
BuildRequires:  graphviz
BuildRequires:  pcre-devel
BuildRequires:  pkg-config
BuildRequires:  python-base
BuildRequires:  pkgconfig(serd-0) >= 0.18.0

%description
Utilities to work with RDF data.
Sord is a lightweight C library for storing RDF data in memory.

%package        -n libsord-0-%{sover}
Summary:        A lightweight C library for storing RDF data in memory
Group:          System/Libraries

%description    -n libsord-0-%{sover}
A lightweight C library for storing RDF data in memory.
http://drobilla.net/software/sord/

%package        -n libsord-0-devel
Summary:        Development files for libsord
Group:          Development/Libraries/C and C++
Requires:       libsord-0-%{sover} = %{version}

%description    -n libsord-0-devel
Development files for libsord.
Sord is a lightweight C library for storing RDF data in memory.


%prep
%setup -q

%build
export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
./waf configure \
  --prefix=%{_prefix} \
  --libdir=%{_libdir} \
  --docdir=%{_defaultdocdir} \
  --docs
# waf only understands -j, so do not use smp_mflags
./waf build -v %{?jobs:-j%jobs}

%install
./waf install --destdir=%{?buildroot}

# http://dev.drobilla.net/ticket/852
cp -p doc/sord_validate.1 %{buildroot}%{_mandir}/man1/sord_validate.1
mkdir -p %{buildroot}%{_mandir}/man3
cp -pv build/doc/reference.doxygen.doxy/man/man3/sord.3 %{buildroot}%{_mandir}/man3/

%post -n libsord-0-%{sover} -p /sbin/ldconfig

%postun -n libsord-0-%{sover} -p /sbin/ldconfig

%files
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_bindir}/sordi
%attr(0755,root,root) %{_bindir}/sord_validate
%{_mandir}/man1/sordi.1*
%{_mandir}/man1/sord_validate.1*

%files -n libsord-0-%{sover}
%defattr(0644,root,root,0755)
%doc AUTHORS COPYING NEWS README
%{_libdir}/libsord-0.so.%{sover}*

%files -n libsord-0-devel
%defattr(0644,root,root,0755)
%doc build/doc/reference.doxygen.doxy/html
%{_mandir}/man3/sord.3.gz
%{_libdir}/libsord-0.so
%{_includedir}/sord-0/
%{_libdir}/pkgconfig/sord-0.pc

%changelog