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