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_FILE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
18 PKG_SOURCE_CAT
:= zcat
19 PKG_SOURCE_DIR
:= $(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_SOURCE_DIR
)
21 PKG_IPK
:= $(PACKAGE_DIR
)/libmysqlclient_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
22 PKG_IPK_DIR
:= $(PKG_BUILD_DIR
)/ipkg
24 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
26 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
28 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
29 $(PKG_SOURCE_CAT
) $(DL_DIR
)/$(PKG_SOURCE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
30 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
31 touch
$(PKG_BUILD_DIR
)/.patched
33 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
34 (cd
$(PKG_BUILD_DIR
); rm -rf config.cache
; \
40 $(TARGET_CONFIGURE_OPTS
) \
41 CFLAGS
="-I$(STAGING_DIR)/usr/include" \
42 LDFLAGS
="-L$(STAGING_DIR)/usr/lib" \
43 OPTIMIZE_CFLAGS
="$(TARGET_CFLAGS)" \
44 OPTIMIZE_CXXFLAGS
="$(TARGET_CFLAGS)" \
47 ac_cv_sys_restartable_syscalls
=yes \
48 ac_cv_conv_longlong_to_float
=yes \
49 mysql_cv_compress
=yes \
50 mysql_cv_gethostname_style
=glibc2 \
52 --target
=$(GNU_TARGET_NAME
) \
53 --host
=$(GNU_TARGET_NAME
) \
54 --build
=$(GNU_HOST_NAME
) \
59 --libexecdir
=/usr
/lib \
61 --datadir=/usr
/share \
62 --localstatedir
=/var \
70 --with-unix-socket-path
=/tmp \
75 --without-embedded-server \
76 --without-query-cache \
84 $(DISABLE_LARGEFILE
) \
86 touch
$(PKG_BUILD_DIR
)/.configured
88 $(PKG_BUILD_DIR
)/libmysql
/.libs
/libmysqlclient.so
: $(PKG_BUILD_DIR
)/.configured
89 $(MAKE
) -C
"$(PKG_BUILD_DIR)/libmysql" \
91 LINK
="$(HOSTCC) -o conf_to_src -lc" \
94 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
95 SUBDIRS
="include libmysql" \
98 $(STAGING_DIR
)/include/mysql
/mysql.h
: $(PKG_BUILD_DIR
)/libmysql
/.libs
/libmysqlclient.so
99 $(MAKE
) -C
"$(PKG_BUILD_DIR)" \
100 DESTDIR
="$(STAGING_DIR)" \
101 SUBDIRS
="include libmysql" \
104 $(PKG_IPK
): $(PKG_BUILD_DIR
)/libmysql
/.libs
/libmysqlclient.so
105 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IPK_DIR
) libmysqlclient.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
106 mkdir
-p
$(PKG_IPK_DIR
)/usr
/lib
107 cp
$< $(PKG_IPK_DIR
)/usr
/lib
/
108 $(STRIP
) $(PKG_IPK_DIR
)/usr
/lib
/*
109 mkdir
-p
$(PACKAGE_DIR
)
110 $(IPKG_BUILD
) $(PKG_IPK_DIR
) $(PACKAGE_DIR
)
112 $(IPKG_STATE_DIR
)/info/libmysqlclient.list
: $(PKG_IPK
)
113 $(IPKG
) install $(PKG_IPK
)
115 source
: $(DL_DIR
)/$(PKG_SOURCE
)
116 prepare
: $(PKG_BUILD_DIR
)/.patched
117 compile
: $(STAGING_DIR
)/include/mysql
/mysql.h
$(PKG_IPK
)
118 install: $(IPKG_STATE_DIR
)/info/libmysqlclient.list
121 rm -rf
$(PKG_BUILD_DIR
)