File virtuoso.spec of Package virtuoso

#
# spec file for package virtuoso
#
# 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/
#


Name:           virtuoso
Version:        6.1.6
Release:        0
Summary:        Relational database server with RDF
License:        GPL-2.0
Group:          Productivity/Databases/Servers
Url:            http://virtuoso.openlinksw.com/
Source0:        http://prdownloads.sourceforge.net/virtuoso/%{name}-opensource-6.1.6.tar.gz
# PATCH-FIX-OPENSUSE build-sanely.diff -- Build only things needed by KDE
Patch0:         build-sanely.diff
# PATCH-FIX-OPENSUSE virtuoso-opensource-6.1.0-external_iodbc.patch asterios.dramis@gmail.com -- Build with external iodbc
Patch2:         virtuoso-opensource-6.1.0-external_iodbc.patch
# PATCH-FIX-OPENSUSE Do not include build date and hostname in binaries
Patch6:         virtuoso-no-build-dates.patch
# PATCH-FIX-UPSTREAM automake_113.patch  -- Drop deprecated macro, fixes build with automake 1.13
Patch7:         automake_113.patch
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  gperf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if !0%{?sles_version}
BuildRequires:  htmldoc
%endif
BuildRequires:  libiodbc-devel
BuildRequires:  libopenssl-devel
%if 0%{?suse_version} <= 1140
BuildRequires:  openssl
%endif
BuildRequires:  libtool
BuildRequires:  libwbxml2-devel
BuildRequires:  openldap2-devel
# We can't use system pcre because internal pcre is modified for virtuoso's own use
#BuildRequires:  pcre-devel
BuildRequires:  readline-devel
BuildRequires:  zlib-devel
%if !0%{sles_version}
BuildRequires:  pkgconfig(ImageMagick)
BuildRequires:  pkgconfig(libxml-2.0)
%else
BuildRequires:  ImageMagick-devel
BuildRequires:  libxml2-devel
%endif
Requires:       virtuoso-drivers = %{version}
Requires:       virtuoso-server = %{version}

%description
Virtuoso is an innovative Universal Server platform that delivers
an enterprise level Data Integration and Management solution for SQL,
RDF, XML, Web Services, and Business Processes. It includes an RDF
layer for semantic applications.

It is used by the Virtuoso backend for Soprano in KDE.

%package -n virtuoso-server
Summary:        Virtuoso server
Group:          Productivity/Databases/Servers
Requires:       virtuoso-drivers = %{version}

%description -n virtuoso-server
Virtuoso is an innovative Universal Server platform that delivers
an enterprise level Data Integration and Management solution for SQL,
RDF, XML, Web Services, and Business Processes.

It is used by the Virtuoso backend for Soprano in KDE.

%package -n virtuoso-drivers
Summary:        Virtuoso ODBC Driver
Group:          Productivity/Databases/Servers
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n virtuoso-drivers
Virtuoso is an innovative Universal Server platform that delivers
an enterprise level Data Integration and Management solution for SQL,
RDF, XML, Web Services, and Business Processes.

It is used by the Virtuoso backend for Soprano in KDE.

%prep
%setup -q -n virtuoso-opensource-6.1.6
%patch0
%patch2 -p1
%patch6 -p1
%patch7 -p1

%build
# autogen.sh because of patching Makefile.am
./autogen.sh
export CFLAGS="%optflags -DOPENSSL_LOAD_CONF"
export CXXFLAGS="%optflags -DOPENSSL_LOAD_CONF"
%configure --without-internal-zlib \
           --disable-static \
           --with-layout=openSUSE \
           --disable-all-vads \
           --with-iodbc=%{_prefix} \
           --with-readline

make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install

# Both binaries with and without libiodbc are built, keep the iodbc one
mv %{buildroot}%{_bindir}/virtuoso-iodbc-t %{buildroot}%{_bindir}/virtuoso-t

# Provide useful utilities
mkdir -p %{buildroot}%{_libdir}/virtuoso
rm %{buildroot}%{_bindir}/inifile
mv %{buildroot}%{_bindir}/isql  %{buildroot}%{_bindir}/isql-vt
mv %{buildroot}%{_bindir}/isqlw %{buildroot}%{_bindir}/isqlw-vt
mv %{buildroot}%{_bindir}/isql-iodbc %{buildroot}%{_bindir}/isql-iodbc-vt
mv %{buildroot}%{_bindir}/isqlw-iodbc %{buildroot}%{_bindir}/isqlw-iodbc-vt

%files -n virtuoso-server
%defattr(-,root,root,-)
%doc %{_defaultdocdir}/virtuoso
%{_bindir}/virtuoso-t
%{_bindir}/isql*

%files -n virtuoso-drivers
%defattr(-,root,root,-)
%{_libdir}/virtodbc.la
%{_libdir}/virtodbc.so
%{_libdir}/virtodbc_r.la
%{_libdir}/virtodbc_r.so
%{_libdir}/virtodbcu.la
%{_libdir}/virtodbcu.so
%{_libdir}/virtodbcu_r.la
%{_libdir}/virtodbcu_r.so

%changelog
openSUSE Build Service is sponsored by