pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/mysql-server Use the potential of bsd.pkg.in...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6577d708206a
branches:  trunk
changeset: 460462:6577d708206a
user:      seb <seb%pkgsrc.org@localhost>
date:      Sat Aug 30 20:05:13 2003 +0000

description:
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:

 databases/mysql-server/DEINSTALL |  32 --------------------------------
 databases/mysql-server/INSTALL   |  13 +------------
 databases/mysql-server/Makefile  |  12 ++----------
 3 files changed, 3 insertions(+), 54 deletions(-)

diffs (110 lines):

diff -r 2688bfa7ab74 -r 6577d708206a databases/mysql-server/DEINSTALL
--- a/databases/mysql-server/DEINSTALL  Sat Aug 30 20:02:05 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 2688bfa7ab74 -r 6577d708206a databases/mysql-server/INSTALL
--- a/databases/mysql-server/INSTALL    Sat Aug 30 20:02:05 2003 +0000
+++ b/databases/mysql-server/INSTALL    Sat Aug 30 20:05:13 2003 +0000
@@ -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 -r 2688bfa7ab74 -r 6577d708206a databases/mysql-server/Makefile
--- a/databases/mysql-server/Makefile   Sat Aug 30 20:02:05 2003 +0000
+++ b/databases/mysql-server/Makefile   Sat Aug 30 20:05:13 2003 +0000
@@ -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 @@
 .  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 @@
 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 @@
        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"



Home | Main Index | Thread Index | Old Index