summaryrefslogtreecommitdiff
path: root/databases/mysql-client/Makefile
blob: 3de39533c1308f6f7cb6777ef780d88a8ad0d204 (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
# $NetBSD: Makefile,v 1.15 2001/10/18 15:20:05 veego Exp $
#

.include "../../databases/mysql-client/Makefile.common"

PKGNAME=		${DISTNAME:S/-/-client-/}
SVR4_PKGNAME=		mysqc
COMMENT=		MySQL, a free SQL database (client)

INFO_FILES=		mysql.info

CONFIGURE_ARGS+=	--without-server

.if exists(/usr/include/readline.h) || exists(/usr/include/readline/readline.h)
CONFIGURE_ENV+=		readline_lib="edit"
.else
DEPENDS+=		readline>=4.0:../../devel/readline
CPPFLAGS+=		-I${LOCALBASE}/include
.endif

# The compilation looks for <readline/readline.h>, so make sure
# /usr/include/readline.h may be accessed that way if it's the readline
# header available on the system.
#
.if exists(/usr/include/readline.h)
CPPFLAGS+=		-I${WRKDIR}

pre-build:
	${RM} -f ${WRKDIR}/readline
	${LN} -sf /usr/include ${WRKDIR}/readline
.endif

post-install:
	cd ${PREFIX}/man/man1; ${RM} -f mysqld.1 safe_mysqld.1
	${INSTALL_DATA} ${WRKSRC}/Docs/mysql.info ${PREFIX}/info

.include "../../mk/bsd.pkg.mk"