blob: 298c98923a97aee73a0278e5147c26804c18c09f (
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
66
67
68
69
70
71
|
# $NetBSD: Makefile,v 1.37 2003/03/24 03:06:34 grant Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
PKGREVISION= 3
SVR4_PKGNAME= mysqs
COMMENT= MySQL, a free SQL database (server)
.include "../mysql-client/Makefile.common"
CONFIGURE_ARGS+= --with-libwrap
CONFIGURE_ARGS+= --without-berkeley-db
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
USE_GMAKE= YES
ONLY_FOR_PLATFORM= SunOS-*-sparc Linux-*-*
# on NetBSD, if native threads are not available, hardwire
# included mit-pthreads, as this doesn't yet work properly with pth
.if ${OPSYS} == "NetBSD"
. if exists(/usr/include/pthread.h)
# native pthreads
ONLY_FOR_PLATFORM+= NetBSD-*-*
. else
# force included mit-pthreads
CONFIGURE_ARGS+= --with-mit-threads
# platforms on which included mit-pthreads is usable
ONLY_FOR_PLATFORM+= NetBSD-*-alpha NetBSD-*-arm32 NetBSD-*-i386 \
NetBSD-*-sparc NetBSD-*-m68k NetBSD-*-powerpc
. endif
.endif
DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
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}
MESSAGE_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR} \
MYSQL_USER=${MYSQL_USER} MYSQL_GROUP=${MYSQL_GROUP}
BUILD_DEFS+= MYSQL_DATADIR
MAKE_DIRS_PERMS+= ${MYSQL_DATADIR} ${MYSQL_USER} ${MYSQL_GROUP} 0700
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
pre-install:
${SED} -e "s|@MYSQL_DATADIR@|${MYSQL_DATADIR}|g" \
-e "s|@CAT@|${CAT}|g" \
${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
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
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
.include "../../databases/mysql-client/buildlink2.mk"
.include "../../security/tcp_wrappers/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
|