3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=408d3001ed715ddc90009c247e548638
11 http
://mysql.he.net
/Downloads
/MySQL-4.0
/ \
12 http
://www.linorg.usp.br
/mysql
/Downloads
/MySQL-4.0
/ \
13 http
://mysql.planetmirror.com
/Downloads
/MySQL-4.0
/ \
14 http
://mysql.holywar.net
/Downloads
/MySQL-4.0
/ \
15 http
://netmirror.org
/mirror
/mysql.com
/Downloads
/MySQL-4.0
/ \
16 http
://nthill.free.fr
/openwrt
/sources
/$(PKG_NAME
)/
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 IPKG_LIBMYSQLCLIENT
:=$(PACKAGE_DIR
)/libmysqlclient_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
23 IDIR_LIBMYSQLCLIENT
:=$(PKG_BUILD_DIR
)/ipkg
/libmysqlclient
24 INFO_LIBMYSQLCLIENT
:=$(IPKG_STATE_DIR
)/info/libmysqlclient.list
26 $(DL_DIR
)/$(PKG_SOURCE
):
27 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
29 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
30 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
31 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
32 touch
$(PKG_BUILD_DIR
)/.prepared
34 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.prepared
35 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache config.status
; \
41 $(TARGET_CONFIGURE_OPTS
) \
42 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
43 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
44 OPTIMIZE_CFLAGS
="$(TARGET_CFLAGS)" \
45 OPTIMIZE_CXXFLAGS
="$(TARGET_CFLAGS)" \
48 ac_cv_sys_restartable_syscalls
=yes \
49 ac_cv_conv_longlong_to_float
=yes \
50 mysql_cv_compress
=yes \
51 mysql_cv_gethostname_style
=glibc2 \
53 --target
=$(GNU_TARGET_NAME
) \
54 --host
=$(GNU_TARGET_NAME
) \
55 --build
=$(GNU_HOST_NAME
) \
61 --datadir=/usr
/share \
62 --includedir=/usr
/include \
63 --infodir=/usr
/share
/info \
65 --libexecdir
=/usr
/lib \
66 --localstatedir
=/var \
67 --mandir=/usr
/share
/man \
71 $(DISABLE_LARGEFILE
) \
77 --with-unix-socket-path
=/tmp \
82 --without-embedded-server \
83 --without-query-cache \
91 touch
$(PKG_BUILD_DIR
)/.configured
93 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.configured
94 $(MAKE
) -C
"$(PKG_BUILD_DIR)/libmysql" \
96 LINK
="$(HOSTCC) -o conf_to_src -lc" \
99 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
100 SUBDIRS
="include libmysql" \
102 touch
$(PKG_BUILD_DIR
)/.built
104 $(STAGING_DIR
)/usr
/lib
/mysql
/libmysqlclient.so
: $(PKG_BUILD_DIR
)/.built
105 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
106 DESTDIR
="$(STAGING_DIR)" \
107 SUBDIRS
="include libmysql" \
109 rm -rf
$(STAGING_DIR
)/usr
/lib
/mysql
/libmysqlclient.la
111 $(IPKG_LIBMYSQLCLIENT
): $(STAGING_DIR
)/usr
/lib
/mysql
/libmysqlclient.so
112 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBMYSQLCLIENT
) .
/ipkg
/libmysqlclient.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
113 mkdir
-p
$(IDIR_LIBMYSQLCLIENT
)/usr
/lib
114 cp
-fpR
$(STAGING_DIR
)/usr
/lib
/mysql
/libmysqlclient.so.
* $(IDIR_LIBMYSQLCLIENT
)/usr
/lib
/
115 $(STRIP
) $(IDIR_LIBMYSQLCLIENT
)/usr
/lib
/*.so
*
116 mkdir
-p
$(PACKAGE_DIR
)
117 $(IPKG_BUILD
) $(IDIR_LIBMYSQLCLIENT
) $(PACKAGE_DIR
)
119 $(INFO_LIBMYSQLCLIENT
): $(IPKG_LIBMYSQLCLIENT
)
120 $(IPKG
) install $(IPKG_LIBMYSQLCLIENT
)
122 source
: $(DL_DIR
)/$(PKG_SOURCE
)
123 prepare
: $(PKG_BUILD_DIR
)/.prepared
124 compile
: $(IPKG_LIBMYSQLCLIENT
)
125 install: $(INFO_LIBMYSQLCLIENT
)
128 -$(MAKE
) -C
"$(PKG_BUILD_DIR)" \
129 DESTDIR
="$(STAGING_DIR)" \
130 SUBDIRS
="include libmysql" \
132 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_LIBMYSQLCLIENT
)