source: freewrt/package/mysql/Makefile@ f571a06c

freewrt_1_0 freewrt_2_0
Last change on this file since f571a06c was d419478, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

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

  • Property mode set to 100644
File size: 3.4 KB
Line 
1# $Id: Makefile 3112 2006-02-01 23:53:19Z mbm $
2
3include $(TOPDIR)/rules.mk
4
5PKG_NAME:=mysql
6PKG_VERSION:=5.0.18
7PKG_RELEASE:=1
8PKG_MD5SUM:=f18153b0239aaa03fc5a751f2d82cb71
9
10PKG_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
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17
18
19include $(TOPDIR)/package/rules.mk
20
21$(eval $(call PKG_template,LIBMYSQLCLIENT,libmysqlclient,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22
23$(WRKBUILD)/.configured:
24 (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
25 touch configure.in; \
26 touch aclocal.m4; \
27 touch Makefile.in; \
28 touch config.h.in; \
29 touch configure; \
30 $(TARGET_CONFIGURE_OPTS) \
31 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
32 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
33 OPTIMIZE_CFLAGS="$(TARGET_CFLAGS)" \
34 OPTIMIZE_CXXFLAGS="$(TARGET_CFLAGS)" \
35 ac_atomic_add=yes \
36 ac_atomic_sub=yes \
37 ac_cv_sys_restartable_syscalls=yes \
38 ac_cv_conv_longlong_to_float=yes \
39 mysql_cv_compress=yes \
40 mysql_cv_gethostname_style=glibc2 \
41 ./configure \
42 --target=$(GNU_TARGET_NAME) \
43 --host=$(GNU_TARGET_NAME) \
44 --build=$(GNU_HOST_NAME) \
45 --program-prefix="" \
46 --program-suffix="" \
47 --prefix=/usr \
48 --exec-prefix=/usr \
49 --bindir=/usr/bin \
50 --datadir=/usr/share \
51 --includedir=/usr/include \
52 --infodir=/usr/share/info \
53 --libdir=/usr/lib \
54 --libexecdir=/usr/lib \
55 --localstatedir=/var \
56 --mandir=/usr/share/man \
57 --sbindir=/usr/sbin \
58 --sysconfdir=/etc \
59 --enable-largefile \
60 --disable-nls \
61 --enable-shared \
62 --enable-static \
63 --disable-assembler \
64 --with-pthread \
65 --without-raid \
66 --with-unix-socket-path=/tmp \
67 --without-libwrap \
68 --without-pstack \
69 --with-low-memory \
70 --without-server \
71 --without-embedded-server \
72 --without-query-cache \
73 --without-mysqlfs \
74 --without-vio \
75 --without-openssl \
76 --without-docs \
77 --without-bench \
78 --without-readline \
79 );
80 touch $@
81
82$(WRKBUILD)/.built:
83 rm -rf $(WRKINST)
84 mkdir -p $(WRKINST)
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 -d -m0755 $(IDIR_LIBMYSQLCLIENT)/usr/lib
107 $(CP) $(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 mkdir -p $(STAGING_DIR)/usr/bin
113 $(CP) $(WRKINST)/usr/bin/mysql_config $(STAGING_DIR)/usr/bin/
114 mkdir -p $(STAGING_DIR)/usr/include
115 $(CP) $(WRKINST)/usr/include/mysql $(STAGING_DIR)/usr/include/
116 mkdir -p $(STAGING_DIR)/usr/lib
117 $(CP) $(WRKINST)/usr/lib/mysql $(STAGING_DIR)/usr/lib/
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.