File sord.spec of Package sord

#
# spec file for package sord
#
# Copyright (c) 2013 SUSE LINUX Products 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 soname 0

Name:           sord
Version:        0.12.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
BuildRequires:  doxygen
BuildRequires:  graphviz
BuildRequires:  pkg-config
BuildRequires:  python-base
BuildRequires:  pkgconfig(serd-0) >= 0.14.0

%description
Utilities to work with RDF data.

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

%description    -n libsord-0-%{soname}
A lightweight C library for storing RDF data in memory.

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

%description    -n libsord-0-devel
Development files for libsord.

# Upstream does not want versioned documentation
%package        -n libsord-docs
Summary:        Documentation about the libsord API
Group:          Documentation/Other

%description    -n libsord-docs
Documentation about the libsord API.

%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

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

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

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

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

%files -n libsord-0-devel
%defattr(0644,root,root,0755)
%{_libdir}/libsord-0.so
%{_includedir}/sord-0/
%{_libdir}/pkgconfig/sord-0.pc

%files -n libsord-docs
%defattr(0644,root,root,0755)
%{_defaultdocdir}/sord-0/
%{_mandir}/man3/*

%changelog
openSUSE Build Service is sponsored by