summaryrefslogtreecommitdiff
path: root/databases/mysql51-client/Makefile
blob: 05680d8383d9ba54f7c960e5cdf3eece3a0d30f2 (plain) (blame)
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
# ports collection makefile for:	mySQL
# Version required:			v3.21.21
# Date created:				26 Jan 1998
# Whom:					Josh Tiefenbach <josh@ican.net>
#
# $Id: Makefile,v 1.15 1998/01/26 18:24:42 jfitz Exp $
#

DISTNAME=	mysql-3.21.21a-beta
PKGNAME=	mysql-3.21.21b
CATEGORIES=	databases
MASTER_SITES=	http://www.buoy.com/mysql/Downloads/MySQL-3.21/ \
		http://mysql.polaris.ca/Downloads/MySQL-3.21/ \
		http://www.tcx.se/Downloads/MySQL-3.21/

MAINTAINER=	josh@ican.net

MAN1=		mysql.1

USE_GMAKE=	YES
USE_PERL5=	YES
GNU_CONFIGURE=	YES
CONFIGURE_ARGS=	--localstatedir=/var/db/mysql \
		--with-MAKE=gmake \
		--without-perl \
		--without-debug \
		--without-readline
CONFIGURE_ENV+=	PERL=${PREFIX}/bin/perl INSTALL_SCRIPT="${INSTALL_SCRIPT}"

pre-install:
.if defined(PACKAGE_BUILDING)
	@ ${RM} -rf /var/db/mysql
.endif
	@ ${SETENV} ${MAKE_ENV} /usr/bin/perl ${SCRIPTDIR}/check_old_version

post-install:
	${MKDIR} -p ${PREFIX}/share/mysql/mysql
	${CP} ${WRKSRC}/data/mysql/*.frm ${PREFIX}/share/mysql/mysql
	${PREFIX}/bin/mysql_install_db
	@ /usr/bin/killall mysqld
	@ ${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/mysql.sh
	@ ${ECHO} "#" >> ${PREFIX}/etc/rc.d/mysql.sh
	@ ${ECHO} "" >> ${PREFIX}/etc/rc.d/mysql.sh
	@ ${ECHO} "if [ -x ${PREFIX}/bin/safe_mysqld ]" >> ${PREFIX}/etc/rc.d/mysql.sh
	@ ${ECHO} "then" >> ${PREFIX}/etc/rc.d/mysql.sh
	@ ${ECHO} "	${PREFIX}/bin/safe_mysqld & && ${ECHO} -n ' mysql'" >> ${PREFIX}/etc/rc.d/mysql.sh
	@ ${ECHO} "fi" >> ${PREFIX}/etc/rc.d/mysql.sh
	@ /bin/chmod 750 ${PREFIX}/etc/rc.d/mysql.sh
	${MKDIR} ${PREFIX}/share/doc/mysql
.for doc in manual.html manual.ps manual_toc.html manual.txt manual.texi include.texi
	${INSTALL_DATA} ${WRKSRC}/Docs/${doc} ${PREFIX}/share/doc/mysql
.endfor

.include <bsd.port.mk>