2006-07-18 14:56:26 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=mysql
|
|
|
|
PKG_VERSION:=5.0.18
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2006-07-18 14:56:26 +00:00
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
2006-10-28 22:43:08 +00:00
|
|
|
|
2007-01-22 17:33:10 +00:00
|
|
|
PKG_BUILD_DEPENDS:=libncurses libreadline
|
2006-07-18 14:56:26 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/libmysqlclient
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2007-09-07 18:00:08 +00:00
|
|
|
DEPENDS:=+zlib
|
2006-07-18 14:56:26 +00:00
|
|
|
TITLE:=MySQL client library
|
|
|
|
URL:=http://dev.mysql.com/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2006-11-05 20:12:42 +00:00
|
|
|
(cd $(PKG_BUILD_DIR); touch \
|
|
|
|
configure.in \
|
|
|
|
aclocal.m4 \
|
|
|
|
Makefile.in \
|
|
|
|
config.h.in \
|
|
|
|
configure \
|
|
|
|
);
|
2006-10-28 22:43:08 +00:00
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--disable-assembler \
|
|
|
|
--with-pthread \
|
|
|
|
--without-raid \
|
|
|
|
--with-unix-socket-path=/tmp \
|
|
|
|
--without-libwrap \
|
|
|
|
--without-pstack \
|
|
|
|
--with-low-memory \
|
|
|
|
--without-server \
|
|
|
|
--without-embedded-server \
|
|
|
|
--without-query-cache \
|
|
|
|
--without-mysqlfs \
|
|
|
|
--without-vio \
|
|
|
|
--without-openssl \
|
|
|
|
--without-docs \
|
|
|
|
--without-bench \
|
|
|
|
--without-readline \
|
|
|
|
--with-named-thread-libs=-lpthread \
|
|
|
|
, \
|
2006-07-18 14:56:26 +00:00
|
|
|
mysql_cv_compress=yes \
|
|
|
|
mysql_cv_gethostname_style=glibc2 \
|
|
|
|
);
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
rm -rf $(PKG_INSTALL_DIR)
|
|
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
|
|
|
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
|
|
|
SUBDIRS="include" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
|
|
|
$(MAKE) -C "$(PKG_BUILD_DIR)/libmysql" \
|
|
|
|
CC="$(HOSTCC)" \
|
|
|
|
LINK="$(HOSTCC) -o conf_to_src -lc" \
|
|
|
|
CFLAGS="" \
|
|
|
|
CPPFLAGS="" \
|
|
|
|
conf_to_src
|
|
|
|
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
|
|
|
SUBDIRS="libmysql" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
|
|
|
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
|
|
|
SUBDIRS="scripts" \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
bin_SCRIPTS="mysql_config" \
|
|
|
|
install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2007-12-23 21:34:53 +00:00
|
|
|
$(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
|
2007-12-09 18:59:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin/
|
2007-12-27 02:12:26 +00:00
|
|
|
ln -sf $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin/
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include/
|
2007-09-27 02:22:08 +00:00
|
|
|
# NOTE: needed for MySQL-Python
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_BUILD_DIR)/include/mysqld_error.h $(1)/usr/include/mysql/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql $(1)/usr/lib/
|
|
|
|
rm -f $(1)/usr/lib/mysql/libmysqlclient.la
|
2006-07-18 14:56:26 +00:00
|
|
|
endef
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
define Package/libmysqlclient/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-10-28 22:43:08 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
2006-07-18 14:56:26 +00:00
|
|
|
$(eval $(call BuildPackage,libmysqlclient))
|