File mysql-gui-tools.spec of Package mysql-gui-tools

#
# spec file for package mysql-gui-tools (Version 5.0r12)
#
# Copyright (c) 2008 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:           mysql-gui-tools
BuildRequires:  e2fsprogs-devel gcc-c++ gtkhtml2-devel gtkmm24-devel libexpat-devel libglade2-devel lua50-devel mysql-devel pcre-devel perl-XML-Parser update-desktop-files
BuildRequires:  Mesa-devel
Summary:        Common Files for MySQL GUI Tools
Version:        5.0r12
Release:        218
Group:          Productivity/Databases/Clients
License:        GPL v2 or later
Url:            http://www.mysql.com/products/tools/query-browser/
Source:         %{name}-%{version}.tar.bz2
Source1:        mysql-administrator-doc.tar.bz2
Source2:        mysql-query-browser-doc.tar.bz2
Patch2:         mysql-administrator-help.patch
Patch10:        mysql-query-browser.patch
Patch12:        mysql-query-browser-gcc4.patch
Patch22:        mysql-gui-common-pkg-config.patch
Patch24:        mysql-gui-common-unused-func.patch
Patch25:        mysql-gui-common-warnings.patch
Patch26:        mysql-gui-common-lua.patch
Patch30:        mysql-gui-tools-warnings.patch
Patch31:        mysql-gui-common-build.patch
Patch32:        mysql-gui-tools-gcc4.3.diff
Patch33:        mysql-query-browser-hangs.patch
Patch34:        %{name}-sigc.patch
Patch35:        mysql-workbench-start.patch
Patch36:        mysql-gui-common-join.patch
Patch37:        mysql-gui-tools-deprecated.patch
Patch38:        mysql-gui-shell-scripts-args.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Recommends:     mysql-administrator mysql-query-browser mysql-workbench

%description
This package contains files used by mysql-query-browser,
mysql-administrator and mysql-workbench.



%package -n mysql-administrator
License:        GPL v2 or later
Summary:        A MySQL Server Management, Configuration, and Monitoring Tool
Group:          Productivity/Databases/Servers
Requires:       mysql-gui-tools = %{version}

%description -n mysql-administrator
MySQL Administrator is a powerful visual administration console that
enables you to easily administer your MySQL environment and gain
significantly better visibility into how your databases are operating.
MySQL Administrator now integrates database management and maintenance
into a single seamless environment with a clear and intuitive graphical
user interface.

It is part of the MySQL Administration Suite.



%package -n mysql-query-browser
License:        GPL v2 or later
Summary:        A Graphical MySQL Query Shell
Group:          Productivity/Databases/Clients
Requires:       mysql-gui-tools = %{version}

%description -n mysql-query-browser
MySQL Query Browser is a GUI tool for executing SQL queries. It
displays the result in a list where you can edit its contents and save.
It has several auxiliary features to facilitate work, such as query
"bookmarking", query history, syntax highlighting, and online help.

It is part of the MySQL Developer Suite.



%package -n mysql-workbench
License:        GPL v2 or later
Summary:        A MySQL visual modeling tool
Group:          Productivity/Databases/Clients
Requires:       mysql-gui-tools = %{version}

%description -n mysql-workbench
MySQL Workbench is modeling tool that allows you to design and generate
MySQL databases graphically.

MySQL Workbench requires OpenGL and a 3D accelerated graphics card with
at least 16MB of memory.



%prep
%setup -q -n %{name}-%{version} -a1 -a2
cd mysql-administrator
%patch2
cd ../mysql-query-browser
%patch10
%patch12
cd ../mysql-gui-common
%patch22
%patch24
%patch25
#%patch26 ## build aganist lua50 instead
cd ..
%patch30
%patch31
%patch32
%patch33
%patch34
%patch35
%patch36
%patch37
%patch38 -p1

%build
# gui-common
cd mysql-gui-common
touch NEWS AUTHORS ChangeLog
autoreconf -f -i
%configure --enable-canvas --enable-grt
make %{?jobs:-j%jobs}
# administrator
cd ../mysql-administrator
%configure
make %{?jobs:-j%jobs}
# query-browser
cd ../mysql-query-browser
touch NEWS AUTHORS ChangeLog README
autoreconf -f -i
%configure --with-gtkhtml=libgtkhtml-3.14
make %{?jobs:-j%jobs}
# workbench
cd ../mysql-workbench
%configure
make %{?jobs:-j%jobs}

%install
cd mysql-gui-common
make DESTDIR=%{buildroot} install
cd ../mysql-administrator
make DESTDIR=%{buildroot} install
%suse_update_desktop_file -i -G "Database administraton" -r MySQLAdministrator System Database
cd ../mysql-query-browser
make DESTDIR=%{buildroot} install
%suse_update_desktop_file -i -G "Database query tool" -r MySQLQueryBrowser System Database
cd ../mysql-workbench
make DESTDIR=%{buildroot} install
%suse_update_desktop_file -i -G "Database design tool" -r MySQLWorkbench System Database
cd .. 
%find_lang mysql-administrator
%find_lang mysql-query-browser

%clean
rm -rf %{buildroot}

%files -n mysql-gui-tools
%defattr(-, root, root)
%doc mysql-gui-common/COPYING
%dir %{_datadir}/mysql-gui
%{_datadir}/mysql-gui/common

%files -n mysql-administrator -f mysql-administrator.lang
%defattr(0644, root, root, 0755)
%doc mysql-administrator/{ChangeLog,COPYING,res/FAQ,doc/*}
%attr(0755,root,root) %{_bindir}/mysql-administrator
%attr(0755,root,root) %{_bindir}/mysql-administrator-bin
%attr(0755,root,root) %{_bindir}/mabackup
%{_datadir}/applications/MySQLAdministrator.desktop
%{_datadir}/mysql-gui/MySQLIcon_Admin*.png
%{_datadir}/mysql-gui/administrator

%files -n mysql-query-browser -f mysql-query-browser.lang
%defattr(0644, root, root, 0755)
%doc mysql-query-browser/{COPYING,doc/*,res/doc/*.html,res/doc/*.css}
%attr(0755,root,root) %{_bindir}/mysql-query-browser
%attr(0755,root,root) %{_bindir}/mysql-query-browser-bin
%{_datadir}/applications/MySQLQueryBrowser.desktop
%{_datadir}/mysql-gui/MySQLIcon_QueryBrowser*.png
%{_datadir}/mysql-gui/query-browser/

%files -n mysql-workbench
%defattr(0644, root, root, 0755)
%doc mysql-workbench/{COPYING,ChangeLog}
%attr(0755,root,root) %{_bindir}/mysql-workbench
%attr(0755,root,root) %{_bindir}/mysql-workbench-bin
%{_datadir}/applications/MySQLWorkbench.desktop
%{_datadir}/mysql-gui/MySQLIcon_Workbench*.png
%{_datadir}/mysql-gui/workbench/

%changelog
* Tue Nov 18 2008 mhrusecky@suse.cz
- fixed forwarding command line arguments in scripts mysql-administrator,
  mysql-query-browser and mysql-workbench [bnc#445801]
* Mon Oct 13 2008 nadvornik@suse.cz
- added libexpat-devel to BuildRequires
- do not use deprecated GTK macros
* Mon Aug 11 2008 anosek@suse.cz
- fixed Dependencies for mysql-gui-tools should be mysql-administrator,
  mysql-query-browser and mysql-workbench (bnc#415245)
  - mysql-gui-tools now recommends those three packages
* Thu Jul 31 2008 anosek@suse.cz
- added Mesa-devel to BuildRequires
* Mon Jul 14 2008 anosek@suse.cz
- used other approach to fix the (bnc#385394), reworked
  (mysql-workbench-start.patch)
* Wed Jun 25 2008 anosek@suse.cz
- fixed Mysql query browser crashes when straight_join is used
  (bnc#385394) (join.patch)
* Wed Apr 30 2008 anosek@suse.cz
- fixed mysql-workbench won't start (bnc#383751)
  (mysql-workbench-start.patch)
* Mon Apr 28 2008 anosek@suse.cz
- adjusted source code to compile with the new libsigc++-2.0 API
  (sigc.patch)
* Fri Nov 23 2007 anosek@suse.cz
- fixed: Mysql-query-browser hangs on selecting a schema [#339356]
  (mysql-query-browser-hangs.patch)
* Fri Oct 26 2007 anicka@suse.cz
- fix for gcc 4.3
* Thu May 31 2007 anosek@suse.cz
- fixed incorret string comparison (warnings.patch)
* Thu May 17 2007 anosek@suse.cz
- updated to version 5.0r12
  - fixed several bugs
* Wed Apr 11 2007 anosek@suse.cz
- updated to version 5.0r11
  - fixed several bugs
* Thu Mar 29 2007 anosek@suse.cz
- updated to version 5.0r10
- fixed build:
  * changed requirement libgtkhtml-3.8 -> 3.14
  * fixed configure.in
* Wed Jan 31 2007 anosek@suse.cz
- updated to version 5.0r9
* Mon Oct 30 2006 mjancar@suse.cz
- build aganist lua50
* Mon Oct 23 2006 ro@suse.de
- try to fix build with current lua (use pkgconfig to find lib)
* Thu Oct 12 2006 ro@suse.de
- fix missing return value (mysql-gui-tools-warnings.patch)
* Wed Oct 04 2006 anosek@suse.cz
- updated to version 5.0r4
- added mysql-workbench
- fixed some compiler warnings (mysql-gui-common-warnings.patch)
* Tue Sep 19 2006 anosek@suse.cz
- new package, version 5.0r3
- includes mysql-administrator 1.2.3rc
  mysql-query-browser 1.2.3beta
  mysql-gui-common