openbsd-ports/databases/mysql/Makefile
brad 713b891944 - forgot to run the INSTALL script again for the post-install target
- fix mysql_install_db to pickup the hostname that's used while creating
the database
- add a missing brace for DB_DIR in INSTALL script
- run mysql_install_db as user mysql to make sure the database has proper
file permissions
--
Reported by: Peter Strömberg <peter.stromberg@commentor.se>
2000-01-04 17:39:42 +00:00

79 lines
2.8 KiB
Makefile

# $OpenBSD: Makefile,v 1.10 2000/01/04 17:39:42 brad Exp $
# $FreeBSD: Makefile,v 1.44 1999/03/04 21:27:58 dirk Exp $
DISTNAME= mysql-3.22.29
CATEGORIES= databases
MASTER_SITES= http://www.mysql.org/Downloads/MySQL-3.22/ \
http://web.tryc.on.ca/mysql/Downloads/MySQL-3.22/ \
http://mysql.he.net/Downloads/MySQL-3.22/ \
http://www.buoy.com/mysql/Downloads/MySQL-3.22/ \
ftp://ftp.netcasting.net/pub/mysql/Downloads/MySQL-3.22/ \
http://www.mysql.net/Downloads/MySQL-3.22/ \
http://www.gina.net/mysql/Downloads/MySQL-3.22/ \
http://mysql.pingzero.net/Downloads/MySQL-3.22/ \
ftp://ftp.digex.net/pub/packages/database/mysql/Downloads/MySQL-3.22/
MAINTAINER= ports@openbsd.org
.if ${MACHINE_ARCH} == "sparc"
BROKEN= "pthreads are currently not working SPARC"
.endif
DB_DIR?= /var/mysql
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir="${DB_DIR}" \
--without-perl \
--without-debug \
--without-readline \
--without-bench \
--without-mit-threads \
--with-unix-socket-path="${DB_DIR}/mysql.sock"
pre-build:
@echo ""
@echo "*** WARNING: you may see an error such as"
@echo "*** virtual memory exhausted"
@echo "*** when building this package. If you do you must increase"
@echo "*** your limits. See the man page for your shell and look"
@echo "*** for the 'limit' or 'ulimit' command."
@echo ""
pre-install:
@sed -e "s|@PREFIX@|${PREFIX}|" ${FILESDIR}/startup.sh > ${WRKDIR}/startup.sh
.if !defined(PACKAGE_BUILDING)
.if exists(${DB_DIR}) && !defined(OVERWRITE_DB)
@echo "You appear to already have a mysql database directory in ${DB_DIR}."
@echo ""
@echo "In order to preserve your existing data, you should:"
@echo " - dump all your databases"
@echo " - kill mysql if it is running"
@echo " - delete the ${DB_DIR} directory"
@echo " - run 'make install'"
@echo " - start up mysql"
@echo " - re-create all of your database"
@echo " - re-load your data"
@echo ""
@echo "If you understand the consequences of this upgrade, please re-build this"
@echo "port with the environment variable OVERWRITE_DB defined."
@false
.endif
@PKG_PREFIX="${PREFIX}" PKG_DB_DIR="${DB_DIR}" sh ${PKGDIR}/INSTALL ${DISTNAME} PRE-INSTALL
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mysql
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mysql/Img
${INSTALL_DATA_DIR} ${PREFIX}/share/mysql/mysql
${INSTALL_SCRIPT} ${WRKDIR}/startup.sh ${PREFIX}/lib/mysql
cd ${WRKSRC}/Docs; ${INSTALL_DATA} manual.html manual.ps \
manual_toc.html manual.txt ${PREFIX}/share/doc/mysql
${INSTALL_DATA} ${WRKSRC}/Docs/Img/*.gif ${PREFIX}/share/doc/mysql/Img
@install-info ${PREFIX}/info/mysql.info ${PREFIX}/info/dir
@${LDCONFIG} -m ${PREFIX}/lib/mysql
.if !defined(PACKAGE_BUILDING)
@PKG_PREFIX="${PREFIX}" PKG_DB_DIR="${DB_DIR}" sh ${PKGDIR}/INSTALL ${DISTNAME} POST-INSTALL
.endif
.include <bsd.port.mk>