/[packages]/updates/5/mysql-workbench/current/SPECS/mysql-workbench.spec
ViewVC logotype

Contents of /updates/5/mysql-workbench/current/SPECS/mysql-workbench.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30