diff options
author | Dirk Froemberg <dirk@FreeBSD.org> | 1999-08-11 20:56:03 +0000 |
---|---|---|
committer | Dirk Froemberg <dirk@FreeBSD.org> | 1999-08-11 20:56:03 +0000 |
commit | e1d84112f97ccf9fe8e38378c62366405cb2ed34 (patch) | |
tree | e73b487ca32a04cdae9a194110a5c14eb59acdb9 /databases/mysql55-server | |
parent | cf69eadaa4d236a3791e8db2fdf4b7b58f52ab15 (diff) | |
download | ports-e1d84112f97ccf9fe8e38378c62366405cb2ed34.tar.gz ports-e1d84112f97ccf9fe8e38378c62366405cb2ed34.zip |
Notes
Diffstat (limited to 'databases/mysql55-server')
-rw-r--r-- | databases/mysql55-server/Makefile | 28 | ||||
-rw-r--r-- | databases/mysql55-server/pkg-install | 9 |
2 files changed, 27 insertions, 10 deletions
diff --git a/databases/mysql55-server/Makefile b/databases/mysql55-server/Makefile index 74150a861df0..2793a9837969 100644 --- a/databases/mysql55-server/Makefile +++ b/databases/mysql55-server/Makefile @@ -3,7 +3,7 @@ # Date created: 26 Jan 1998 # Whom: Josh Tiefenbach <josh@ican.net> # -# $Id: Makefile,v 1.58 1999/07/04 14:55:11 dirk Exp $ +# $Id: Makefile,v 1.59 1999/07/05 18:11:36 dirk Exp $ # DISTNAME= mysql-3.22.24 @@ -15,17 +15,18 @@ MASTER_SITES= http://www.fh-wolfenbuettel.de/ftp/pub/database/mysql/Downloads/My ftp://ftp.plig.net/pub/mysql/Downloads/MySQL-3.22/ \ ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-3.22/ -MAINTAINER= dirk@FreeBSD.ORG +MAINTAINER= dirk@FreeBSD.org .if ${MACHINE_ARCH} == "alpha" BROKEN= doesn\'t build on the alpha yet .endif -Y2K= http://www.tcx.se/Manual_chapter/manual_Introduction.html#Year_2000_compliance +Y2K= http://www.tcx.se/Manual_chapter/manual_Introduction.html#Year_2000_compliance +DB_DIR?= /var/db/mysql USE_PERL5= yes USE_LIBTOOL= yes -CONFIGURE_ARGS= --localstatedir=/var/db/mysql \ +CONFIGURE_ARGS= --localstatedir=${DB_DIR} \ --without-perl \ --without-debug \ --without-readline \ @@ -71,14 +72,27 @@ pre-fetch: .endif pre-install: -.if !defined(PACKAGE_BUILDING) - @${SETENV} ${MAKE_ENV} ${PERL5} ${SCRIPTDIR}/check_old_version +.if !defined(PACKAGE_BUILDING) && 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 post-install: .if !defined(PACKAGE_BUILDING) ${PREFIX}/bin/mysql_install_db - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SETENV} DB_DIR=${DB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif @${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "#" >> ${PREFIX}/etc/rc.d/mysql-server.sh diff --git a/databases/mysql55-server/pkg-install b/databases/mysql55-server/pkg-install index 1c5dd869d825..3e925021ede1 100644 --- a/databases/mysql55-server/pkg-install +++ b/databases/mysql55-server/pkg-install @@ -1,6 +1,9 @@ #!/bin/sh -PATH=/usr/sbin +PATH=/bin:/usr/sbin +if [ -z "${DB_DIR}" ]; then + DB_DIR=/var/db/mysql +fi case $2 in POST-INSTALL) @@ -24,7 +27,7 @@ POST-INSTALL) echo "You already have a user \"${USER}\", so I will use it." else if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d /var/db/mysql -s /sbin/nologin -c "MySQL Daemon" + -d ${DB_DIR} -s /sbin/nologin -c "MySQL Daemon" then echo "Added user \"${USER}\"." else @@ -33,6 +36,6 @@ POST-INSTALL) fi fi - chown -R ${USER}.${GROUP} /var/db/mysql + chown -R ${USER}.${GROUP} ${DB_DIR} ;; esac |