/[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 61371 - (show annotations) (download)
Mon Feb 28 02:25:40 2011 UTC (13 years, 1 month ago) by ahmad
Original Path: cauldron/mysql-workbench/current/SPECS/mysql-workbench.spec
File size: 6284 byte(s)
- update to 5.2.31a
- rediff patch1,2,3
- add BR mysql-connector-c++-devel
- update the file list

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 1
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 BuildRequires: mysql-connector-c++-devel
86 %if %{build_java}
87 BuildRequires: junit
88 BuildRequires: eclipse-ecj
89 BuildRequires: gcj-tools
90 BuildRequires: jpackage-utils
91 %endif
92
93 %description
94 MySQL Workbench is modeling tool that allows you to design and generate MySQL
95 databases graphically.
96
97 MySQL Workbench requires OpenGL and a 3D accelerated graphics card with at
98 least 16MB of memory.
99
100 %prep
101
102 %setup -q -n mysql-workbench-gpl-%{version}-src
103 %patch1 -p1 -b .cppconn
104 %patch2 -p1 -b .ctemplate
105 %patch3 -p1 -b .tinyxml
106 %patch4 -p1 -b .mysql55
107 #%patch5 -p1 -b .gcc46
108
109 # lib64 fix
110 perl -pi -e "s|/lib/|/%{_lib}/|g" frontend/linux/workbench/program.cpp
111
112 # other small fixes
113 #touch po/POTFILES.in
114
115 # ctemplete is now ctemplate and not google anymore
116 for i in `grep -Rl google .`; do
117 sed -i 's/google/ctemplate/g' $i;
118 done
119
120 %build
121 #export CPPFLAGS="$CPPFLAGS `pkg-config --cflags scintilla`"
122
123 %if %{build_autotools}
124 NOCONFIGURE=yes ./autogen.sh
125 %endif
126 %define _disable_ld_no_undefined 1
127 #export CXXFLAGS="$RPM_OPT_FLAGS -fpermissive"
128 %configure2_5x --disable-static --disable-debug
129
130 # antibork
131 #find -type f -name Makefile | xargs perl -pi -e "s|-Wl,--as-needed||g"
132
133 # use the shared libs
134 #find -type f -name Makefile | xargs perl -pi -e "s|%{_libdir}/python%{pyver}/config/libpython%{pyver}.a|-lpython%{pyver}|g"
135
136 %make
137
138 %install
139 rm -rf %{buildroot}
140
141 %makeinstall_std
142
143 # construct a clean and correct wrapper
144 cat > %{buildroot}%{_bindir}/mysql-workbench << EOF
145 #!/bin/bash
146 export LD_LIBRARY_PATH="%{_libdir}/mysql-workbench:\$LD_LIBRARY_PATH"
147 export MWB_DATA_DIR="%{_datadir}/mysql-workbench"
148 export MWB_LIBRARY_DIR="%{_datadir}/mysql-workbench/libraries"
149 export MWB_MODULE_DIR="%{_libdir}/mysql-workbench/modules"
150 export MWB_PLUGIN_DIR="%{_libdir}/mysql-workbench/plugins"
151 export DBC_DRIVER_PATH="%{_libdir}/mysql-workbench"
152 %{_bindir}/mysql-workbench-bin \$*
153 EOF
154
155 # fix some menu entries and stuff...
156 install -d %{buildroot}%{_miconsdir}
157 install -d %{buildroot}%{_iconsdir}
158 install -d %{buildroot}%{_liconsdir}
159
160 install -d %{buildroot}%{_datadir}/applications
161 rm -f %{buildroot}%{_datadir}/applications/MySQLWorkbench.desktop
162 cat > %{buildroot}%{_datadir}/applications/mysql-workbench.desktop << EOF
163 [Desktop Entry]
164 Name=MySQL Workbench
165 Comment=MySQL Database Design Tool
166 Exec=%{_bindir}/mysql-workbench
167 Terminal=false
168 Type=Application
169 Icon=mysql-workbench
170 Categories=Database;Office;
171 EOF
172
173 # make some icons
174 convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-48.png -resize 16x16 %{buildroot}%{_miconsdir}/mysql-workbench.png
175 convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-48.png -resize 32x32 %{buildroot}%{_iconsdir}/mysql-workbench.png
176 convert %{buildroot}%{_datadir}/mysql-workbench/images/MySQLWorkbench-48.png -resize 48x48 %{buildroot}%{_liconsdir}/mysql-workbench.png
177
178 # cleanup
179 rm -f %{buildroot}%{_libdir}/mysql-workbench/*.*a
180 rm -f %{buildroot}%{_libdir}/mysql-workbench/lib*.so
181 rm -f %{buildroot}%{_libdir}/mysql-workbench/modules/*.*a
182 rm -f %{buildroot}%{_libdir}/mysql-workbench/plugins/*.*a
183
184 %clean
185 rm -rf %{buildroot}
186
187 %files
188 %defattr(-,root,root)
189 %doc COPYING ChangeLog README
190 %{_bindir}/*
191 %{_libdir}/mysql-workbench/lib*.so.*
192 %{_libdir}/mysql-workbench/modules
193 %{_libdir}/mysql-workbench/plugins
194 %{_datadir}/mysql-workbench
195 %{_datadir}/applications/mysql-workbench.desktop
196 %{_iconsdir}/mysql-workbench.png
197 %{_liconsdir}/mysql-workbench.png
198 %{_miconsdir}/mysql-workbench.png

  ViewVC Help
Powered by ViewVC 1.1.30