summaryrefslogtreecommitdiff
path: root/databases/mysql-server
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2003-08-30 20:05:13 +0000
committerseb <seb@pkgsrc.org>2003-08-30 20:05:13 +0000
commitffb634dba4f8cf98d9303350c69feff299423c86 (patch)
treeb40932c949827a751b6f07aa5be25a411dc87224 /databases/mysql-server
parentdebf0fbc7cfd190b6d95d2705d36fabbc49ae545 (diff)
downloadpkgsrc-ffb634dba4f8cf98d9303350c69feff299423c86.tar.gz
Use the potential of bsd.pkg.install.mk:
- Remove extraneous bits in the INSTALL script snippet and let the framework execute the script at post-install time. - Use OWN_DIRS_PERMS instead of MAKE_DIRS_PERMS for ${MYSQL_DATADIR} thus save a DEINSTALL script snippet and its handling.
Diffstat (limited to 'databases/mysql-server')
-rw-r--r--databases/mysql-server/DEINSTALL32
-rw-r--r--databases/mysql-server/INSTALL13
-rw-r--r--databases/mysql-server/Makefile12
3 files changed, 3 insertions, 54 deletions
diff --git a/databases/mysql-server/DEINSTALL b/databases/mysql-server/DEINSTALL
deleted file mode 100644
index d7ed9b322bc..00000000000
--- a/databases/mysql-server/DEINSTALL
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: DEINSTALL,v 1.2 2003/01/21 06:02:41 lukem Exp $
-
-: ${PKGNAME:=$1}
-: ${STAGE:=$2}
-
-MYSQL_DATADIR="@MYSQL_DATADIR@"
-
-CAT="@CAT@"
-
-case ${STAGE} in
-DEINSTALL)
- ;;
-
-POST-DEINSTALL)
- ${CAT} << EOF
-===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want
-to remove the following directories:
-
- ${MYSQL_DATADIR}
-===========================================================================
-EOF
- ;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
-esac
-exit 0
diff --git a/databases/mysql-server/INSTALL b/databases/mysql-server/INSTALL
index 7a7d8ac0dfe..d1cdecf482c 100644
--- a/databases/mysql-server/INSTALL
+++ b/databases/mysql-server/INSTALL
@@ -1,23 +1,12 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.2 2003/01/21 06:02:41 lukem Exp $
-
-: ${PKGNAME:=$1}
-: ${STAGE:=$2}
+# $NetBSD: INSTALL,v 1.3 2003/08/30 20:05:13 seb Exp $
case ${STAGE} in
-PRE-INSTALL)
- ;;
-
POST-INSTALL)
echo "-------------------------------"
echo "Initializing MySQL databases..."
echo "-------------------------------"
${PKG_PREFIX}/bin/mysql_install_db --force
;;
-
-*)
- echo "Unexpected argument: ${STAGE}"
- exit 1
- ;;
esac
diff --git a/databases/mysql-server/Makefile b/databases/mysql-server/Makefile
index e9368378823..f7f5f80f3c0 100644
--- a/databases/mysql-server/Makefile
+++ b/databases/mysql-server/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2003/08/24 02:00:59 taca Exp $
+# $NetBSD: Makefile,v 1.41 2003/08/30 20:05:13 seb Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
PKGREVISION= 4
@@ -34,8 +34,6 @@ ONLY_FOR_PLATFORM+= NetBSD-*-alpha NetBSD-*-arm NetBSD-*-arm32 \
. 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
@@ -44,7 +42,7 @@ 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
+OWN_DIRS_PERMS+= ${MYSQL_DATADIR} ${MYSQL_USER} ${MYSQL_GROUP} 0700
post-configure:
cd ${WRKSRC} && ${CP} -f config.h include/my_config.h
@@ -53,18 +51,12 @@ 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"