File mysql-workbench.spec of Package mysql-workbench
#
# spec file for package mysql-workbench (Version 5.1.16)
#
# 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: mysql-workbench
Summary: A MySQL visual modeling tool
Version: 5.1.16
Release: 2.<RELEASE2>
Group: Productivity/Databases/Clients
License: GPL v2 or later
Url: http://dev.mysql.com/downloads/workbench
# Upstream tarball without ext directory (rm -rf ext)
Source: %{name}-noext-oss-%{version}.tar.bz2
Patch1: %{name}-5.1.16-disable-bundled.patch
Patch2: %{name}-5.1.5-desktop.patch
Patch4: %{name}-5.1.10-lib-and-data-path-fix.patch
Patch6: %{name}-5.1.5-silent-mode-without-debug.patch
Patch7: %{name}-5.1.16-missing-includes.patch
Patch8: %{name}-5.1.16-ldpath.patch
Summary: A MySQL visual modeling tool
Group: Productivity/Databases/Clients
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: boost-devel gcc-c++ lua-devel
BuildRequires: glib2-devel libscintilla-devel libsigc++2-devel libxml2-devel mysql-devel
BuildRequires: FastCGI-devel java-devel libgnome-devel libzip-devel pcre-devel python-devel readline-devel
BuildRequires: Mesa-devel cairomm-devel glitz-devel gtkmm24-devel libglade2-devel libmysqlcppconn-devel php-devel
BuildRequires: dos2unix fdupes update-desktop-files
BuildRequires: cairo-devel >= 1.5.12
BuildRequires: libctemplate-devel
Requires: libmysqlcppconn1
%description
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}-noext-oss-%{version}
%patch1
%patch2
%patch4 -p1
%patch6
%patch7
%patch8
# remove bundled libraries (not present in modified tarball)
rm -rf ext
# other small fixes
touch po/POTFILES.in
# ctemplete is now ctemplate and not google anymore
for i in `grep -Rl google .`; do
sed -i 's/google/ctemplate/g' $i;
done
%build
# This package failed when testing with -Wl,-as-needed being default.
# So we disable it here, if you want to retest, just delete this comment and the line below.
export SUSE_ASNEEDED=0
# dereferencing type-punned pointer will break strict-aliasing rules
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
sh ./autogen.sh --prefix=%{_prefix} --libdir=%{_libdir}
%configure \
--enable-fastcgi \
--disable-java-modules \
--disable-php-modules \
--disable-python-modules \
--disable-static \
--disable-debug
make %{?jobs:-j%jobs}
%install
make DESTDIR=%{buildroot} install
cp plugins/README README.plugins
cp modules/README README.modules
rm -rf %{buildroot}%{_libdir}/%{name}{,/modules,/plugins}/*.la
ln -sf ../libmysqlcppconn.so.1 %{buildroot}%{_libdir}/mysql-workbench/mysqlcppconn.so
rm -f %{buildroot}%{_libdir}/%{name}/plugins/wb.model.reporting.wbp.*
install -D -m 0644 images/icons/MySQLWorkbench-48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
mv %{buildroot}%{_datadir}/applications/MySQLWorkbench.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
%fdupes -s %{_datadir}/%{name}/images
for i in ChangeLog README.plugins README.modules COPYING; do
dos2unix $i
done
%suse_update_desktop_file -i %{name}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING ChangeLog README.plugins README.modules
%{_bindir}/*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog