File glom.spec of Package glom

#
# spec file for package glom
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Dominique Leuenberger, Amsterdam, The Netherlands.
#
# 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:           glom
Summary:        Database designer and user interface
License:        GPL-3.0+
Group:          Productivity/Databases/Clients
Version:        1.22.0
Release:        0
Source:         http://download.gnome.org/sources/glom/1.22/%{name}-%{version}.tar.xz
# This is indeed GPL-3.0+, see http://git.gnome.org/browse/glom/commit/?id=6b16a90f8ea902d91db85656cc11c6a951d42ced
Url:            http://www.glom.org/
BuildRequires:  boost-devel
BuildRequires:  gcc-c++
BuildRequires:  gdbm-devel
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
BuildRequires:  iso-codes-devel
BuildRequires:  postgresql-devel
BuildRequires:  postgresql-server
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(evince-view-3.0)
BuildRequires:  pkgconfig(giomm-2.4) >= 2.32.0
BuildRequires:  pkgconfig(goocanvas-2.0) >= 2.0.1
BuildRequires:  pkgconfig(goocanvasmm-2.0) >= 1.90.8
BuildRequires:  pkgconfig(gtkmm-3.0) >= 3.4.0
BuildRequires:  pkgconfig(gtksourceviewmm-3.0)
BuildRequires:  pkgconfig(libepc-1.0) >= 0.4.0
BuildRequires:  pkgconfig(libgda-5.0) >= 5.0.3
BuildRequires:  pkgconfig(libgda-postgres-5.0)
BuildRequires:  pkgconfig(libgdamm-5.0) >= 4.99.6
BuildRequires:  pkgconfig(libxml++-2.6) >= 2.23.1
BuildRequires:  pkgconfig(libxslt) >= 1.1.10
BuildRequires:  pkgconfig(pygobject-3.0) >= 2.29.0
# libgda-5_0-postgres is required to be able to start glom (bnc#772551)
Requires:       libgda-5_0-postgres
# For pg_dump/pg_restore, needed by Export Backup and Restore Backup menu items
Requires:       postgresql
# This is unfortunately needed for now, should get fixed upstream at some point
Requires:       postgresql-server
# python-glom is a hard requirement to launch glom (bnc#772551)
Requires:       python-glom
# Glom verifies fot gi.repository.Gda Python Module (bnc#772551)
Requires:       typelib(Gda)
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
With Glom you can design database systems - the database and the user
interface.

    * Glom has high-level features such as relationships, lookups,
      related fields, related records, calculated fields, drop-down
      choices, searching, reports, users and groups.
    * Glom keeps things simple. It has Numeric, Text, Date, Time,
      Boolean, and Image field types.
    * Glom systems require almost no programming, but you may use
      Python for calculated fields or buttons.
    * Each Glom system can be translated for multiple languages and
      countries.

%package -n lib%{name}-devel
Summary:        Database designer and user interface - Development files
Group:          Development/Libraries/C and C++
Requires:       glibmm2-devel
Requires:       lib%{name}-1_22-0 = %{version}
Requires:       libgdamm-devel

%description -n lib%{name}-devel
With Glom you can design database systems - the database and the user
interface.

    * Glom has high-level features such as relationships, lookups,
      related fields, related records, calculated fields, drop-down
      choices, searching, reports, users and groups.
    * Glom keeps things simple. It has Numeric, Text, Date, Time,
      Boolean, and Image field types.
    * Glom systems require almost no programming, but you may use
      Python for calculated fields or buttons.
    * Each Glom system can be translated for multiple languages and
      countries.

This package contains development files to create extensions for glom.

%package -n lib%{name}-1_22-0
Summary:        Database designer and user interface - Library
Group:          System/Libraries

%description -n lib%{name}-1_22-0
With Glom you can design database systems - the database and the user
interface.

    * Glom has high-level features such as relationships, lookups,
      related fields, related records, calculated fields, drop-down
      choices, searching, reports, users and groups.
    * Glom keeps things simple. It has Numeric, Text, Date, Time,
      Boolean, and Image field types.
    * Glom systems require almost no programming, but you may use
      Python for calculated fields or buttons.
    * Each Glom system can be translated for multiple languages and
      countries.

%package -n python-%{name}
Summary:        Database designer and user interface - Python bindings
Group:          Development/Languages/Python
# Automatically trigger installation if we have python and glom installed.
Supplements:    packageand(glom:python)
%py_requires

%description -n python-%{name}
With Glom you can design database systems - the database and the user
interface.

    * Glom has high-level features such as relationships, lookups,
      related fields, related records, calculated fields, drop-down
      choices, searching, reports, users and groups.
    * Glom keeps things simple. It has Numeric, Text, Date, Time,
      Boolean, and Image field types.
    * Glom systems require almost no programming, but you may use
      Python for calculated fields or buttons.
    * Each Glom system can be translated for multiple languages and
      countries.

%lang_package

%prep
%setup -q

%build
%configure \
	--disable-static \
	--disable-dependency-tracking \
	--disable-update-mime-database \
        --disable-documentation \
	--disable-scrollkeeper \
	--with-postgres-utils=%{_bindir}
make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot} -type f -name *.la -delete
%suse_update_desktop_file %{name}
%find_lang %{name} %{?no_lang_C}

%post
%desktop_database_post
%icon_theme_cache_post
%mime_database_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%mime_database_postun

%post -n lib%{name}-1_22-0 -p /sbin/ldconfig

%postun -n lib%{name}-1_22-0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%{_bindir}/%{name}
%{_bindir}/glom_create_from_example
%{_bindir}/glom_export_po
%{_bindir}/glom_export_po_all
%{_bindir}/glom_import_po_all
%{_bindir}/glom_test_connection
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}/
%{_datadir}/doc/%{name}/
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/mime/packages/%{name}.xml

%files -n lib%{name}-devel
%defattr(-,root,root)
%{_includedir}/%{name}-1.22/
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}-1.22.pc

%files -n lib%{name}-1_22-0
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n python-%{name}
%defattr(-,root,root)
%{py_sitedir}/*.so

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by