default to no, we use busybox ipkg by default
[openwrt.git] / openwrt / package / mysql / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=mysql
6 PKG_VERSION:=4.0.24
7 PKG_RELEASE:=2
8 PKG_MD5SUM:=408d3001ed715ddc90009c247e548638
9
10 PKG_SOURCE_URL:=\
11 http://netmirror.org/mirror/mysql.com/Downloads/MySQL-4.0/ \
12 http://mysql.he.net/Downloads/MySQL-4.0/ \
13 http://www.linorg.usp.br/mysql/Downloads/MySQL-4.0/ \
14 http://mysql.planetmirror.com/Downloads/MySQL-4.0/ \
15 http://mysql.holywar.net/Downloads/MySQL-4.0/
16
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(TOPDIR)/package/rules.mk
24
25 $(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
26
27 $(PKG_BUILD_DIR)/.configured:
28 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
29 touch configure.in; \
30 touch aclocal.m4; \
31 touch Makefile.in; \
32 touch config.h.in; \
33 touch configure; \
34 $(TARGET_CONFIGURE_OPTS) \
35 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
36 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
37 OPTIMIZE_CFLAGS="$(TARGET_CFLAGS)" \
38 OPTIMIZE_CXXFLAGS="$(TARGET_CFLAGS)" \
39 ac_atomic_add=yes \
40 ac_atomic_sub=yes \
41 ac_cv_sys_restartable_syscalls=yes \
42 ac_cv_conv_longlong_to_float=yes \
43 mysql_cv_compress=yes \
44 mysql_cv_gethostname_style=glibc2 \
45 ./configure \
46 --target=$(GNU_TARGET_NAME) \
47 --host=$(GNU_TARGET_NAME) \
48 --build=$(GNU_HOST_NAME) \
49 --program-prefix="" \
50 --program-suffix="" \
51 --prefix=/usr \
52 --exec-prefix=/usr \
53 --bindir=/usr/bin \
54 --datadir=/usr/share \
55 --includedir=/usr/include \
56 --infodir=/usr/share/info \
57 --libdir=/usr/lib \
58 --libexecdir=/usr/lib \
59 --localstatedir=/var \
60 --mandir=/usr/share/man \
61 --sbindir=/usr/sbin \
62 --sysconfdir=/etc \
63 $(DISABLE_LARGEFILE) \
64 $(DISABLE_NLS) \
65 --enable-shared \
66 --enable-static \
67 --disable-assembler \
68 --with-pthread \
69 --without-raid \
70 --with-unix-socket-path=/tmp \
71 --without-libwrap \
72 --without-pstack \
73 --with-low-memory \
74 --without-server \
75 --without-embedded-server \
76 --without-query-cache \
77 --without-mysqlfs \
78 --without-vio \
79 --without-openssl \
80 --without-docs \
81 --without-bench \
82 --without-readline \
83 );
84 touch $@
85
86 $(PKG_BUILD_DIR)/.built:
87 rm -rf $(PKG_INSTALL_DIR)
88 mkdir -p $(PKG_INSTALL_DIR)
89 $(MAKE) -C "$(PKG_BUILD_DIR)/libmysql" \
90 CC="$(HOSTCC)" \
91 LINK="$(HOSTCC) -o conf_to_src -lc" \
92 CFLAGS="" \
93 conf_to_src
94 $(MAKE) -C "$(PKG_BUILD_DIR)" \
95 SUBDIRS="include libmysql" \
96 DESTDIR="$(PKG_INSTALL_DIR)" \
97 all install
98 $(MAKE) -C "$(PKG_BUILD_DIR)" \
99 SUBDIRS="scripts" \
100 DESTDIR="$(PKG_INSTALL_DIR)" \
101 bin_SCRIPTS="mysql_config" \
102 install
103 touch $@
104
105 $(IPKG_LIBMYSQLCLIENT):
106 install -d -m0755 $(IDIR_LIBMYSQLCLIENT)/usr/lib
107 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(IDIR_LIBMYSQLCLIENT)/usr/lib/
108 $(RSTRIP) $(IDIR_LIBMYSQLCLIENT)
109 $(IPKG_BUILD) $(IDIR_LIBMYSQLCLIENT) $(PACKAGE_DIR)
110
111 $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so: $(PKG_BUILD_DIR)/.built
112 mkdir -p $(STAGING_DIR)/usr/bin
113 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(STAGING_DIR)/usr/bin/
114 mkdir -p $(STAGING_DIR)/usr/include
115 cp -fpR $(PKG_INSTALL_DIR)/usr/include/mysql $(STAGING_DIR)/usr/include/
116 mkdir -p $(STAGING_DIR)/usr/lib
117 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/mysql $(STAGING_DIR)/usr/lib/
118 rm -f $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.la
119 touch $@
120
121 install-dev: $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so
122
123 uninstall-dev:
124 rm -rf \
125 $(STAGING_DIR)/usr/bin/mysql_config \
126 $(STAGING_DIR)/usr/include/mysql \
127 $(STAGING_DIR)/usr/lib/mysql \
128
129 compile-targets: install-dev
130 clean-targets: uninstall-dev
This page took 0.046227 seconds and 5 git commands to generate.