[Groonga-mysql-commit] mroonga/mroonga [master] find mysql_config instead of MySQL build directory.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 9月 10日 (金) 09:01:37 JST


Kouhei Sutou	2010-09-10 00:01:37 +0000 (Fri, 10 Sep 2010)

  New Revision: 92e6acecafdd686fa836cb06e964cbb20b107ad3

  Log:
    find mysql_config instead of MySQL build directory.
    
    Suggested by tmtms. Thanks!!!

  Modified files:
    apt/groonga-storage-engine-depended-packages
    configure.ac
    debian/changelog
    debian/control
    debian/rules
    rpm/centos/mysql-groonga.spec.in
    rpm/fedora/mysql-groonga.spec.in
    yum/build-rpm.sh
    yum/mysql-groonga-depended-packages

  Modified: apt/groonga-storage-engine-depended-packages (+2 -0)
===================================================================
--- apt/groonga-storage-engine-depended-packages    2010-09-09 13:57:03 +0000 (47462f3)
+++ apt/groonga-storage-engine-depended-packages    2010-09-10 00:01:37 +0000 (fe44209)
@@ -6,3 +6,5 @@ libgroonga-dev
 pkg-config
 libmecab-dev
 mecab-utils
+libmysqlclient-dev
+libssl-dev

  Modified: configure.ac (+20 -24)
===================================================================
--- configure.ac    2010-09-09 13:57:03 +0000 (a844d48)
+++ configure.ac    2010-09-10 00:01:37 +0000 (44c4fe0)
@@ -26,8 +26,8 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[
   AC_MSG_CHECKING([mysql source])
 
   ac_mysql_source_dir=
-  AC_ARG_WITH([mysql],
-    [AS_HELP_STRING([--with-mysql=PATH], [MySQL source directory PATH])],
+  AC_ARG_WITH([mysql-source],
+    [AS_HELP_STRING([--with-mysql-source=PATH], [MySQL source directory PATH])],
     [
       ac_mysql_source_dir="$withval"
       if test -f "$ac_mysql_source_dir/sql/handler.h" ; then
@@ -41,31 +41,27 @@ AC_DEFUN([CONFIG_OPTION_MYSQL],[
         AC_MSG_ERROR([invalid MySQL source directory])
       fi
     ],
-    [AC_MSG_ERROR([--with-mysql=PATH is required for standalone build])]
+    [AC_MSG_ERROR([--with-mysql-source=PATH is required for standalone build])]
   )
 
-  ac_mysql_config="$ac_mysql_source_dir/scripts/mysql_config"
-  if test -x "$ac_mysql_config"; then
-    plugindir="$($ac_mysql_config --plugindir)"
-  else
-    AC_MSG_CHECKING([mysql build directory])
-    AC_ARG_WITH([mysql-build],
-      [AS_HELP_STRING([--with-mysql-build=PATH],
-                      [MySQL build directory PATH])],
-      [
-	ac_mysql_build_dir="$withval"
-        ac_mysql_config="$ac_mysql_build_dir/scripts/mysql_config"
-	if test -x "$ac_mysql_config"; then
-          plugindir="$($ac_mysql_config --plugindir)"
-	  MYSQL_INC="$MYSQL_INC -I$ac_mysql_build_dir/include"
-	  AC_MSG_RESULT([yes])
-	else
-	  AC_MSG_ERROR([invalid MySQL build directory])
-	fi
-      ],
-      [AC_MSG_ERROR([--with-mysql-build=PATH is required for standalone build with different MySQL build direcotry])]
-    )
+  AC_MSG_CHECKING([mysql_config])
+  AC_ARG_WITH([mysql-config],
+    [AS_HELP_STRING([--with-mysql-config=PATH],
+                    [mysql_config PATH])],
+    [ac_mysql_config="$withval"],
+    [ac_mysql_config=])
+  if test -z "$ac_mysql_config"; then
+    AC_PATH_PROG(ac_mysql_config, mysql_config, mysql-config-not-found)
+  fi
+  if test "$ac_mysql_config" = "mysql-config-not-found"; then
+    AC_MSG_ERROR([can't detect mysql_config. Please specify mysql_config path by --with-mysql-config=PATH.])
+  fi
+  AC_MSG_RESULT([$ac_mysql_config])
+  plugindir="$($ac_mysql_config --plugindir)"
+  if test $? -ne 0; then
+    AC_MSG_ERROR([failed to run "$ac_mysql_config": $plugindir])
   fi
+  MYSQL_INC="$MYSQL_INC $($ac_mysql_config --include)"
   AC_SUBST(plugindir)
 ])
 

  Modified: debian/changelog (+6 -0)
===================================================================
--- debian/changelog    2010-09-09 13:57:03 +0000 (f4d93a9)
+++ debian/changelog    2010-09-10 00:01:37 +0000 (799f717)
@@ -1,3 +1,9 @@
+groonga-storage-engine (0.1-4) unstable; urgency=low
+
+  * follow configure option changes.
+
+ -- Kouhei Sutou <kou****@cozmi*****>  Fri, 10 Sep 2010 08:45:53 +0900
+
 groonga-storage-engine (0.1-3) unstable; urgency=low
 
   * Use HEAD.

  Modified: debian/control (+3 -1)
===================================================================
--- debian/control    2010-09-09 13:57:03 +0000 (8592629)
+++ debian/control    2010-09-10 00:01:37 +0000 (da8ebc6)
@@ -6,7 +6,9 @@ Build-Depends:
 	cdbs,
 	autotools-dev,
 	quilt,
-	libgroonga-dev
+	libgroonga-dev,
+	libmysqlclient-dev,
+	libssl-dev
 Standards-Version: 3.7.3
 Homepage: http://mroonga.github.com/
 

  Modified: debian/rules (+1 -2)
===================================================================
--- debian/rules    2010-09-09 13:57:03 +0000 (220e59a)
+++ debian/rules    2010-09-10 00:01:37 +0000 (cb77f47)
@@ -8,8 +8,7 @@ DEB_INSTALL_DIRS_mysql-server-groonga =		\
 	/usr/lib/mysql/plugin
 
 DEB_CONFIGURE_EXTRA_FLAGS =			\
-	--with-mysql=../mysql			\
-	--with-mysql-build=../mysql/builddir
+	--with-mysql-source=../mysql
 
 CFLAGS=-g -O3
 CXXFLAGS=-g -O3

  Modified: rpm/centos/mysql-groonga.spec.in (+16 -6)
===================================================================
--- rpm/centos/mysql-groonga.spec.in    2010-09-09 13:57:03 +0000 (64725b7)
+++ rpm/centos/mysql-groonga.spec.in    2010-09-10 00:01:37 +0000 (1710fa1)
@@ -4,7 +4,7 @@
 
 Name:		mysql-groonga
 Version:	@VERSION@
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	A MySQL storage engine powered by groonga.
 
 Group:		Applications/Databases
@@ -23,27 +23,34 @@ Groonga storage engine is a MySQL storage plugin.
 
 %prep
 %setup -q -n groonga-storage-engine- @ VERSION@
-srpm=MySQL-community-%{mysql_version}-%{mysql_release}.%{mysql_dist}.src.rpm
+mysql_full_version=%{mysql_version}-%{mysql_release}.%{mysql_dist}
+srpm=MySQL-community-${mysql_full_version}.src.rpm
 if [ ! -f ../../SRPMS/$srpm ]; then
     mysql_download_base=http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.1
     wget -O ../../SRPMS/$srpm $mysql_download_base/$srpm
     rpm -Uvh ../../SRPMS/$srpm
     for package in client devel embedded server shared test; do
-        rpm=MySQL-${package}-community-%{mysql_version}-%{mysql_release}.%{mysql_dist}.%{_arch}.rpm
+        rpm=MySQL-${package}-community-${mysql_full_version}.%{_arch}.rpm
 	mkdir -p ../../RPMS/%{_arch}
 	if [ ! -f ../../RPMS/%{_arch}/$rpm ]; then
             wget -O ../../RPMS/%{_arch}/$rpm $mysql_download_base/$rpm
 	fi
     done
 fi
+if ! rpm -q MySQL-devel-community 2>&1 | grep $mysql_full_version > /dev/null; then
+    rpm=../../RPMS/%{_arch}/MySQL-devel-community-$mysql_full_version.%{_arch}.rpm
+    sudo rpm -Uvh $rpm || \
+	echo "install MySQL-devel-community by hand: sudo rpm -Uvh $(pwd)/$rpm" && \
+	exit 1
+fi
 
 %build
 if [ ! -d ../mysql-%{mysql_version} ]; then
-    MYSQL_RPMBUILD_TEST=no rpmbuild -bc \
+    MYSQL_RPMBUILD_TEST=no rpmbuild -bp \
         --define 'community 1' --define 'optflags -O0' \
 	../../SPECS/mysql-%{mysql_version}.%{mysql_dist}.spec
 fi
-%configure --with-mysql=../mysql-%{mysql_version}
+%configure --with-mysql-source=../mysql-%{mysql_version}
 make %{?_smp_mflags}
 
 
@@ -75,5 +82,8 @@ eval $command || \
 %{_libdir}/mysql/plugin/
 
 %changelog
+* Fri Sep 10 2010 Kouhei Sutou <kou****@clear*****> - 0.1-2
+- use MySQL-devel-community.
+
 * Fri Sep 03 2010 Kouhei Sutou <kou****@clear*****> - 0.1-1
-- initial packaging for Fedora
+- initial packaging for CentOS.

  Modified: rpm/fedora/mysql-groonga.spec.in (+8 -4)
===================================================================
--- rpm/fedora/mysql-groonga.spec.in    2010-09-09 13:57:03 +0000 (fa53b5e)
+++ rpm/fedora/mysql-groonga.spec.in    2010-09-10 00:01:37 +0000 (2ede917)
@@ -3,7 +3,7 @@
 
 Name:		mysql-groonga
 Version:	@VERSION@
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	A MySQL storage engine powered by groonga.
 
 Group:		Applications/Databases
@@ -12,6 +12,7 @@ URL:		http://mroonga.github.com/
 Source0:	http://github.com/downloads/mroonga/mroonga/groonga-storage-engine-@VERSION@.tar.gz
 
 BuildRequires:	groonga-devel
+BuildRequires:	mysql-devel
 Requires:	groonga-libs
 Requires:	mysql-server
 
@@ -29,10 +30,10 @@ fi
 
 %build
 if [ ! -d ../mysql-%{mysql_version} ]; then
-    rpmbuild -bc --define 'runselftest 0' --define 'optflags -O0' \
+    rpmbuild -bp --define 'runselftest 0' --define 'optflags -O0' \
         ../../SPECS/mysql.spec
 fi
-%configure --with-mysql=../mysql-%{mysql_version}
+%configure --with-mysql-source=../mysql-%{mysql_version}
 make %{?_smp_mflags}
 
 
@@ -64,5 +65,8 @@ eval $command || \
 %{_libdir}/mysql/plugin/
 
 %changelog
+* Fri Sep 10 2010 Kouhei Sutou <kou****@clear*****> - 0.1-2
+- follow configure option changes.
+
 * Fri Sep 03 2010 Kouhei Sutou <kou****@clear*****> - 0.1-1
-- initial packaging for Fedora
+- initial packaging for Fedora.

  Modified: yum/build-rpm.sh (+8 -0)
===================================================================
--- yum/build-rpm.sh    2010-09-09 13:57:03 +0000 (714c7d5)
+++ yum/build-rpm.sh    2010-09-10 00:01:37 +0000 (7fb27f0)
@@ -30,6 +30,14 @@ if ! rpm -q groonga-repository > /dev/null 2>&1; then
     run rpm -Uvh http://packages.groonga.org/${distribution}/groonga-repository-1.0.0-0.noarch.rpm
 fi
 
+case $distribution in
+    fedora)
+	DEPENDED_PACKAGES="$DEPENDED_PACKAGES mysql-devel"
+	;;
+    centos)
+	;;
+esac
+
 run yum update -y
 run yum install -y rpm-build tar ${DEPENDED_PACKAGES}
 run yum clean packages

  Modified: yum/mysql-groonga-depended-packages (+1 -0)
===================================================================
--- yum/mysql-groonga-depended-packages    2010-09-09 13:57:03 +0000 (c58deb9)
+++ yum/mysql-groonga-depended-packages    2010-09-10 00:01:37 +0000 (d6c7e1b)
@@ -10,3 +10,4 @@ openssl-devel
 time
 wget
 ncurses-devel
+sudo




Groonga-mysql-commit メーリングリストの案内
Back to archive index