1 |
%define tartype community |
2 |
|
3 |
%define Werror_cflags %nil |
4 |
|
5 |
%define _disable_ld_no_undefined 1 |
6 |
|
7 |
Summary: A MySQL visual database modeling, administration, development and migration tool |
8 |
Name: mysql-workbench |
9 |
Group: Databases |
10 |
Version: 6.3.9 |
11 |
Release: %mkrel 1 |
12 |
License: GPLv2 |
13 |
URL: http://wb.mysql.com |
14 |
Source0: http://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-%{tartype}-%{version}-src.tar.gz |
15 |
Source1: http://www.antlr3.org/download/antlr-3.4-complete.jar |
16 |
# From Arch Linux |
17 |
Patch0001: 0001-mysql-workbench-no-check-for-updates.patch |
18 |
Patch0002: 0002-disable-unsupported-operating-system-warning.patch |
19 |
Patch0003: 0003-add-option-to-hide-nonstandard-server-warning.patch |
20 |
Patch0004: 0004-fix-build-for-i686.patch |
21 |
|
22 |
Patch0005: mysql-workbench-community-6.3.9-fix-build.patch |
23 |
|
24 |
Obsoletes: mysql-workbench-oss < 5.2.30 |
25 |
Provides: mysql-workbench |
26 |
Obsoletes: mysql-gui-tools < 5.1 |
27 |
Provides: mysql-gui-tools |
28 |
Obsoletes: mysql-administrator < 5.1 |
29 |
Provides: mysql-administrator |
30 |
Obsoletes: mysql-utilities |
31 |
BuildRequires: ant |
32 |
BuildRequires: ant-antlr |
33 |
BuildRequires: antlr3-C-devel |
34 |
BuildRequires: autoconf2.5 |
35 |
BuildRequires: boost-devel >= 1.35.0 |
36 |
BuildRequires: cairo-devel |
37 |
BuildRequires: cairomm-devel |
38 |
BuildRequires: cmake |
39 |
BuildRequires: ctemplate-devel >= 0.91 |
40 |
BuildRequires: ecj |
41 |
BuildRequires: expat-devel |
42 |
BuildRequires: fdupes |
43 |
BuildRequires: file |
44 |
BuildRequires: freetype2-devel >= 2.1.10 |
45 |
BuildRequires: gcj-tools |
46 |
BuildRequires: gdal-devel |
47 |
BuildRequires: gettext |
48 |
BuildRequires: gettext-devel |
49 |
BuildRequires: glib2-devel |
50 |
BuildRequires: glibmm2.4-devel |
51 |
BuildRequires: gtk2-devel |
52 |
BuildRequires: gtkhtml-3.14-devel |
53 |
BuildRequires: gtkmm2.4-devel >= 2.6 |
54 |
BuildRequires: imagemagick |
55 |
BuildRequires: iodbc-devel |
56 |
BuildRequires: jpackage-utils |
57 |
BuildRequires: junit |
58 |
BuildRequires: libext2fs-devel |
59 |
BuildRequires: libfcgi-devel |
60 |
BuildRequires: libfontconfig-devel |
61 |
BuildRequires: libglade2.0-devel >= 2.5 |
62 |
BuildRequires: libgnome2-devel |
63 |
BuildRequires: libgnome-keyring-devel |
64 |
BuildRequires: libgnomeprint-devel >= 2.2.0 |
65 |
BuildRequires: libpng-devel |
66 |
BuildRequires: libsigc++2.0-devel |
67 |
BuildRequires: libslang-devel |
68 |
BuildRequires: libtool |
69 |
BuildRequires: libuuid-devel |
70 |
BuildRequires: libx11-devel |
71 |
BuildRequires: libxext-devel |
72 |
BuildRequires: libxml2-devel |
73 |
BuildRequires: libxrender-devel |
74 |
BuildRequires: libzip-devel |
75 |
BuildRequires: lua5.1-devel |
76 |
BuildRequires: mariadb-devel >= 5.0 |
77 |
BuildRequires: mariadb-embedded-devel |
78 |
BuildRequires: mesagl-devel |
79 |
BuildRequires: mesaglu-devel |
80 |
BuildRequires: mysql-connector-c++-devel >= 1.1.8 |
81 |
BuildRequires: ncurses-devel |
82 |
BuildRequires: openssl-devel |
83 |
BuildRequires: pcrecpp-devel |
84 |
BuildRequires: pcre-devel >= 5.0 |
85 |
BuildRequires: pixman-devel >= 0.11.2 |
86 |
BuildRequires: pkgconfig |
87 |
BuildRequires: python-devel |
88 |
BuildRequires: python-paramiko |
89 |
BuildRequires: readline-devel |
90 |
BuildRequires: scintilla-devel |
91 |
BuildRequires: sqlite3-devel |
92 |
BuildRequires: swig |
93 |
BuildRequires: termcap-devel |
94 |
BuildRequires: tinyxml-devel |
95 |
BuildRequires: vsqlite++-devel |
96 |
BuildRequires: pkgconfig(gtkmm-3.0) |
97 |
|
98 |
# requires mysql-client (for mysqldump and mysql cmdline client) |
99 |
Requires: mysql-client |
100 |
Requires: gnome-keyring |
101 |
Requires: python-paramiko |
102 |
Requires: python-pexpect |
103 |
Requires: libiodbc-admin |
104 |
|
105 |
|
106 |
%description |
107 |
MySQL Workbench is a unified visual tool for database architects, developers, |
108 |
and DBAs. MySQL Workbench provides data modeling, SQL development, and |
109 |
comprehensive administration tools for server configuration, user |
110 |
administration, backup, and much more. MySQL Workbench is available on |
111 |
Windows, Linux and Mac OS X |
112 |
This is the %{tartype} build. |
113 |
|
114 |
|
115 |
%prep |
116 |
mkdir -p linux-res/bin/ |
117 |
cp %{SOURCE1} linux-res/bin/ |
118 |
%setup -q -n mysql-workbench-%{tartype}-%{version}-src |
119 |
%autopatch -p1 |
120 |
|
121 |
sed -ie 's/ReloadIfChanged/ReloadAllIfChanged/g' backend/wbpublic/sqlide/recordset_text_storage.cpp |
122 |
|
123 |
# make cmake happy with mariadb |
124 |
sed -i '/^find_package(MySQL /c find_package(MySQL REQUIRED)' \ |
125 |
CMakeLists.txt |
126 |
|
127 |
# we need python 2.x |
128 |
sed -i '/^FIND_PROGRAM(PYTHON_EXEC /c FIND_PROGRAM(PYTHON_EXEC "python2")' \ |
129 |
CMakeLists.txt |
130 |
|
131 |
# fix GDAL |
132 |
sed -i '/#include/s|gdal/||' \ |
133 |
backend/wbpublic/grtui/geom_draw_box.h \ |
134 |
backend/wbpublic/grt/spatial_handler.h \ |
135 |
backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp |
136 |
|
137 |
# fix build with boost 1.55 |
138 |
sed -i '/boost_fix.cpp/d' \ |
139 |
library/base/CMakeLists.txt |
140 |
|
141 |
# put antlr into place |
142 |
install -D %{_sourcedir}/antlr-3.4-complete.jar linux-res/bin/antlr-3.4-complete.jar |
143 |
|
144 |
%build |
145 |
export CXXFLAGS="%{optflags} -Wno-missing-field-initializers -fpermissive -std=c++11" |
146 |
%cmake |
147 |
%make |
148 |
|
149 |
%install |
150 |
touch LICENSE.mysql |
151 |
%make_install -C build |
152 |
|
153 |
# construct a clean and correct wrapper |
154 |
cat > %{buildroot}%{_bindir}/mysql-workbench << EOF |
155 |
#!/bin/bash |
156 |
export LD_LIBRARY_PATH="%{_libdir}/mysql-workbench:\$LD_LIBRARY_PATH" |
157 |
export MWB_DATA_DIR="%{_datadir}/mysql-workbench" |
158 |
export MWB_LIBRARY_DIR="%{_datadir}/mysql-workbench/libraries" |
159 |
export MWB_MODULE_DIR="%{_libdir}/mysql-workbench/modules" |
160 |
export MWB_PLUGIN_DIR="%{_libdir}/mysql-workbench/plugins" |
161 |
export DBC_DRIVER_PATH="%{_libdir}/mysql-workbench" |
162 |
export MWB_BINARIES_DIR="%{_bindir}" |
163 |
%{_bindir}/mysql-workbench-bin \$* |
164 |
EOF |
165 |
|
166 |
# fix some menu entries and stuff... |
167 |
install -d %{buildroot}%{_miconsdir} |
168 |
install -d %{buildroot}%{_iconsdir} |
169 |
install -d %{buildroot}%{_liconsdir} |
170 |
|
171 |
install -d %{buildroot}%{_datadir}/applications |
172 |
rm -f %{buildroot}%{_datadir}/applications/MySQLWorkbench.desktop |
173 |
cat > %{buildroot}%{_datadir}/applications/mysql-workbench.desktop << EOF |
174 |
[Desktop Entry] |
175 |
Name=MySQL Workbench |
176 |
Comment=MySQL Database Design Tool |
177 |
Exec=%{_bindir}/mysql-workbench |
178 |
Terminal=false |
179 |
Type=Application |
180 |
Icon=mysql-workbench |
181 |
Categories=Database;Office; |
182 |
EOF |
183 |
|
184 |
# make some icons |
185 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-128.png -resize 16x16 %{buildroot}%{_miconsdir}/mysql-workbench.png |
186 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-128.png -resize 32x32 %{buildroot}%{_iconsdir}/mysql-workbench.png |
187 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-128.png -resize 48x48 %{buildroot}%{_liconsdir}/mysql-workbench.png |
188 |
|
189 |
# cleanup static libs |
190 |
rm -f %{buildroot}%{_libdir}/mysql-workbench/*.*a |
191 |
#rm -f %%{buildroot}%%{_libdir}/mysql-workbench/lib*.so |
192 |
rm -f %{buildroot}%{_libdir}/mysql-workbench/modules/*.*a |
193 |
rm -f %{buildroot}%{_libdir}/mysql-workbench/plugins/*.*a |
194 |
|
195 |
%files |
196 |
%doc AUTHORS COPYING COPYING.LGPL README samples |
197 |
%{_bindir}/%{name} |
198 |
%{_bindir}/%{name}-bin |
199 |
%{_bindir}/wbcopytables-bin |
200 |
%{_bindir}/wbcopytables |
201 |
%{_datadir}/applications/mysql-workbench.desktop |
202 |
%{_miconsdir}/mysql-workbench.png |
203 |
%{_iconsdir}/mysql-workbench.png |
204 |
%{_liconsdir}/mysql-workbench.png |
205 |
%{_iconsdir}/hicolor/* |
206 |
%{_libdir}/%{name} |
207 |
%{_datadir}/%{name} |
208 |
%{_datadir}/mime/packages/* |
209 |
%{_datadir}/mime-info/* |