[packages] mysql: fix /bin/hostname invocation in table install script, openwrt does...
[openwrt/svn-archive/archive.git] / libs / mysql / Makefile
index 28ca807..dba90cb 100644 (file)
@@ -8,19 +8,21 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mysql
-PKG_VERSION:=5.0.18
-PKG_RELEASE:=3
+PKG_VERSION:=5.1.53
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=\
-       http://mysql.planetmirror.com/Downloads/MySQL-5.0/ \
-       http://mysql.he.net/Downloads/MySQL-5.0/ \
-       http://www.linorg.usp.br/mysql/Downloads/MySQL-5.0/ \
-       http://mysql.holywar.net/Downloads/MySQL-5.0/
-PKG_MD5SUM:=f18153b0239aaa03fc5a751f2d82cb71
+       http://mysql.planetmirror.com/Downloads/MySQL-5.1/ \
+       http://mysql.he.net/Downloads/MySQL-5.1/ \
+       http://www.linorg.usp.br/mysql/Downloads/MySQL-5.1/ \
+       http://mysql.holywar.net/Downloads/MySQL-5.1/
+PKG_MD5SUM:=e5e7c5b0b5c382489e6a66778703bc46
 
 PKG_BUILD_DEPENDS:=libncurses libreadline
-PKG_FIXUP:=libtool
+PKG_BUILD_PARALLEL:=1
+
+PKG_FIXUP:=libtool no-autoreconf
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -54,6 +56,8 @@ define Package/libmysqlclient_r
   TITLE += threadsafe
 endef
 
+TARGET_CXX=g++-uc
+
 CONFIGURE_VARS += \
         CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
         CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
@@ -70,6 +74,7 @@ define Build/Configure
                config.h.in \
                configure \
        );
+       $(CP) files/lex_hash.h $(PKG_BUILD_DIR)/sql/lex_hash.h
 
        $(call Build/Configure/Default, \
                --enable-shared \
@@ -89,7 +94,7 @@ define Build/Configure
                --without-query-cache \
                --without-mysqlfs \
                --without-vio \
-               --without-openssl \
+               --without-ssl \
                --without-docs \
                --without-man \
                --without-bench \
@@ -99,35 +104,51 @@ define Build/Configure
                , \
                mysql_cv_compress=yes \
                mysql_cv_gethostname_style=glibc2 \
+               ac_cv_c_stack_direction=-1 \
        );
 endef
 
 TARGET_CFLAGS += $(FPIC)
 
 define Build/Compile
+       $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
+               SUBDIRS="include" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                SUBDIRS="include" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-       $(MAKE) -C "$(PKG_BUILD_DIR)/libmysql" \
+               install
+       $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)/libmysql" \
                CC="$(HOSTCC)" \
                LINK="$(HOSTCC) -o conf_to_src -lc" \
                CFLAGS="" \
                CPPFLAGS="" \
                conf_to_src
+       $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
+               SUBDIRS="libmysql" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                SUBDIRS="libmysql" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
+               install
+       $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
+               SUBDIRS="libmysql_r" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                SUBDIRS="libmysql_r" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
+               install
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                SUBDIRS="scripts" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                bin_SCRIPTS="mysql_config" \
                install
+       $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                install
@@ -162,7 +183,6 @@ define Package/mysql-server/install
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqladmin $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqldump $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_install_db $(1)/usr/bin/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_create_system_tables $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/my_print_defaults $(1)/usr/bin/
        $(INSTALL_DIR) $(1)/etc/init.d/
        $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld
@@ -171,6 +191,8 @@ define Package/mysql-server/install
        $(INSTALL_DIR) $(1)/usr/share/mysql/english
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql/
 endef
 
 $(eval $(call BuildPackage,mysql-server))