Name:      soprano
Summary:   the Qt/C++ RDF framework
Summary(ja): Qt/C++ RDF フレームワーク
Version:   2.9.4
Release:   1%{?_dist_release}

License:   LGPLv2+
Group:     System Environment/Libraries
URL:       http://sourceforge.net/projects/soprano

Source:    %{name}-%{version}.tar.bz2

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: clucene-core-devel >= 2.3.3.4
BuildRequires: cmake
# for backends/sesame2
BuildRequires: java-1.5.0-gcj-devel
# for backends/virtuoso
BuildRequires: libiodbc-devel
BuildRequires: qt4-devel
BuildRequires: raptor2-devel
BuildRequires: rasqal-devel >= 0.9.22
BuildRequires: redland-devel

BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: qt4-doc

# Requires: redland-virtuoso
Requires: redland

Provides: soprano-backend-virtuoso = %{version}-%{release}
Provides: soprano-backend-sesame2 = %{version}-%{release}
Requires: virtuoso-opensource

%description
Soprano (formerly known as QRDF) is a library which provides a highly 
usable object-oriented C++/Qt4 framework for RDF data. It has a modular 
structure which allows to replace the actual RDF storage implementation used.

Currently Soprano implements one fully functional backend which is based
on librdf, the Redland RDF Application Framework.

%package devel
Summary: Development files for %{name}
Summary(ja): %{name} の開発用ファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: qt4-devel
Requires: pkgconfig

%description devel
Header files for developing applications using soprano


%prep
%setup -q

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake \
    -DDATA_INSTALL_DIR:PATH=%{_datadir}/kde4/apps \
    -DQT_DOC_DIR=`pkg-config --variable=docdir Qt` \
    -DSOPRANO_BUILD_API_DOCS:BOOL=%{!?apidocs:0}%{?apidocs} \
    -DSOPRANO_BUILD_TESTS:BOOL=%{!?tests:FALSE}%{?tests} \
    -DSOPRANO_DISABLE_SESAME2_BACKEND:BOOL=ON \
%ifarch x86_64
    -DLIB_SUFFIX=64 \
    -DQT_QMAKE_EXECUTABLE=%{_libdir}/qt4/bin/qmake \
%endif
    ..
popd

make %{?_smp_mflags} -C %{_target_platform}

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS COPYING COPYING.LIB README
%{_bindir}/*
%{_libdir}/*.so.*
%{_libdir}/soprano
%{_datadir}/dbus-1
%dir %{_datadir}/soprano
%{_datadir}/soprano/plugins
%{_datadir}/soprano/rules

%files devel
%defattr(-, root, root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
%{_datadir}/soprano/cmake


%changelog
* Sun Dec 08 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.9.4-1
- new upstream release

* Sat Sep 07 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.9.3-1
- new upstream release

* Wed Jun 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.9.2-1
- new upstream release

* Sat Jan 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.9.0-1
- new upstream release

* Sun Jul 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.8.0-1
- new upstream release
- remove Patch50 (soprano-2.5.63-rpath.patch)

* Sat Dec 10 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.7.4-1
- new upstream release

* Sun Nov 20 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.7.3-1
- new upstream release
- added BR: java-1.5.0-gcj-devel

* Sun Sep 25 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.7.1-1
- new upstream release
- built with clucne-core-2.3.3.4

* Fri Aug 19 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.7.0-2
- rebuilt with new raptor2, rasqal and redland

* Sun Aug 14 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.7.0-1
- new upstream release

* Sun Jul 31 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6.51-1
- new upstream release

* Sat Jun 11 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6.0-1
- new upstream release

* Mon Jan 31 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.5.63-1
- new upstream release

* Sat Jan  8 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.5.3-1
- new upstream release

* Mon Sep 20 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.5.2-1
- new upstream release
- rebuilt with rpm-4.8.1

* Sun Aug 15 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.5.0-1
- new upstream release
- added Japanese summary

* Sat Jul 10 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1
- new upstream release

* Sun Mar 14 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.1-1
- new upstream release

* Sat Feb 27 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.0.1-1
- new upstream release

* Thu Feb 11 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.0-1
- new upstream release

* Sat Feb  6 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.3.1-2
- rebuilt with new toolchain

* Mon Oct 19 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.3.1-1
- new upstream release
- moved %%{_datadir}/soprano/{plugins,rules} to main package

* Sat Aug 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.3.0-1
- new upstream release

* Mon Feb  9 2009 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.2.1-1
- new upstream release

* Tue Sep 02 2008 Shu KONNO <owa@bg.wakwak.com> 2.1.1-2
- added -DQT_QMAKE_EXECUTABLE=... to cmake (if x86_64)

* Sun Aug 31 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.1.1-1
- new upstream release

* Wed Aug 27 2008 Shu KONNO <owa@bg.wakwak.com> 2.0.3-2
- added cmake option -DLIB_SUFFIX=64 (if x86_64)

* Sat Mar 29 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.3-1
- new upstream release

* Thu Feb 21 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.0.2-0vl1
- new upstream release

* Wed Dec 12 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.99-0vl0.rc2
- initial release for VineSeed
