1 |
%define build_java 1 |
2 |
%define build_autotools 1 |
3 |
|
4 |
# commandline overrides: |
5 |
# rpm -ba|--rebuild --with 'xxx' |
6 |
%{?_with_java: %{expand: %%global build_java 1}} |
7 |
%{?_without_java: %{expand: %%global build_java 0}} |
8 |
%{?_with_autotools: %{expand: %%global build_autotools 1}} |
9 |
%{?_without_autotools: %{expand: %%global build_autotools 0}} |
10 |
|
11 |
Summary: Extensible modeling tool for MySQL 5.x |
12 |
Name: mysql-workbench |
13 |
Group: Databases |
14 |
Version: 5.2.30 |
15 |
Release: %mkrel 1 |
16 |
License: GPL |
17 |
URL: http://wb.mysql.com |
18 |
# Upstream has a mirror redirector for downloads, so the URL is hard to |
19 |
# represent statically. You can get the tarball by following a link from |
20 |
# http://dev.mysql.com/downloads/workbench/ |
21 |
Source: http://gd.tuwien.ac.at/db/mysql/Downloads/MySQLGUITools/%{name}-%{tartype}-%{version}%{?postver}.tar.gz |
22 |
# don't build extension, use system one |
23 |
# !!! This patch use versioned soname (libmysqlcppconn.so.5) !!! |
24 |
Patch1: %{name}-5.2.28-cppconn.patch |
25 |
Patch2: %{name}-5.2.27-ctemplate.patch |
26 |
Patch3: %{name}-5.2.28-tinyxml.patch |
27 |
Patch4: %{name}-5.2.30-mysql55.patch |
28 |
Patch5: %{name}-5.2.30-gcc.patch |
29 |
Obsoletes: mysql-workbench-oss < 5.2.30 |
30 |
Provides: mysql-workbench-oss |
31 |
BuildRequires: autoconf2.5 |
32 |
BuildRequires: boost-devel >= 1.35.0 |
33 |
BuildRequires: cairo-devel |
34 |
BuildRequires: cairomm-devel |
35 |
BuildRequires: ctemplate-devel >= 0.91 |
36 |
BuildRequires: expat-devel |
37 |
BuildRequires: fdupes |
38 |
BuildRequires: file |
39 |
BuildRequires: freetype2-devel >= 2.1.10 |
40 |
BuildRequires: gettext |
41 |
BuildRequires: gettext-devel |
42 |
BuildRequires: glib2-devel |
43 |
BuildRequires: glibmm2.4-devel |
44 |
BuildRequires: glitz-devel |
45 |
BuildRequires: gtk2-devel |
46 |
BuildRequires: gtkhtml-3.14-devel |
47 |
BuildRequires: gtkmm2.4-devel >= 2.6 |
48 |
BuildRequires: imagemagick |
49 |
BuildRequires: libext2fs-devel |
50 |
BuildRequires: libfcgi-devel |
51 |
BuildRequires: libfontconfig-devel |
52 |
BuildRequires: libglade2.0-devel >= 2.5 |
53 |
BuildRequires: libgnome2-devel |
54 |
BuildRequires: libgnomeprint-devel >= 2.2.0 |
55 |
BuildRequires: libpng-devel |
56 |
BuildRequires: libsigc++2.0-devel |
57 |
BuildRequires: libslang-devel |
58 |
BuildRequires: libtool |
59 |
BuildRequires: libuuid-devel |
60 |
BuildRequires: libx11-devel |
61 |
BuildRequires: libxext-devel |
62 |
BuildRequires: libxml2-devel |
63 |
BuildRequires: libxrender-devel |
64 |
BuildRequires: libzip-devel |
65 |
BuildRequires: lua5.1-devel |
66 |
BuildRequires: mesagl-devel |
67 |
BuildRequires: mesaglu-devel |
68 |
BuildRequires: mysql-connector-c++-devel |
69 |
BuildRequires: mysql-devel >= 5.0 |
70 |
BuildRequires: ncurses-devel |
71 |
BuildRequires: openssl-devel |
72 |
BuildRequires: pcre-devel >= 5.0 |
73 |
BuildRequires: pixman-devel >= 0.11.2 |
74 |
BuildRequires: pkgconfig |
75 |
BuildRequires: python-devel |
76 |
BuildRequires: readline-devel |
77 |
BuildRequires: scintilla-devel |
78 |
BuildRequires: termcap-devel |
79 |
BuildRequires: sqlite3-devel |
80 |
BuildRequires: libgnome-keyring-devel |
81 |
%if %{build_java} |
82 |
BuildRequires: junit |
83 |
BuildRequires: eclipse-ecj |
84 |
BuildRequires: gcj-tools |
85 |
BuildRequires: jpackage-utils |
86 |
%endif |
87 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
88 |
|
89 |
%description |
90 |
MySQL Workbench is modeling tool that allows you to design and generate MySQL |
91 |
databases graphically. |
92 |
|
93 |
MySQL Workbench requires OpenGL and a 3D accelerated graphics card with at |
94 |
least 16MB of memory. |
95 |
|
96 |
%prep |
97 |
|
98 |
%setup -q -n mysql-workbench-gpl-%{version} |
99 |
%patch1 -p1 -b .cppconn |
100 |
%patch2 -p1 -b .ctemplate |
101 |
%patch3 -p1 -b .tinyxml |
102 |
%patch4 -p1 -b .mysql55 |
103 |
%patch5 -p1 -b .gcc46 |
104 |
|
105 |
# lib64 fix |
106 |
perl -pi -e "s|/lib/|/%{_lib}/|g" frontend/linux/workbench/program.cpp |
107 |
|
108 |
# other small fixes |
109 |
#touch po/POTFILES.in |
110 |
|
111 |
# ctemplete is now ctemplate and not google anymore |
112 |
for i in `grep -Rl google .`; do |
113 |
sed -i 's/google/ctemplate/g' $i; |
114 |
done |
115 |
|
116 |
%build |
117 |
#export CPPFLAGS="$CPPFLAGS `pkg-config --cflags scintilla`" |
118 |
|
119 |
%if %{build_autotools} |
120 |
NOCONFIGURE=yes ./autogen.sh |
121 |
%endif |
122 |
%define _disable_ld_no_undefined 1 |
123 |
%configure2_5x --disable-static |
124 |
|
125 |
# antibork |
126 |
#find -type f -name Makefile | xargs perl -pi -e "s|-Wl,--as-needed||g" |
127 |
|
128 |
# use the shared libs |
129 |
#find -type f -name Makefile | xargs perl -pi -e "s|%{_libdir}/python%{pyver}/config/libpython%{pyver}.a|-lpython%{pyver}|g" |
130 |
|
131 |
%make |
132 |
|
133 |
%install |
134 |
rm -rf %{buildroot} |
135 |
|
136 |
%makeinstall_std |
137 |
|
138 |
# construct a clean and correct wrapper |
139 |
cat > %{buildroot}%{_bindir}/mysql-workbench << EOF |
140 |
#!/bin/bash |
141 |
export LD_LIBRARY_PATH="%{_libdir}/mysql-workbench:\$LD_LIBRARY_PATH" |
142 |
export MWB_DATA_DIR="%{_datadir}/mysql-workbench" |
143 |
export MWB_LIBRARY_DIR="%{_datadir}/mysql-workbench/libraries" |
144 |
export MWB_MODULE_DIR="%{_libdir}/mysql-workbench/modules" |
145 |
export MWB_PLUGIN_DIR="%{_libdir}/mysql-workbench/plugins" |
146 |
export DBC_DRIVER_PATH="%{_libdir}/mysql-workbench" |
147 |
%{_bindir}/mysql-workbench-bin \$* |
148 |
EOF |
149 |
|
150 |
# fix some menu entries and stuff... |
151 |
install -d %{buildroot}%{_miconsdir} |
152 |
install -d %{buildroot}%{_iconsdir} |
153 |
install -d %{buildroot}%{_liconsdir} |
154 |
|
155 |
install -d %{buildroot}%{_datadir}/applications |
156 |
rm -f %{buildroot}%{_datadir}/applications/MySQLWorkbench.desktop |
157 |
cat > %{buildroot}%{_datadir}/applications/mysql-workbench.desktop << EOF |
158 |
[Desktop Entry] |
159 |
Name=MySQL Workbench |
160 |
Comment=MySQL Database Design Tool |
161 |
Exec=%{_bindir}/mysql-workbench |
162 |
Terminal=false |
163 |
Type=Application |
164 |
Icon=mysql-workbench |
165 |
Categories=Database;Office; |
166 |
EOF |
167 |
|
168 |
# make some icons |
169 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-48.png -resize 16x16 %{buildroot}%{_miconsdir}/mysql-workbench.png |
170 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-48.png -resize 32x32 %{buildroot}%{_iconsdir}/mysql-workbench.png |
171 |
convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-48.png -resize 48x48 %{buildroot}%{_liconsdir}/mysql-workbench.png |
172 |
|
173 |
# cleanup |
174 |
rm -f %{buildroot}%{_libdir}/mysql-workbench/*.*a |
175 |
rm -f %{buildroot}%{_libdir}/mysql-workbench/lib*.so |
176 |
rm -f %{buildroot}%{_libdir}/mysql-workbench/modules/*.*a |
177 |
rm -f %{buildroot}%{_libdir}/mysql-workbench/plugins/*.*a |
178 |
|
179 |
%clean |
180 |
rm -rf %{buildroot} |
181 |
|
182 |
%files |
183 |
%defattr(-,root,root) |
184 |
%doc COPYING ChangeLog README |
185 |
%{_bindir}/* |
186 |
%{_libdir}/mysql-workbench/lib*.so.* |
187 |
%{_libdir}/mysql-workbench/mysqlcppconn.so |
188 |
%{_libdir}/mysql-workbench/modules |
189 |
%{_libdir}/mysql-workbench/plugins |
190 |
%{_datadir}/mysql-workbench |
191 |
%{_datadir}/applications/mysql-workbench.desktop |
192 |
%{_iconsdir}/mysql-workbench.png |
193 |
%{_liconsdir}/mysql-workbench.png |
194 |
%{_miconsdir}/mysql-workbench.png |
195 |
|
196 |
|