blob: 216e934f1481464f45cbbf4e6a3bf3b5754c0fbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# $NetBSD: Makefile,v 1.3 2004/10/31 06:57:05 grant Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
PKGREVISION= 1
SVR4_PKGNAME= mysqs
COMMENT= MySQL 3, a free SQL database (server)
.include "../../databases/mysql3-client/Makefile.common"
CONFIGURE_ARGS+= --without-berkeley-db
USE_BUILDLINK3= YES
USE_GNU_TOOLS+= make
USE_PKGINSTALL= YES
INSTALL_EXTRA_TMPL+= ${.CURDIR}/INSTALL
PTHREAD_OPTS= require
CONFIGURE_ARGS+= --with-pthreads
PKG_USERS= ${MYSQL_USER}:${MYSQL_GROUP}::MySQL\\ database\\ administrator:${MYSQL_DATADIR}:${SH}
PKG_GROUPS= ${MYSQL_GROUP}
RCD_SCRIPTS= mysqld
CONFIGURE_ARGS+= --with-mysqld-user=${MYSQL_USER}
FILES_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR}
FILES_SUBST+= MYSQL_USER=${MYSQL_USER}
FILES_SUBST+= MYSQL_GROUP=${MYSQL_GROUP}
MESSAGE_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR} \
MYSQL_USER=${MYSQL_USER} MYSQL_GROUP=${MYSQL_GROUP}
BUILD_DEFS+= MYSQL_DATADIR
OWN_DIRS_PERMS+= ${MYSQL_DATADIR} ${MYSQL_USER} ${MYSQL_GROUP} 0700
# XXX TCP wrapper support is broken on (at least) Linux and Solaris.
# ref: http://bugs.mysql.com/bug.php?id=599
# http://mail-index.netbsd.org/tech-pkg/2003/08/07/0003.html
.if ${OPSYS} != "Linux" && ${OPSYS} != "SunOS"
CONFIGURE_ARGS+= --with-libwrap
. include "../../security/tcp_wrappers/buildlink3.mk"
.endif
post-configure:
cd ${WRKSRC} && ${CP} -f config.h include/my_config.h
post-build:
cd ${WRKSRC}/scripts && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} \
${MAKE_FLAGS} safe_mysqld mysql_install_db
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/scripts/safe_mysqld ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/scripts/mysql_install_db ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/support-files/mysql.server ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/mysqld.1 ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/man/safe_mysqld.1 ${PREFIX}/man/man1
.include "../../mk/pthread.buildlink3.mk"
.include "../../databases/mysql3-client/buildlink3.mk"
.if ${PTHREAD_TYPE} == "pth"
CFLAGS+= -DSIGNALS_DONT_BREAK_READ
CXXFLAGS+= -DSIGNALS_DONT_BREAK_READ
CONFIGURE_ENV+= ac_cv_func_pthread_setschedparam=no
CONFIGURE_ENV+= ac_cv_func_pthread_attr_setschedparam=no
.endif
.include "../../mk/bsd.pkg.mk"
|