File libgda.spec of Package libgda

#
# spec file for package libgda (Version 4.1.2)
#
# Copyright (c) 2009 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/
#

# norootforbuild


Name:           libgda
BuildRequires:  db-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gcc-java
BuildRequires:  glib2-devel
BuildRequires:  intltool
BuildRequires:  java-devel
BuildRequires:  json-glib-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libsoup-devel
BuildRequires:  libxslt-devel
BuildRequires:  mdbtools-devel
BuildRequires:  mysql
BuildRequires:  mysql-devel
BuildRequires:  ncurses-devel
BuildRequires:  openldap2-devel
BuildRequires:  postgresql-devel
BuildRequires:  sqlite3-devel
BuildRequires:  unixODBC-devel
BuildRequires:  update-desktop-files
License:        GPL v2 or later ; LGPL v2.1 or later
Group:          Productivity/Databases/Clients
Version:        4.1.2
Release:        1
Summary:        GNU Data Access (GDA) Library
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://www.gnome-db.org/
Source:         http://ftp.gnome.org/pub/GNOME/sources/%{name}/3.99/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM libgda-no-subdir-in-bindir.patch bgo#594115 vuntz@novell.com -- No subdirectory in bindir
Patch1:         libgda-no-subdir-in-bindir.patch
Requires:       %{name}-lang = %{version}
Requires:       %{name}-4_0 = %{version}

%description
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        GNU Data Access (GDA) Library
Group:          System/Libraries
Provides:       %{name} = %{version}
Obsoletes:      %{name} <= %{version}

%description 4_0
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0-4
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        GNU Data Access (GDA) Library
Group:          System/Libraries
Requires:       %{name}-4_0 = %{version}

%description 4_0-4
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package ui-4_0-4
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        GNU Data Access (GDA) Library
Group:          System/Libraries
Requires:       %{name}-4_0 = %{version}
Supplements:    packageand(libgda-4_0:gtk2)

%description ui-4_0-4
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package report-4_0-4
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        GNU Data Access (GDA) Library
Group:          System/Libraries
Requires:       %{name}-4_0 = %{version}

%description report-4_0-4
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package xslt-4_0-4
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        GNU Data Access (GDA) Library
Group:          System/Libraries
Requires:       %{name}-4_0 = %{version}

%description xslt-4_0-4
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0-devel
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Include Files and Libraries mandatory for Development
Group:          Development/Libraries/C and C++
Requires:       %{name}-4_0-4 = %{version} glib2-devel libdb-4_5-devel libxml2-devel libxslt-devel glibc-devel gnome-vfs2-devel sqlite3-devel
Requires:       gtk2-devel
Requires:       %{name}-ui-4_0-4 = %{version}
# Required for gda-data-model-bdb.h include:
Requires:       db-devel
# named libgda-devel on 10.3
Provides:       %{name}-devel = %{version}
Obsoletes:      %{name}-devel <= 1.3.91

%description 4_0-devel
This package contains all necessary include files and libraries needed
to develop applications that require these.

%package 4_0-doc
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Additional Package Documentation
Group:          Development/Libraries/C and C++
Requires:       %{name}-4_0 = %{version}
Provides:       %{name}-doc = %{version}
# named libgda-doc on 10.3
Obsoletes:      %{name}-doc <= 1.3.91

%description 4_0-doc
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0-jdbc
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Sqlite Provider for GNU Data Access (GDA)
Group:          Productivity/Databases/Clients
Requires:       %{name}-4_0-4 = %{version}
Supplements:    libgda-4_0
Provides:       %{name}-jdbc = %{version}
Obsoletes:      %{name}-jdbc <= 1.3.91

%description 4_0-jdbc
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0-mdb
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        MDB (Microsoft Access Databases) Provider for GNU Data Access (GDA)
Group:          Productivity/Databases/Clients
Requires:       %{name}-4_0-4 = %{version}
Supplements:    packageand(libgda-4_0:%(cd %{_libdir} ; rpm -qf --queryformat=%%{NAME} `readlink %{_libdir}/libmdb.so` ))

%description 4_0-mdb
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0-mysql
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        MySQL Provider for GNU Data Access (GDA)
Group:          Productivity/Databases/Clients
Requires:       %{name}-4_0-4 = %{version}
Supplements:    packageand(libgda-4_0:%(cd %{_libdir} ; rpm -qf --queryformat=%%{NAME} `readlink %{_libdir}/libmysqlclient.so` ))
Provides:       %{name}-mysql = %{version}
Obsoletes:      %{name}-mysql <= 1.3.91

%description 4_0-mysql
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0-postgres
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        PostgreSQL Provider for GNU Data Access (GDA)
Group:          Productivity/Databases/Clients
Requires:       %{name}-4_0-4 = %{version}
Supplements:    packageand(libgda-4_0:%(cd %{_libdir} ; rpm -qf --queryformat=%%{NAME} `readlink %{_libdir}/libpq.so` ))
Provides:       %{name}-postgres = %{version}
Obsoletes:      %{name}-postgres <= 1.3.91

%description 4_0-postgres
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%package 4_0-sqlite
License:        GPL v2 or later ; LGPL v2.1 or later
Summary:        Sqlite Provider for GNU Data Access (GDA)
Group:          Productivity/Databases/Clients
Requires:       %{name}-4_0-4 = %{version}
Supplements:    packageand(libgda-4_0:%(cd %{_libdir} ; rpm -qf --queryformat=%%{NAME} `readlink %{_libdir}/libsqlite3.so` ))
Provides:       %{name}-sqlite = %{version}
Obsoletes:      %{name}-sqlite <= 1.3.91

%description 4_0-sqlite
GNU Data Access (GDA) is an attempt to provide uniform access to
different kinds of data sources (databases, information servers, mail
spools, and more). It is a complete architecture that provides all you
need to access your data. It is defined by a set of CORBA interfaces
that are as generic as possible (but very powerful at the same time) so
that any kind of data source can be accessed through them.

%lang_package
%prep
%setup -q
%patch1 -p1

%build
%configure --with-pic\
	--disable-static \
	--enable-binreloc
%{__make} %{?jobs:-j%jobs}

%install
# remove error about java bytecode being for something later than java 1.15 -- see http://en.opensuse.org/Java/Packaging/Cookbook
export NO_BRP_CHECK_BYTECODE_VERSION=true
%makeinstall
%suse_update_desktop_file gda-browser-4.0 Database
%suse_update_desktop_file gda-control-center-4.0
# Change sr@Latn to sr@latin
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
%find_lang libgda-4.0
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes $RPM_BUILD_ROOT

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%post 4_0-4 -p /sbin/ldconfig

%postun 4_0-4 -p /sbin/ldconfig

%post ui-4_0-4 -p /sbin/ldconfig

%postun ui-4_0-4 -p /sbin/ldconfig

%post report-4_0-4 -p /sbin/ldconfig

%postun report-4_0-4 -p /sbin/ldconfig

%post xslt-4_0-4 -p /sbin/ldconfig

%postun xslt-4_0-4 -p /sbin/ldconfig

%files lang -f libgda-4.0.lang

%files 4_0
# NOTE: Even if it was probably intended by upstrem to be in sync with
# the libgda soname, naming scheme is different (4_0-4 for soname, 4_0
# for data files). To be on the safe side, package it separately.
# This package contains only files with "4.0" in its name or path.
%defattr(-, root, root)
%doc AUTHORS COPYING COPYING.LIB ChangeLog NEWS README
%{_bindir}/*-4.0
%{_datadir}/libgda-4.0
%{_datadir}/applications/gda*.desktop
%{_datadir}/pixmaps/gda*.png
%dir %{_libdir}/libgda-4.0
%dir %{_libdir}/libgda-4.0/providers
#FIXME: why is this file missing?
#%{_libdir}/libgda-4.0/providers/libgda-ldap.so
%{_libdir}/libgda-4.0/providers/libgda-bdb.so
%{_libdir}/libgda-4.0/plugins
%doc %{_mandir}/man?/*-4.0.*
%dir %{_sysconfdir}/libgda-4.0
%config %dir %{_sysconfdir}/libgda-4.0/config
%config %{_sysconfdir}/libgda-4.0/sales_test.db
# in report-4_0-4
%exclude %{_datadir}/libgda-4.0/gda_trml2html
%exclude %{_datadir}/libgda-4.0/gda_trml2pdf

%files 4_0-4
%defattr(-, root, root)
%{_libdir}/libgda-4.0.so.*

%files ui-4_0-4
%defattr(-,root,root)
%{_libdir}/libgda-ui-4.0.so.*

%files report-4_0-4
%defattr(-, root, root)
# NOTE: This library has the same versioning policy, but depends on libgda-sqlite.
%{_datadir}/libgda-4.0/gda_trml2html
%{_datadir}/libgda-4.0/gda_trml2pdf
%{_libdir}/libgda-report-4.0.so.*

%files xslt-4_0-4
%defattr(-, root, root)
%{_libdir}/libgda-xslt-4.0.so.*

%files 4_0-devel
%defattr(-, root, root)
# NOTE: Files don't conflict with previous version => Use versioned package name
%{_includedir}/*-4.0
%{_libdir}/libgda-4.0.so
%{_libdir}/libgda-xslt-4.0.so
%{_libdir}/libgda-report-4.0.so
%{_libdir}/libgda-ui-4.0.so
%{_libdir}/pkgconfig/*-4.0.pc

%files 4_0-doc
%defattr(-, root, root)
# NOTE: Files don't conflict with previous version => Use versioned package name
%{_datadir}/gtk-doc/html/gda-browser
%{_datadir}/gtk-doc/html/libgda-4.0

%files 4_0-jdbc
%defattr(-, root, root)
# NOTE: Files don't conflict with previous version => Use versioned package name
%{_libdir}/libgda-4.0/providers/gdaprovider-4.0.jar
%{_libdir}/libgda-4.0/providers/libgda-jdbc.so

%files 4_0-mdb
%defattr(-, root, root)
# NOTE: Files don't conflict with previous version => Use versioned package name
%{_libdir}/libgda-4.0/providers/libgda-mdb.so

%files 4_0-mysql
%defattr(-, root, root)
# NOTE: Files don't conflict with previous version => Use versioned package name
%{_libdir}/libgda-4.0/providers/libgda-mysql.so

%files 4_0-postgres
%defattr(-, root, root)
# NOTE: Files don't conflict with previous version => Use versioned package name
%{_libdir}/libgda-4.0/providers/libgda-postgres.so

%files 4_0-sqlite
%defattr(-, root, root)
# NOTE: Files don't conflict with previous version => Use versioned package name
%{_libdir}/libgda-4.0/providers/libgda-sqlite.so

%changelog
openSUSE Build Service is sponsored by