2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 http://mysql.planetmirror.com/Downloads/MySQL-5.0/ \
18 http://mysql.he.net/Downloads/MySQL-5.0/ \
19 http://www.linorg.usp.br/mysql/Downloads/MySQL-5.0/ \
20 http://mysql.holywar.net/Downloads/MySQL-5.0/
21 PKG_MD5SUM:=f18153b0239aaa03fc5a751f2d82cb71
24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
25 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
27 PKG_BUILDDEP:=libncurses libreadline
29 include $(INCLUDE_DIR)/package.mk
31 define Package/libmysqlclient
35 TITLE:=MySQL client library
36 URL:=http://dev.mysql.com/
39 define Build/Configure
40 $(call Build/Configure/Default, \
46 --with-unix-socket-path=/tmp \
51 --without-embedded-server \
52 --without-query-cache \
59 --with-named-thread-libs=-lpthread \
61 mysql_cv_compress=yes \
62 mysql_cv_gethostname_style=glibc2 \
67 rm -rf $(PKG_INSTALL_DIR)
68 mkdir -p $(PKG_INSTALL_DIR)
69 $(MAKE) -C "$(PKG_BUILD_DIR)" \
71 DESTDIR="$(PKG_INSTALL_DIR)" \
73 $(MAKE) -C "$(PKG_BUILD_DIR)/libmysql" \
75 LINK="$(HOSTCC) -o conf_to_src -lc" \
79 $(MAKE) -C "$(PKG_BUILD_DIR)" \
81 DESTDIR="$(PKG_INSTALL_DIR)" \
83 $(MAKE) -C "$(PKG_BUILD_DIR)" \
85 DESTDIR="$(PKG_INSTALL_DIR)" \
86 bin_SCRIPTS="mysql_config" \
90 define Build/InstallDev
91 mkdir -p $(STAGING_DIR)/usr/bin
92 $(CP) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(STAGING_DIR)/usr/bin/
93 mkdir -p $(STAGING_DIR)/usr/include
94 $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(STAGING_DIR)/usr/include/
95 mkdir -p $(STAGING_DIR)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql $(STAGING_DIR)/usr/lib/
97 rm -f $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.la
100 define Build/UninstallDev
102 $(STAGING_DIR)/usr/bin/mysql_config \
103 $(STAGING_DIR)/usr/include/mysql \
104 $(STAGING_DIR)/usr/lib/mysql
107 define Package/libmysqlclient/install
108 install -d -m0755 $(1)/usr/lib
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(1)/usr/lib/
112 $(eval $(call BuildPackage,libmysqlclient))