rpms/mysql/devel mysql.spec,1.108,1.109
Tom Lane
tgl at fedoraproject.org
Wed Oct 1 23:18:29 UTC 2008
Author: tgl
Update of /cvs/pkgs/rpms/mysql/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11687
Modified Files:
mysql.spec
Log Message:
Build mysql's embedded server library.
Index: mysql.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mysql/devel/mysql.spec,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- mysql.spec 23 Aug 2008 20:31:19 -0000 1.108
+++ mysql.spec 1 Oct 2008 23:17:59 -0000 1.109
@@ -1,6 +1,6 @@
Name: mysql
Version: 5.0.67
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: MySQL client programs and shared libraries
Group: Applications/Databases
URL: http://www.mysql.com
@@ -116,6 +116,28 @@
package contains the libraries and header files that are needed for
developing MySQL client applications.
+%package embedded
+
+Summary: MySQL as an embeddable library
+Group: Applications/Databases
+
+%description embedded
+MySQL is a multi-user, multi-threaded SQL database server. This
+package contains a version of the MySQL server that can be embedded
+into a client application instead of running as a separate process.
+
+%package embedded-devel
+
+Summary: Development files for MySQL as an embeddable library
+Group: Applications/Databases
+Requires: %{name}-embedded = %{version}-%{release}
+Requires: %{name}-devel = %{version}-%{release}
+
+%description embedded-devel
+MySQL is a multi-user, multi-threaded SQL database server. This
+package contains files needed for developing and testing with
+the embedded version of the MySQL server.
+
%package bench
Summary: MySQL benchmark scripts and data
@@ -168,11 +190,8 @@
# MySQL 4.1.10 definitely doesn't work under strict aliasing; also,
# gcc 4.1 breaks MySQL 5.0.16 without -fwrapv
CFLAGS="$CFLAGS -fno-strict-aliasing -fwrapv"
-%ifarch alpha
-# Can't link C++ objects into an executable without this. Odd!
-# -ECL 2002-12-19
+# force PIC mode so that we can build libmysqld.so
CFLAGS="$CFLAGS -fPIC"
-%endif
CXXFLAGS="$CFLAGS -fno-rtti -fno-exceptions"
export CFLAGS CXXFLAGS
@@ -182,6 +201,7 @@
--without-debug \
--enable-shared \
--with-bench \
+ --with-embedded-server \
--localstatedir=/var/lib/mysql \
--with-unix-socket-path=/var/lib/mysql/mysql.sock \
--with-mysqld-user="mysql" \
@@ -200,6 +220,16 @@
# Not enabling assembler
make %{?_smp_mflags}
+
+# regular build will make libmysqld.a but not libmysqld.so :-(
+mkdir libmysqld/work
+cd libmysqld/work
+ar -x ../libmysqld.a
+gcc -shared -Wl,-soname,libmysqld.so.0 -o libmysqld.so.0.0.1 *.o \
+ ../../bdb/build_unix/libdb.a -lpthread -lcrypt -lnsl -lssl -lcrypto -lrt -lstdc++ -lm -lc
+cd ../..
+
+%check
make check
%if %runselftest
@@ -260,6 +290,11 @@
mv ${RPM_BUILD_ROOT}%{_bindir}/mysql_config ${RPM_BUILD_ROOT}%{_libdir}/mysql/mysql_config
install -m 0755 scriptstub ${RPM_BUILD_ROOT}%{_bindir}/mysql_config
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.a
+install -m 0755 libmysqld/work/libmysqld.so.0.0.1 ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.so.0.0.1
+ln -s libmysqld.so.0.0.1 ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.so.0
+ln -s libmysqld.so.0 ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqld.so
+
rm -f ${RPM_BUILD_ROOT}%{_bindir}/comp_err
rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/comp_err.1*
rm -f ${RPM_BUILD_ROOT}%{_bindir}/make_win_binary_distribution
@@ -568,6 +603,18 @@
%{_libdir}/mysql/libmysqlclient*.so
%{_libdir}/mysql/libndbclient.so
+%files embedded
+%defattr(-,root,root)
+%{_libdir}/mysql/libmysqld.so.*
+
+%files embedded-devel
+%defattr(-,root,root)
+%{_libdir}/mysql/libmysqld.so
+%{_bindir}/mysql_client_test_embedded
+%{_bindir}/mysqltest_embedded
+%{_mandir}/man1/mysql_client_test_embedded.1*
+%{_mandir}/man1/mysqltest_embedded.1*
+
%files bench
%defattr(-,root,root)
%{_datadir}/sql-bench
@@ -580,6 +627,11 @@
%{_mandir}/man1/mysql_client_test.1*
%changelog
+* Wed Oct 1 2008 Tom Lane <tgl at redhat.com> 5.0.67-2
+- Build the "embedded server" library, and package it in a new sub-RPM
+ mysql-embedded, along with mysql-embedded-devel for devel support files.
+Resolves: #149829
+
* Sat Aug 23 2008 Tom Lane <tgl at redhat.com> 5.0.67-1
- Update to mysql version 5.0.67
- Move mysql_config's man page to base package, again (apparently I synced
More information about the scm-commits
mailing list