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

# 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
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

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.

%setup -q -n %{name}-%{version} -a1 -a2
cd mysql-administrator
cd ../mysql-query-browser
cd ../mysql-gui-common
#%patch26 ## build aganist lua50 instead
cd ..
%patch38 -p1

# 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
make %{?jobs:-j%jobs}
# query-browser
cd ../mysql-query-browser
autoreconf -f -i
%configure --with-gtkhtml=libgtkhtml-3.14
make %{?jobs:-j%jobs}
# workbench
cd ../mysql-workbench
make %{?jobs:-j%jobs}

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

rm -rf %{buildroot}

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

%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

%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

%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

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