Name: compat-mysql-libs Version: 5.1.73 Release: 1%{?dist} Summary: MySQL compat libraries Group: Applications/Databases URL: http://www.mysql.com # exceptions allow client libraries to be linked with most open source SW, # not only GPL code. See README.mysql-license License: GPLv2 with exceptions # Upstream has a mirror redirector for downloads, so the URL is hard to # represent statically. You can get the tarball by following a link from # http://dev.mysql.com/downloads/mysql/ Source0: mysql-%{version}-nodocs.tar.gz # The upstream tarball includes non-free documentation that we cannot ship. # To remove the non-free documentation, run this script after downloading # the tarball into the current directory: # ./generate-tarball.sh $VERSION Source1: generate-tarball.sh Source6: README.mysql-docs Source7: README.mysql-license Patch9: mysql-no-docs.patch BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: gcc-c++ BuildRequires: zlib-devel BuildRequires: libtool BuildRequires: automake BuildRequires: autoconf Requires: /sbin/ldconfig %description MySQL is a multi-user, multi-threaded SQL database server. MySQL is a client/server implementation consisting of a server daemon (mysqld) and many different client programs and libraries. The base package contains the standard MySQL client programs and generic MySQL files. %prep %setup -q -n mysql-%{version} %patch9 -p1 libtoolize --force aclocal automake --add-missing -Wno-portability autoconf autoheader %build CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" # 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" # force PIC mode so that we can build libmysqld.so CFLAGS="$CFLAGS -fPIC" # gcc seems to have some bugs on sparc as of 4.4.1, back off optimization # submitted as bz #529298 %ifarch sparc sparcv9 sparc64 CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O1|g" ` %endif # extra C++ flags as per recommendations in mysql's INSTALL-SOURCE doc CXXFLAGS="$CFLAGS -felide-constructors -fno-rtti -fno-exceptions" export CFLAGS CXXFLAGS # mysql 5.1.30 fails regression tests on x86 unless we use --with-big-tables, # suggesting that upstream doesn't bother to test the other case ... # note: the with-plugin and without-plugin options do actually work; ignore # warnings from configure suggesting they are ignored ... %configure \ --without-server \ --with-readline \ --with-ssl=/usr \ --without-debug \ --enable-shared \ --localstatedir=/var/lib/mysql \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --with-mysqld-user="mysql" \ --with-extra-charsets=all \ --with-big-tables \ --with-pic \ --with-plugin-innobase \ --without-plugin-innodb_plugin \ --without-plugin-partition \ --enable-local-infile \ --enable-largefile \ --enable-thread-safe-client \ --disable-dependency-tracking # Not enabling assembler make %{?_smp_mflags} # regular build will make libmysqld.a but not libmysqld.so :-( make check %install %makeinstall find ${RPM_BUILD_ROOT}%{_libdir} rm -rf ${RPM_BUILD_ROOT}%{_includedir} rm -rf ${RPM_BUILD_ROOT}%{_bindir} rm -rf ${RPM_BUILD_ROOT}%{_mandir} rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqlclient*.la rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/*.a rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/plugin/*.la rm -f ${RPM_BUILD_ROOT}%{_libdir}/mysql/plugin/*.a rm -rf ${RPM_BUILD_ROOT}%{_datadir} rm -rf ${RPM_BUILD_ROOT}%{_prefix}/mysql-test rm -rf ${RPM_BUILD_ROOT}%{_prefix}/sql-bench unlink ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqlclient.so unlink ${RPM_BUILD_ROOT}%{_libdir}/mysql/libmysqlclient_r.so mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf # copy additional docs into build tree so %%doc will find them cp %{SOURCE6} README.mysql-docs cp %{SOURCE7} README.mysql-license %files %doc COPYING README.mysql-license %dir %{_libdir}/mysql %{_libdir}/mysql/libmysqlclient*.so.* /etc/ld.so.conf.d/* %changelog * Thu May 10 2018 Honza Horak - 5.1.73-1 - Initial packaging taken from RHEL-6 mysql