1 |
%define build_java 1 |
2 |
%define build_autotools 1 |
3 |
%define tartype community |
4 |
%define Werror_cflags %nil |
5 |
%define _disable_ld_no_undefined 1 |
6 |
%define _default_patch_fuzz 3 |
7 |
# commandline overrides: |
8 |
# rpm -ba|--rebuild --with 'xxx' |
9 |
%{?_with_java: %{expand: %%global build_java 1}} |
10 |
%{?_without_java: %{expand: %%global build_java 0}} |
11 |
%{?_with_autotools: %{expand: %%global build_autotools 1}} |
12 |
%{?_without_autotools: %{expand: %%global build_autotools 0}} |
13 |
|
14 |
|
15 |
%global mw_version 6.1.7 |
16 |
%define rel 2 |
17 |
|
18 |
Summary: Extensible modeling tool for MySQL 5.x |
19 |
Name: mysql-workbench |
20 |
Group: Databases |
21 |
Version: %{mw_version} |
22 |
Release: %mkrel %{rel} |
23 |
License: GPL |
24 |
URL: http://wb.mysql.com |
25 |
# Upstream has a mirror redirector for downloads, so the URL is hard to |
26 |
# represent statically. You can get the tarball by following a link from |
27 |
# http://dev.mysql.com/downloads/workbench/ |
28 |
Source: http://gd.tuwien.ac.at/db/mysql/Downloads/MySQLGUITools/%{name}-%{tartype}-%{version}-nodocs-src.tar.gz |
29 |
# don't build extension, use system one |
30 |
# !!! This patch use versioned soname (libmysqlcppconn.so.6) !!! |
31 |
Patch1: %{name}-5.2.45-cppconn.patch |
32 |
# Use system ctemplate |
33 |
Patch2: %{name}-5.2.43-ctemplate.patch |
34 |
# Use system tinyxml |
35 |
Patch3: %{name}-5.2.41-tinyxml.patch |
36 |
Patch4: %{name}-5.2.33b-mysql55.patch |
37 |
#Use system antlr version |
38 |
Patch5: %{name}-5.2.43-antlr.patch |
39 |
Patch6: %{name}-gpl-5.2.31-mga-fix-ifconfig.patch |
40 |
# don't use bundled documentation, redirect to online doc |
41 |
Patch7: %{name}-5.2.45-nodocs.patch |
42 |
|
43 |
Obsoletes: mysql-workbench-oss < 5.2.30 |
44 |
Provides: mysql-workbench-oss |
45 |
Obsoletes: mysql-gui-tools < 5.1 |
46 |
Provides: mysql-gui-tools |
47 |
Obsoletes: mysql-administrator < 5.1 |
48 |
Provides: mysql-administrator |
49 |
Obsoletes: mysql-utilities |
50 |
BuildRequires: cmake |
51 |
BuildRequires: antlr3-C-devel |
52 |
BuildRequires: autoconf2.5 |
53 |
BuildRequires: boost-devel >= 1.35.0 |
54 |
BuildRequires: cairo-devel |
55 |
BuildRequires: cairomm-devel |
56 |
BuildRequires: ctemplate-devel >= 0.91 |
57 |
BuildRequires: eclipse-ecj |
58 |
BuildRequires: expat-devel |
59 |
BuildRequires: fdupes |
60 |
BuildRequires: file |
61 |
BuildRequires: freetype2-devel >= 2.1.10 |
62 |
BuildRequires: gcj-tools |
63 |
BuildRequires: gettext |
64 |
BuildRequires: gettext-devel |
65 |
BuildRequires: glib2-devel |
66 |
BuildRequires: glibmm2.4-devel |
67 |
BuildRequires: gtk2-devel |
68 |
BuildRequires: gtkhtml-3.14-devel |
69 |
BuildRequires: gtkmm2.4-devel >= 2.6 |
70 |
BuildRequires: imagemagick |
71 |
BuildRequires: iodbc-devel |
72 |
BuildRequires: jpackage-utils |
73 |
BuildRequires: junit |
74 |
BuildRequires: libext2fs-devel |
75 |
BuildRequires: libfcgi-devel |
76 |
BuildRequires: libfontconfig-devel |
77 |
BuildRequires: libglade2.0-devel >= 2.5 |
78 |
BuildRequires: libgnome2-devel |
79 |
BuildRequires: libgnome-keyring-devel |
80 |
BuildRequires: libgnomeprint-devel >= 2.2.0 |
81 |
BuildRequires: libpng-devel |
82 |
BuildRequires: libsigc++2.0-devel |
83 |
BuildRequires: libslang-devel |
84 |
BuildRequires: libtool |
85 |
BuildRequires: libuuid-devel |
86 |
BuildRequires: libx11-devel |
87 |
BuildRequires: libxext-devel |
88 |
BuildRequires: libxml2-devel |
89 |
BuildRequires: libxrender-devel |
90 |
BuildRequires: libzip-devel |
91 |
BuildRequires: lua5.1-devel |
92 |
BuildRequires: mesagl-devel |
93 |
BuildRequires: mesaglu-devel |
94 |
BuildRequires: mysql-connector-c++-devel |
95 |
BuildRequires: mariadb-devel >= 5.0 |
96 |
BuildRequires: mariadb-embedded-devel |
97 |
BuildRequires: ncurses-devel |
98 |
BuildRequires: openssl-devel |
99 |
BuildRequires: pcre-devel >= 5.0 |
100 |
BuildRequires: pixman-devel >= 0.11.2 |
101 |
BuildRequires: pkgconfig |
102 |
BuildRequires: python-devel |
103 |
BuildRequires: readline-devel |
104 |
BuildRequires: scintilla-devel |
105 |
BuildRequires: termcap-devel |
106 |
BuildRequires: sqlite3-devel |
107 |
BuildRequires: swig |
108 |
BuildRequires: tinyxml-devel |
109 |
BuildRequires: pcrecpp-devel |
110 |
BuildRequires: vsqlite++-devel |
111 |
%if %{build_java} |
112 |
%endif |
113 |
# requires mysql-client (for mysqldump and mysql cmdline client) |
114 |
Requires: mysql-client |
115 |
Requires: gnome-keyring |
116 |
Requires: python-paramiko |
117 |
Requires: python-pexpect |
118 |
Requires: libiodbc-admin |
119 |
Recommends: mysql-utilities |
120 |
|
121 |
%description |
122 |
MySQL Workbench is modeling tool that allows you to design and generate MySQL |
123 |
databases graphically. |
124 |
|
125 |
MySQL Workbench requires OpenGL and a 3D accelerated graphics card with at |
126 |
least 16MB of memory. |
127 |
|
128 |
%package -n mysql-utilities |
129 |
Summary: Scripts for managing and administering MySQL servers |
130 |
# Not yet published (else will be package separatly) |
131 |
# see ext/mysql-utilities/CHANGES.txt |
132 |
Version: 1.0.0 |
133 |
Release: %mkrel 0.%{mw_version}.%{rel} |
134 |
BuildRequires: python-devel >= 2.4 |
135 |
BuildRequires: python-sphinx >= 1.0 |
136 |
Requires: mysql-connector-python |
137 |
|
138 |
%description -n mysql-utilities |
139 |
MySQL Utilities contain a collection of scripts useful for managing |
140 |
and administering MySQL servers. |
141 |
|
142 |
%prep |
143 |
%setup -q -n mysql-workbench-%{tartype}-%{mw_version}-nodocs-src |
144 |
#patch1 -p1 -b .cppconn |
145 |
#patch2 -p1 -b .ctemplate |
146 |
#patch3 -p1 -b .tinyxml |
147 |
#patch4 -p0 -b .mysql55 |
148 |
#patch5 -p1 -b .antlr |
149 |
#patch6 -p0 -b .ifconfig |
150 |
#patch7 -p1 -b .nodocs |
151 |
|
152 |
# lib64 fix |
153 |
perl -pi -e "s|/lib/|/%{_lib}/|g" frontend/linux/workbench/program.cpp |
154 |
|
155 |
touch -r COPYING .timestamp4rpm |
156 |
%{__sed} -i -e 's/\r//g' COPYING |
157 |
touch -r .timestamp4rpm COPYING |
158 |
|
159 |
%build |
160 |
#export CPPFLAGS="$CPPFLAGS `pkg-config --cflags scintilla`" |
161 |
export LDFLAGS="$LDFlAGS -lmysqld" |
162 |
%cmake .. |
163 |
|
164 |
|
165 |
%if %{build_autotools} |
166 |
#NOCONFIGURE=yes ./autogen.sh |
167 |
%endif |
168 |
%define _disable_ld_no_undefined 1 |
169 |
export CXXFLAGS="$RPM_OPT_FLAGS -fpermissive" |
170 |
|
171 |
#fgrep -rlZ pkglib_DATA --include Makefile.am . | xargs -0 sed -i 's/pkglib_DATA/pkgdata_DATA/g' |
172 |
# antibork |
173 |
#find -type f -name Makefile | xargs perl -pi -e "s|-Wl,--as-needed||g" |
174 |
|
175 |
# use the shared libs |
176 |
#find -type f -name Makefile | xargs perl -pi -e "s|%{_libdir}/python%{pyver}/config/libpython%{pyver}.a|-lpython%{pyver}|g" |
177 |
|
178 |
%make |
179 |
|
180 |
|
181 |
%install |
182 |
touch LICENSE.mysql |
183 |
pushd build |
184 |
%makeinstall_std |
185 |
popd |
186 |
|
187 |
# construct a clean and correct wrapper |
188 |
cat > %{buildroot}%{_bindir}/mysql-workbench << EOF |
189 |
#!/bin/bash |
190 |
export LD_LIBRARY_PATH="%{_libdir}/mysql-workbench:\$LD_LIBRARY_PATH" |
191 |
export MWB_DATA_DIR="%{_datadir}/mysql-workbench" |
192 |
export MWB_LIBRARY_DIR="%{_datadir}/mysql-workbench/libraries" |
193 |
export MWB_MODULE_DIR="%{_libdir}/mysql-workbench/modules" |
194 |
export MWB_PLUGIN_DIR="%{_libdir}/mysql-workbench/plugins" |
195 |
export DBC_DRIVER_PATH="%{_libdir}/mysql-workbench" |
196 |
export MWB_BINARIES_DIR="%{_bindir}" |
197 |
%{_bindir}/mysql-workbench-bin \$* |
198 |
EOF |
199 |
|
200 |
# fix some menu entries and stuff... |
201 |
install -d %{buildroot}%{_miconsdir} |
202 |
install -d %{buildroot}%{_iconsdir} |
203 |
install -d %{buildroot}%{_liconsdir} |
204 |
|
205 |
install -d %{buildroot}%{_datadir}/applications |
206 |
rm -f %{buildroot}%{_datadir}/applications/MySQLWorkbench.desktop |
207 |
cat > %{buildroot}%{_datadir}/applications/mysql-workbench.desktop << EOF |
208 |
[Desktop Entry] |
209 |
Name=MySQL Workbench |
210 |
Comment=MySQL Database Design Tool |
211 |
Exec=%{_bindir}/mysql-workbench |
212 |
Terminal=false |
213 |
Type=Application |
214 |
Icon=mysql-workbench |
215 |
Categories=Database;Office; |
216 |
EOF |
217 |
|
218 |
# make some icons |
219 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-128.png -resize 16x16 %{buildroot}%{_miconsdir}/mysql-workbench.png |
220 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-128.png -resize 32x32 %{buildroot}%{_iconsdir}/mysql-workbench.png |
221 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-128.png -resize 48x48 %{buildroot}%{_liconsdir}/mysql-workbench.png |
222 |
|
223 |
# cleanup |
224 |
#rm -f %{buildroot}%{_libdir}/mysql-workbench/*.*a |
225 |
#rm -f %{buildroot}%{_libdir}/mysql-workbench/lib*.so |
226 |
#rm -f %{buildroot}%{_libdir}/mysql-workbench/modules/*.*a |
227 |
#rm -f %{buildroot}%{_libdir}/mysql-workbench/plugins/*.*a |
228 |
|
229 |
%files |
230 |
# NEWS and ChangeLog are empty or outdated |
231 |
%doc AUTHORS COPYING COPYING.LGPL README samples |
232 |
%{_bindir}/%{name} |
233 |
%{_bindir}/%{name}-bin |
234 |
#/etc/ld.so.conf.d/mysql-workbench.conf |
235 |
%{_bindir}/wbcopytables |
236 |
%{_datadir}/applications/mysql-workbench.desktop |
237 |
%{_miconsdir}/mysql-workbench.png |
238 |
%{_iconsdir}/mysql-workbench.png |
239 |
%{_liconsdir}/mysql-workbench.png |
240 |
%{_iconsdir}/hicolor/* |
241 |
%{_libdir}/%{name} |
242 |
%{_datadir}/%{name} |
243 |
%{_datadir}/mime/packages/* |
244 |
%{_datadir}/mime-info/* |
245 |
#%exclude %{_datadir}/doc/%{name} |
246 |
|