%bcond_without bdb %bcond_without ldap %bcond_without mysql %bcond_without postgres %bcond_without mdb %bcond_without java %global tarname libgda %global apiver 5.0 Name: libgda5 Version: 5.0.3 Release: 3%{?dist} Summary: Library for writing gnome database programs License: LGPLv2+ URL: http://www.gnome-db.org/ Source: http://ftp.gnome.org/pub/GNOME/sources/%{tarname}/5.0/%{tarname}-%{version}.tar.xz BuildRequires: pkgconfig >= 0.8 BuildRequires: glib2-devel >= 2.28.0 BuildRequires: gtk3-devel >= 3.0.0 BuildRequires: gtksourceview3-devel BuildRequires: goocanvas2-devel BuildRequires: graphviz-devel >= 2.26.0 BuildRequires: iso-codes >= 3.15 BuildRequires: libxslt-devel >= 1.0.9 BuildRequires: sqlite-devel >= 3.6.11 BuildRequires: libgcrypt-devel BuildRequires: gobject-introspection-devel >= 0.6.5 BuildRequires: libxml2-devel readline-devel json-glib-devel BuildRequires: gtk-doc scrollkeeper intltool gettext flex bison perl(XML::Parser) BuildRequires: libsoup-devel BuildRequires: gnome-doc-utils BuildRequires: openssl-devel BuildRequires: libgnome-keyring-devel %{!?_without_bdb:BuildRequires: libdb-sql-devel} %{!?_without_ldap:BuildRequires: openldap-devel} %{!?_without_mysql:BuildRequires: mysql-devel} %{!?_without_postgres:BuildRequires: postgresql-devel} %{!?_without_mdb:BuildRequires: mdbtools-devel} %{!?_without_java:BuildRequires: java-devel >= 1:1.6.0} %description %{name} is a library that eases the task of writing Gtk3-based database programs. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package ui Summary: UI extensions for %{name} Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description ui %{name}-ui extends %{name} providing graphical widgets (Gtk+). %package ui-devel Summary: Development files for %{name}-ui Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-ui%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} Requires: gtk3-devel%{?_isa} >= 3.0.0 %description ui-devel The %{name}-ui-devel package contains libraries and header files for developing applications that use %{name}-ui. %package tools Summary: Graphical tools for %{name} Group: Applications/Databases Requires: %{name}-ui%{?_isa} = %{version}-%{release} %description tools This %{name}-tools package provides graphical tools for %{name}. %package sqlite Summary: SQLite provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} Requires: sqlite%{?isa} >= 3.6.11 %description sqlite This %{name}-sqlite includes the %{name} SQLite provider. %if 0%{with_bdb} %package bdb Summary: Berkeley DB provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description bdb This %{name}-bdb includes the %{name} Berkeley DB provider. %endif %if 0%{with_ldap} %package ldap Summary: Ldap provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description ldap This %{name}-ldap includes the %{name} Ldap provider. %endif %package sqlcipher Summary: SQLiteCipher provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description sqlcipher This %{name}-sqlcipher includes the %{name} SQLiteCipher provider. %package web Summary: Web provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description web This %{name}-web includes the %{name} Web provider. %if 0%{with_mysql} %package mysql Summary: Mysql provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description mysql This %{name}-mysql includes the %{name} Mysql provider. %endif %if 0%{with_postgres} %package postgres Summary: Postgres provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description postgres This %{name}-postgres includes the %{name} PostgreSQL provider. %endif %if 0%{with_mdb} %package mdb Summary: Mdb provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description mdb This %{name}-mdb includes the %{name} Mdb provider. %endif %if 0%{with_java} %package java Summary: Java provider for %{name} Group: System Environment/Libraries Requires: %{name}%{?isa} = %{version}-%{release} %description java This %{name}-java includes the %{name} Java JDBC provider. %endif %prep %setup -q -n %{tarname}-%{version} # AUTHORS not in UTF-8 iconv --from=ISO-8859-1 --to=UTF-8 AUTHORS > AUTHORS.new && \ touch -r AUTHORS AUTHORS.new && mv AUTHORS.new AUTHORS %build # set LD_LIBRARY_PATH manually since it fails to find libjvm with_java7 %if 0%{?with_java} %ifarch x86_64 %global archinstall amd64 %endif %ifarch %{ix86} %global archinstall i386 %endif export LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/%{archinstall}/server:$LD_LIBRARY_PATH %endif # vala support has not been tested yet so it is not enabled yet %configure --disable-static --enable-vala=no \ --with-libsoup --with-gnome-keyring \ --with-ui --with-gtksourceview \ --with-goocanvas --with-graphviz \ %{?with_bdb:--with-bdb=yes --with-bdb-libdir-name=%{_lib}} \ %{!?with_ldap:--with-ldap=no} \ %{!?with_mysql:--with-mysql=no} \ %{!?with_postgres:--with-postgresql=no} \ %{!?with_mdb:--with-mdb=no} \ %{!?with_java:--with-java=no} make %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} find %{buildroot} -name '*.la' -exec rm -f {} ';' rm %{buildroot}/%{_sysconfdir}/%{tarname}-%{apiver}/sales_test.db %find_lang libgda-5.0 %post -p /sbin/ldconfig %post ui -p /sbin/ldconfig %post devel if which scrollkeeper-update >/dev/null 2>&1; then scrollkeeper-update; fi %post ui-devel if which scrollkeeper-update >/dev/null 2>&1; then scrollkeeper-update; fi %postun -p /sbin/ldconfig %postun ui -p /sbin/ldconfig %postun devel if which scrollkeeper-update >/dev/null 2>&1; then scrollkeeper-update; fi %postun ui-devel if which scrollkeeper-update >/dev/null 2>&1; then scrollkeeper-update; fi %files -f libgda-5.0.lang %doc AUTHORS COPYING ChangeLog README NEWS %config(noreplace) %{_sysconfdir}/%{tarname}-%{apiver}/config %{_libdir}/%{tarname}-%{apiver}.so.* %{_libdir}/%{tarname}-report-%{apiver}.so.* %{_libdir}/%{tarname}-xslt-%{apiver}.so.* %{_mandir}/man1/* %{_libdir}/girepository-1.0/Gda-%{apiver}.typelib %{_datadir}/%{tarname}-%{apiver}/dtd/libgda-*.dtd %{_datadir}/%{tarname}-%{apiver}/import_encodings.xml %{_datadir}/%{tarname}-%{apiver}/information_schema.xml %files devel %doc %{_datadir}/gtk-doc/html/%{tarname}-%{apiver} %doc %{_datadir}/gnome/help/gda-sql/* %{_includedir}/%{tarname}-%{apiver}/%{tarname} %{_includedir}/%{tarname}-%{apiver}/%{tarname}-xslt %{_includedir}/%{tarname}-%{apiver}/%{tarname}-report %{_libdir}/%{tarname}-%{apiver}.so %{_libdir}/%{tarname}-report-%{apiver}.so %{_libdir}/%{tarname}-xslt-%{apiver}.so %{_datadir}/gir-1.0/Gda-%{apiver}.gir %{_libdir}/pkgconfig/%{tarname}-%{apiver}.pc %{_libdir}/pkgconfig/%{tarname}-*-%{apiver}.pc %exclude %{_libdir}/pkgconfig/%{tarname}-ui-%{apiver}.pc %files ui %doc %{_libdir}/%{tarname}-ui-%{apiver}.so.* %{_libdir}/%{tarname}-%{apiver}/plugins/*.xml %{_datadir}/%{tarname}-%{apiver}/pixmaps %{_datadir}/%{tarname}-%{apiver}/dtd/gdaui-layout.dtd %{_datadir}/%{tarname}-%{apiver}/ui/gdaui-entry-*.xml %{_libdir}/girepository-1.0/Gdaui-%{apiver}.typelib %{_datadir}/%{tarname}-%{apiver}/icons/hicolor/* %{_datadir}/%{tarname}-%{apiver}/server_operation.glade %{_datadir}/%{tarname}-%{apiver}/language-specs/gda-sql.lang %files ui-devel %doc %{_includedir}/%{tarname}-%{apiver}/%{tarname}-ui %{_libdir}/%{tarname}-ui-%{apiver}.so %{_bindir}/gdaui-demo-%{apiver} %{_libdir}/pkgconfig/%{tarname}-ui-%{apiver}.pc %{_datadir}/gir-1.0/Gdaui-%{apiver}.gir %{_datadir}/%{tarname}-%{apiver}/demo/*.c %{_libdir}/%{tarname}-%{apiver}/plugins/%{tarname}-ui-plugins.so %{_datadir}/%{tarname}-%{apiver}/demo/custom_layout.xml %{_datadir}/%{tarname}-%{apiver}/demo/demo_db.db %files tools %doc %{_datadir}/gnome/help/gda-browser/* %doc %{_datadir}/gtk-doc/html/gda-browser/* %{_bindir}/gda-* %{_datadir}/%{tarname}-%{apiver}/gda_trml2html %{_datadir}/%{tarname}-%{apiver}/gda_trml2pdf %{_datadir}/applications/gda-browser-%{apiver}.desktop %{_datadir}/applications/gda-control-center-%{apiver}.desktop %{_datadir}/pixmaps/gda-browser-5.0.png %{_datadir}/icons/hicolor/* %files sqlite %defattr(-,root,root,-) %{_libdir}/%{tarname}-%{apiver}/providers/%{tarname}-sqlite.so %{_datadir}/%{tarname}-%{apiver}/sqlite_specs*.xml %if 0%{with_bdb} %files bdb %{_libdir}/libgda-%{apiver}/providers/libgda-bdb.so %{_datadir}/%{tarname}-%{apiver}/bdb_specs*.xml %endif %if 0%{with_ldap} %files ldap %{_libdir}/%{tarname}-%{apiver}/providers/%{tarname}-ldap.so %{_datadir}/%{tarname}-%{apiver}/ldap_specs*.xml %endif %files sqlcipher %{_libdir}/%{tarname}-%{apiver}/providers/%{tarname}-sqlcipher.so %{_datadir}/%{tarname}-%{apiver}/sqlcipher_specs*.xml %files web %{_libdir}/%{tarname}-%{apiver}/providers/%{tarname}-web.so %{_datadir}/%{tarname}-%{apiver}/php/* %{_datadir}/%{tarname}-%{apiver}/web/* %{_datadir}/%{tarname}-%{apiver}/web_specs*.xml %if 0%{with_mysql} %files mysql %{_libdir}/libgda-%{apiver}/providers/libgda-mysql.so %{_datadir}/%{tarname}-%{apiver}/mysql_specs*.xml %endif %if 0%{with_postgres} %files postgres %{_libdir}/libgda-%{apiver}/providers/libgda-postgres.so %{_datadir}/%{tarname}-%{apiver}/postgres_specs*.xml %endif %if 0%{with_mdb} %files mdb %{_libdir}/libgda-%{apiver}/providers/libgda-mdb.so %{_datadir}/%{tarname}-%{apiver}/mdb_specs*.xml %endif %if 0%{with_java} %files java %{_libdir}/libgda-%{apiver}/providers/%{tarname}-jdbc.so %{_libdir}/libgda-%{apiver}/providers/gdaprovider-%{apiver}.jar %{_datadir}/%{tarname}-%{apiver}/jdbc_specs*.xml %endif %changelog * Sat Apr 07 2012 Haïkel Guémar - 5.0.3-3 - only keep *-devel and *-ui-devel devel subpackages * Sat Mar 24 2012 Haïkel Guémar - 5.0.3-2 - cleaned BR * Wed Feb 08 2012 Haïkel Guémar - 5.0.3-1 - upstream 5.0.3 - fix bdb backend building and running * Sun Jan 22 2012 Haïkel Guémar - 5.0.2-1 - initial packaging