3 ifneq ($(strip ${IPKG_RULES_INC}),)
4 include $(IPKG_RULES_INC
)
9 PKG_VERSION
:= $(shell cat .
/ipkg
/version
)
10 CURRENT_DIR
:= $(shell pwd
)
11 INSTALL_DIR ?
= $(CURRENT_DIR
)/ipkg-install
15 I_LIBMYSQLCLIENT
:= ipkg
/libmysqlclient
16 I_LIBMYSQLCLIENT_DEV
:= ipkg
/libmysqlclient-dev
17 I_MYSQL_UTILS
:= ipkg
/mysql-utils
20 $(STAGING_DIR
)/usr
/include/ncurses.h \
21 # $(STAGING_DIR)/usr/include/zlib.h \
29 --with-unix-socket-path
=/tmp \
34 --without-embedded-server \
35 --without-query-cache \
48 .stamp-configured
: $(BUILD_DEPS
)
57 $(TARGET_CONFIGURE_OPTS
) \
58 CFLAGS
="-I$(STAGING_DIR)/usr/include" \
59 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
60 OPTIMIZE_CFLAGS
="$(TARGET_CFLAGS)" \
61 OPTIMIZE_CXXFLAGS
="$(TARGET_CFLAGS)" \
64 ac_cv_sys_restartable_syscalls
=yes \
65 ac_cv_conv_longlong_to_float
=yes \
66 mysql_cv_compress
=yes \
67 mysql_cv_gethostname_style
=glibc2 \
69 --target
=$(GNU_TARGET_NAME
) \
70 --host
=$(GNU_TARGET_NAME
) \
71 --build
=$(GNU_HOST_NAME
) \
77 --datadir=/usr
/share \
78 --includedir=/usr
/include \
79 --infodir=/usr
/share
/info \
81 --libexecdir
=/usr
/lib \
82 --localstatedir
=/var \
83 --mandir=/usr
/share
/man \
86 $(DISABLE_LARGEFILE
) \
90 touch .stamp-configured
93 .stamp-built
: .stamp-configured
95 $(MAKE
) -C
"libmysql" \
97 LINK
="$(HOSTCC) -o conf_to_src -lc" \
102 SUBDIRS
="include libmysql" \
105 $(MAKE
) -C
"client" mysqladmin mysqlshow
110 $(INSTALL_DIR
)/usr
/include/mysql
/mysql.h
: .stamp-built
112 mkdir
-p
$(INSTALL_DIR
)
115 DESTDIR
="$(INSTALL_DIR)" \
116 SUBDIRS
="include libmysql" \
119 $(MAKE
) -C
"client" \
120 DESTDIR
="$(INSTALL_DIR)" \
121 bin_PROGRAMS
="mysqladmin mysqlshow" \
125 configure
: .stamp-configured
131 install: $(INSTALL_DIR
)/usr
/include/mysql
/mysql.h
134 package
: $(INSTALL_DIR
)/usr
/include/mysql
/mysql.h
136 mkdir
-p
$(I_LIBMYSQLCLIENT
)/usr
/lib
/
137 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/mysql
/libmysqlclient.so.
* $(I_LIBMYSQLCLIENT
)/usr
/lib
/
138 $(STRIP
) $(I_LIBMYSQLCLIENT
)/usr
/lib
/libmysqlclient.so.
*
140 mkdir
-p
$(I_LIBMYSQLCLIENT_DEV
)/usr
/include
141 cp
-fpR
$(INSTALL_DIR
)/usr
/include/mysql
$(I_LIBMYSQLCLIENT_DEV
)/usr
/include/
142 mkdir
-p
$(I_LIBMYSQLCLIENT_DEV
)/usr
/lib
/mysql
143 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/mysql
/libmysqlclient.a
$(I_LIBMYSQLCLIENT_DEV
)/usr
/lib
/mysql
/
144 cp
-fpR
$(INSTALL_DIR
)/usr
/lib
/mysql
/libmysqlclient.so
* $(I_LIBMYSQLCLIENT_DEV
)/usr
/lib
/mysql
/
146 mkdir
-p
$(I_MYSQL_UTILS
)/usr
/bin
147 cp
-fpR
$(INSTALL_DIR
)/usr
/bin
/mysqladmin
$(I_MYSQL_UTILS
)/usr
/bin
/
148 cp
-fpR
$(INSTALL_DIR
)/usr
/bin
/mysqlshow
$(I_MYSQL_UTILS
)/usr
/bin
/
149 $(STRIP
) $(I_MYSQL_UTILS
)/usr
/bin
/*
151 chmod
0755 ipkg
/*/CONTROL
/
152 chmod
0644 ipkg
/*/CONTROL
/control
154 perl
-pi
-e
"s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg
/*/CONTROL
/control
155 ifneq ($(strip $(PKG_VERSION
)),)
156 perl
-pi
-e
"s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg
/*/CONTROL
/control
159 $(IPKG_BUILD
) $(I_LIBMYSQLCLIENT
) $(IPKG_TARGET_DIR
)
160 $(IPKG_BUILD
) $(I_LIBMYSQLCLIENT_DEV
) $(IPKG_TARGET_DIR
)
161 $(IPKG_BUILD
) $(I_MYSQL_UTILS
) $(IPKG_TARGET_DIR
)
166 -$(MAKE
) -C
"client" \
167 DESTDIR
="$(INSTALL_DIR)" \
168 bin_PROGRAMS
="mysqladmin mysqlshow" \
172 DESTDIR
="$(INSTALL_DIR)" \
176 $(I_LIBMYSQLCLIENT
)/usr \
177 $(I_LIBMYSQLCLIENT_DEV
)/usr \
178 $(I_MYSQL_UTILS
)/usr \
183 @cat
$(I_LIBMYSQLCLIENT
)/CONTROL
/control
185 @cat
$(I_LIBMYSQLCLIENT_DEV
)/CONTROL
/control
187 @cat
$(I_MYSQL_UTILS
)/CONTROL
/control
191 .PHONY
: configure build
install package
clean control