[arch-commits] Commit in mysql/trunk (6 files)

Andrea Scarpino andrea at archlinux.org
Tue Nov 17 15:14:18 EST 2009


    Date: Tuesday, November 17, 2009 @ 15:14:17
  Author: andrea
Revision: 58936

upgpkg: mysql 5.1.40-1
    package splitted; upstream release; changed configuration, .pid and .sock path (FS#14488)

Added:
  mysql/trunk/mysql.install
Modified:
  mysql/trunk/PKGBUILD
  mysql/trunk/my.cnf
  mysql/trunk/mysqld
Deleted:
  mysql/trunk/mysql-fix-libs.patch
  mysql/trunk/mysql-no-clients.patch

------------------------+
 PKGBUILD               |  161 +++++++++++++++++++++++++++++++++--------------
 my.cnf                 |    4 -
 mysql-fix-libs.patch   |   36 ----------
 mysql-no-clients.patch |   16 ----
 mysql.install          |    4 +
 mysqld                 |    4 -
 6 files changed, 124 insertions(+), 101 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-11-17 19:59:06 UTC (rev 58935)
+++ PKGBUILD	2009-11-17 20:14:17 UTC (rev 58936)
@@ -1,70 +1,141 @@
 # $Id$
-# Maintainer: Douglas Soares de Andrade <douglas at archlinux.org>
+# Maintainer: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas at archlinux.org>
 # Contributor: judd <jvinet at zeroflux.org>
 
-pkgname=mysql
-pkgver=5.1.39
+pkgbase=mysql
+pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
+pkgver=5.1.40
 pkgrel=1
 pkgdesc="A fast SQL database server"
-arch=(i686 x86_64)
-backup=(etc/my.cnf etc/conf.d/mysqld)
-depends=("mysql-clients>=${pkgver}" 'tcp_wrappers' 'zlib' 'perl')
-makedepends=('libtool' 'patch')
+arch=('i686' 'x86_64')
+license=('GPL')
 url=('http://www.mysql.com/')
+makedepends=('tcp_wrappers' 'zlib' 'perl' 'openssl' 'libtool' 'patch')
 options=('!libtool')
-optdepends=('perl-dbi' 'perl-dbd-mysql')
-license=('GPL')
-source=(ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/mysql-${pkgver}.tar.gz
-        mysql-no-clients.patch
-        mysql-fix-libs.patch
-        mysqld
-        my.cnf
-        mysqld.conf.d)
+source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-$pkgver.tar.gz"
+        'mysqld'
+        'my.cnf'
+        'mysqld.conf.d')
+md5sums=('32e7373c16271606007374396e6742ad'
+         'c093cc7eef5934f56f8bc775b559904b'
+         '0ee035590ffc61d32de994f461fd2bd2'
+         '4a9077fc95ec6db1d5420e0cdc74d31c')
 
 build() {
-  cd ${startdir}/src/${pkgname}-${pkgver}
+  cd ${srcdir}/${pkgbase}-${pkgver}
 
-  # fix build with gcc 4.4
-  # see http://bugs.archlinux.org/task/15242
-  # and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562
-  CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing"
-  CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing"
+  ./configure --prefix=/usr \
+    --libexecdir=/usr/sbin \
+    --localstatedir=/var \
+    --sysconfdir=/etc/mysql \
+    --without-docs \
+    --without-readline \
+    --with-ssl \
+    --with-libwrap \
+    --with-charset=latin1 \
+    --with-collation=latin1_general_ci \
+    --with-extra-charsets=complex \
+    --with-embedded-server \
+    --enable-local-infile \
+    --with-plugins=partition,ftexample,archive,blackhole,federated,heap,innobase,ndbcluster
+}
 
-  patch -Np1 -i ${startdir}/src/mysql-no-clients.patch || return 1
-  patch -Np1 -i ${startdir}/src/mysql-fix-libs.patch || return 1
+package_libmysqlclient(){
+  pkgdesc="MySQL client libraries"
+  depends=('openssl' 'zlib' 'gcc-libs' 'tcp_wrappers')
+  
+  cd ${srcdir}/${pkgbase}-${pkgver}
+  for dir in include strings mysys dbug storage regex extra vio sql; do
+    pushd ${dir} || return 1
+    make || return 1
+    popd
+  done
+  for dir in libmysql libmysql_r libmysqld; do
+    pushd ${dir} || return 1
+    make link_sources
+    make || return 1
+    make DESTDIR=${pkgdir} install
+    popd
+  done
+  cd include
+  make DESTDIR=${pkgdir} install
 
-  ./configure --prefix=/usr --libexecdir=/usr/sbin \
-  --localstatedir=/var --sysconfdir=/etc \
-  --without-debug --without-docs --without-readline \
-  --enable-local-infile --with-ssl \
-  --with-charset=latin1 --with-collation=latin1_general_ci \
-  --with-extra-charsets=complex --enable-thread-safe-client \
-  --with-libwrap \
-  --with-plugins=partition,ftexample,archive,blackhole,federated,heap,innobase,ndbcluster
+  # Copy missing includes
+  install -m644 *.h ${pkgdir}/usr/include/mysql
 
+  cd ../scripts
+  make mysql_config
+  install -d ${pkgdir}/usr/bin
+  install -m755 mysql_config ${pkgdir}/usr/bin || return 1
+  
+  # create library symlinks in /usr/lib
+  ln -sf mysql/libmysqlclient.so.16 $pkgdir/usr/lib/libmysqlclient.so.16
+  ln -sf libmysqlclient.so.16 $pkgdir/usr/lib/libmysqlclient.so
+  ln -sf libmysqlclient.so.16 $pkgdir/usr/lib/libmysqlclient.so.1
+  ln -sf mysql/libmysqlclient_r.so.16  $pkgdir/usr/lib/libmysqlclient_r.so.16
+  ln -sf libmysqlclient_r.so.16 $pkgdir/usr/lib/libmysqlclient_r.so
+  ln -sf libmysqlclient_r.so.16 $pkgdir/usr/lib/libmysqlclient_r.so.1
+}
+
+package_mysql-clients(){
+  pkgdesc="MySQL client tools"
+  depends=("libmysqlclient>=${pkgver}")
+  
+  cd ${srcdir}/${pkgbase}-${pkgver}
   pushd include || return
+    make || return 1
+  popd
+
+  pushd libmysql
+    make link_sources get_password.lo || return
+  popd 
+  
+  for dir in strings regex mysys dbug extra; do
+    pushd ${dir} || return 1
+    make || return 1
+    popd
+  done
+
+  cd client
+
+  sed -i -e 's|\$(top_builddir)/libmysql/libmysqlclient.la|/usr/lib/mysql/libmysqlclient.so|g' Makefile
+  make link_sources
   make || return 1
+  make DESTDIR=${pkgdir} install
+
+  # Removing libmysql stuff
+  rm -rf $pkgdir/usr/lib/
+}
+
+package_mysql(){
+  backup=('etc/my.cnf' 'etc/mysql/my.cnf' 'etc/conf.d/mysqld')
+  depends=('mysql-clients')
+  optdepends=('perl-dbi' 'perl-dbd-mysql')
+  install=mysql.install
+
+  cd ${srcdir}/${pkgbase}-${pkgver}
+  pushd include || return
+    make || return 1
   popd
     
   pushd libmysql
-  make link_sources get_password.lo || return
+    make link_sources get_password.lo || return
   popd
   
   make || return 1
-  make DESTDIR=${startdir}/pkg install
+  make DESTDIR=${pkgdir} install
 
-  rm -rf $pkgdir/usr/{mysql-test,sql-bench,lib,include}
-  install -D -m644 ../my.cnf ${startdir}/pkg/etc/my.cnf
-  install -D -m755 ../mysqld ${startdir}/pkg/etc/rc.d/mysqld
-  install -D -m644 ../mysqld.conf.d ${startdir}/pkg/etc/conf.d/mysqld
-  rm -f ${startdir}/pkg/usr/bin/mysql_config
+  rm -rf ${pkgdir}/usr/{mysql-test,sql-bench,lib,include}
+  install -D -m644 ../my.cnf ${pkgdir}/etc/mysql/my.cnf
+  install -D -m755 ../mysqld ${pkgdir}/etc/rc.d/mysqld
+  install -D -m644 ../mysqld.conf.d ${pkgdir}/etc/conf.d/mysqld
 
   # Cleanup files provided by the other packages
-  rm -rf $pkgdir/usr/{include,lib}
+  rm -f ${pkgdir}/usr/bin/{mysql,mysql_config,mysql_client_test_embedded,mysql_upgrade,mysqladmin,mysqlbinlog,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap,mysqltest,mysqltest_embedded}
+  rm -rf ${pkgdir}/usr/{include,lib}
+
+  # create directory for PID file
+  install -d ${pkgdir}/var/run/mysqld
 }
-md5sums=('55a398daeb69a778fc46573623143268'
-         '8dce7e2b9f1f6ed6eca8bd62144bad0a'
-         'd1921e85821a66196c24ef6e5346b572'
-         'c093cc7eef5934f56f8bc775b559904b'
-         '0ee035590ffc61d32de994f461fd2bd2'
-         '4a9077fc95ec6db1d5420e0cdc74d31c')
+

Modified: my.cnf
===================================================================
--- my.cnf	2009-11-17 19:59:06 UTC (rev 58935)
+++ my.cnf	2009-11-17 20:14:17 UTC (rev 58936)
@@ -12,14 +12,14 @@
 [client]
 #password	= your_password
 port		= 3306
-socket		= /tmp/mysql.sock
+socket		= /tmp/mysqld/mysql.sock
 
 # Here follows entries for some specific programs
 
 # The MySQL server
 [mysqld]
 port		= 3306
-socket		= /tmp/mysql.sock
+socket		= /tmp/mysqld/mysql.sock
 datadir		= /var/lib/mysql
 skip-locking
 key_buffer = 16M

Deleted: mysql-fix-libs.patch
===================================================================
--- mysql-fix-libs.patch	2009-11-17 19:59:06 UTC (rev 58935)
+++ mysql-fix-libs.patch	2009-11-17 20:14:17 UTC (rev 58936)
@@ -1,36 +0,0 @@
-diff -Naur mysql-5.1.32/client/Makefile.in mysql-5.1.32.novo/client/Makefile.in
---- mysql-5.1.32/client/Makefile.in	2009-02-13 23:02:45.000000000 -0200
-+++ mysql-5.1.32.novo/client/Makefile.in	2009-03-24 05:32:44.000000000 -0300
-@@ -464,15 +464,15 @@
- yassl_libs = @yassl_libs@
- yassl_taocrypt_extra_cxxflags = @yassl_taocrypt_extra_cxxflags@
- zlib_dir = @zlib_dir@
-- at THREAD_SAFE_CLIENT_FALSE@LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql/libmysqlclient.la
-- at THREAD_SAFE_CLIENT_TRUE@LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql_r/libmysqlclient_r.la
-+ at THREAD_SAFE_CLIENT_FALSE@LIBMYSQLCLIENT_LA = /usr/lib/mysql/libmysqlclient.so
-+ at THREAD_SAFE_CLIENT_TRUE@LIBMYSQLCLIENT_LA = /usr/lib/mysql/libmysqlclient_r.so
- INCLUDES = -I$(top_builddir)/include \
- 				-I$(top_srcdir)/include \
- 				-I$(top_srcdir)/regex \
-                                 $(openssl_includes)
- 
- LDADD = @CLIENT_EXTRA_LDFLAGS@ $(CLIENT_THREAD_LIBS) \
--				$(top_builddir)/libmysql/libmysqlclient.la
-+				/usr/lib/mysql/libmysqlclient.so
- 
- noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
- 				client_priv.h
-diff -Naur mysql-5.1.32/tests/Makefile.in mysql-5.1.32.novo/tests/Makefile.in
---- mysql-5.1.32/tests/Makefile.in	2009-02-13 23:03:19.000000000 -0200
-+++ mysql-5.1.32.novo/tests/Makefile.in	2009-03-24 05:32:35.000000000 -0300
-@@ -408,8 +408,8 @@
- yassl_libs = @yassl_libs@
- yassl_taocrypt_extra_cxxflags = @yassl_taocrypt_extra_cxxflags@
- zlib_dir = @zlib_dir@
-- at THREAD_SAFE_CLIENT_FALSE@LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql/libmysqlclient.la
-- at THREAD_SAFE_CLIENT_TRUE@LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql_r/libmysqlclient_r.la
-+ at THREAD_SAFE_CLIENT_FALSE@LIBMYSQLCLIENT_LA = /usr/lib/mysql/libmysqlclient.so
-+ at THREAD_SAFE_CLIENT_TRUE@LIBMYSQLCLIENT_LA = /usr/lib/mysql/libmysqlclient_r.so
- EXTRA_DIST = auto_increment.res auto_increment.tst \
- 			function.res function.tst lock_test.pl lock_test.res \
- 			export.pl big_record.pl \

Deleted: mysql-no-clients.patch
===================================================================
--- mysql-no-clients.patch	2009-11-17 19:59:06 UTC (rev 58935)
+++ mysql-no-clients.patch	2009-11-17 20:14:17 UTC (rev 58936)
@@ -1,16 +0,0 @@
-diff -Naur mysql-5.1.32/Makefile.in mysql-5.1.32-novo/Makefile.in
---- mysql-5.1.32/Makefile.in	2009-02-13 23:03:22.000000000 -0200
-+++ mysql-5.1.32-novo/Makefile.in	2009-03-24 04:48:19.000000000 -0300
-@@ -396,8 +396,9 @@
- SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
- 			@readline_topdir@ sql-common scripts \
- 			@pstack_dir@ \
--			@sql_union_dirs@ unittest storage plugin \
--			@sql_server@ @man_dirs@ tests \
-+			strings mysys dbug storage regex extra vio \
-+			sql unittest plugin \
-+			@sql_server@ \
- 			netware @libmysqld_dirs@ \
- 			mysql-test support-files sql-bench @tools_dirs@ \
- 			win
-

Added: mysql.install
===================================================================
--- mysql.install	                        (rev 0)
+++ mysql.install	2009-11-17 20:14:17 UTC (rev 58936)
@@ -0,0 +1,4 @@
+post_upgrade() {
+  echo ">> MySQL configuration file now is into /etc/mysql/ directory."
+  echo ">> Remember to replace it with your old configuration file."
+}

Modified: mysqld
===================================================================
--- mysqld	2009-11-17 19:59:06 UTC (rev 58935)
+++ mysqld	2009-11-17 20:14:17 UTC (rev 58936)
@@ -50,7 +50,7 @@
           stat_fail
           exit 1
         else
-          echo $(getPID) >/var/run/mysqld.pid
+          echo $(getPID) >/var/run/mysqld/mysqld.pid
           add_daemon mysqld
           stat_done
         fi
@@ -69,7 +69,7 @@
         stat_fail
         exit 1
       else
-        rm -f /var/run/mysqld.pid &>/dev/null
+        rm -f /var/run/mysqld/mysqld.pid &>/dev/null
         rm_daemon mysqld
         stat_done
       fi



More information about the arch-commits mailing list