source: freewrt/package/mysql/Makefile@ 60400f9

freewrt_1_0 freewrt_2_0
Last change on this file since 60400f9 was 60400f9, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

mysql_config need to be exectuable

git-svn-id: svn://www.freewrt.org/trunk/freewrt@617 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 3.6 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= mysql
10PKG_VERSION:= 5.0.18
11PKG_RELEASE:= 1
12PKG_MD5SUM:= f18153b0239aaa03fc5a751f2d82cb71
13
14PKG_SOURCE_URL:=\
15 http://mysql.planetmirror.com/Downloads/MySQL-5.0/ \
16 http://mysql.he.net/Downloads/MySQL-5.0/ \
17 http://www.linorg.usp.br/mysql/Downloads/MySQL-5.0/ \
18 http://mysql.holywar.net/Downloads/MySQL-5.0/
19PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20
21include $(TOPDIR)/mk/package.mk
22
23$(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24
25$(WRKBUILD)/.configured:
26 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
27 touch configure.in; \
28 touch aclocal.m4; \
29 touch Makefile.in; \
30 touch config.h.in; \
31 touch configure; \
32 $(TARGET_CONFIGURE_OPTS) \
33 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
34 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
35 OPTIMIZE_CFLAGS="$(TARGET_CFLAGS)" \
36 OPTIMIZE_CXXFLAGS="$(TARGET_CFLAGS)" \
37 ac_atomic_add=yes \
38 ac_atomic_sub=yes \
39 ac_cv_sys_restartable_syscalls=yes \
40 ac_cv_conv_longlong_to_float=yes \
41 mysql_cv_compress=yes \
42 mysql_cv_gethostname_style=glibc2 \
43 ./configure \
44 --target=$(GNU_TARGET_NAME) \
45 --host=$(GNU_TARGET_NAME) \
46 --build=$(GNU_HOST_NAME) \
47 --program-prefix="" \
48 --program-suffix="" \
49 --prefix=/usr \
50 --exec-prefix=/usr \
51 --bindir=/usr/bin \
52 --datadir=/usr/share \
53 --includedir=/usr/include \
54 --infodir=/usr/share/info \
55 --libdir=/usr/lib \
56 --libexecdir=/usr/lib \
57 --localstatedir=/var \
58 --mandir=/usr/share/man \
59 --sbindir=/usr/sbin \
60 --sysconfdir=/etc \
61 --enable-largefile \
62 --disable-nls \
63 --enable-shared \
64 --enable-static \
65 --disable-assembler \
66 --with-pthread \
67 --without-raid \
68 --with-unix-socket-path=/tmp \
69 --without-libwrap \
70 --without-pstack \
71 --with-low-memory \
72 --without-server \
73 --without-embedded-server \
74 --without-query-cache \
75 --without-mysqlfs \
76 --without-vio \
77 --without-openssl \
78 --without-docs \
79 --without-bench \
80 --without-readline \
81 );
82 touch $@
83
84$(WRKBUILD)/.built:
85 $(MAKE) -C "$(WRKBUILD)" \
86 SUBDIRS="include" \
87 DESTDIR="$(WRKINST)" \
88 all install
89 $(MAKE) -C "$(WRKBUILD)/libmysql" \
90 CC="$(HOSTCC)" \
91 LINK="$(HOSTCC) -o conf_to_src -lc" \
92 CFLAGS="" \
93 conf_to_src
94 $(MAKE) -C "$(WRKBUILD)" \
95 SUBDIRS="libmysql" \
96 DESTDIR="$(WRKINST)" \
97 all install
98 $(MAKE) -C "$(WRKBUILD)" \
99 SUBDIRS="scripts" \
100 DESTDIR="$(WRKINST)" \
101 bin_SCRIPTS="mysql_config" \
102 install
103 touch $@
104
105$(IPKG_LIBMYSQLCLIENT):
106 $(INSTALL_DIR) $(IDIR_LIBMYSQLCLIENT)/usr/lib
107 $(INSTALL_DATA) $(WRKINST)/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: $(WRKBUILD)/.built
112 $(INSTALL_DIR) $(STAGING_DIR)/usr/bin
113 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/mysql
114 $(INSTALL_DIR) $(STAGING_DIR)/usr/include/mysql
115 $(INSTALL_BIN) $(WRKINST)/usr/bin/mysql_config $(STAGING_DIR)/usr/bin/
116 $(INSTALL_DATA) $(WRKINST)/usr/include/mysql/* $(STAGING_DIR)/usr/include/mysql
117 $(INSTALL_DATA) $(WRKINST)/usr/lib/mysql/* $(STAGING_DIR)/usr/lib/mysql
118 rm -f $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.la
119 touch $@
120
121install-dev: $(STAGING_DIR)/usr/lib/mysql/libmysqlclient.so
122
123uninstall-dev:
124 rm -rf \
125 $(STAGING_DIR)/usr/bin/mysql_config \
126 $(STAGING_DIR)/usr/include/mysql \
127 $(STAGING_DIR)/usr/lib/mysql \
128
129compile-targets: install-dev
130clean-targets: uninstall-dev
Note: See TracBrowser for help on using the repository browser.