pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/databases mariadb*: Simplify variable assignment and d...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2481f592aaf7
branches: trunk
changeset: 453215:2481f592aaf7
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Tue May 25 11:14:54 2021 +0000
description:
mariadb*: Simplify variable assignment and dedup.
diffstat:
databases/mariadb104-client/Makefile.common | 35 ++++++----------------------
databases/mariadb104-server/Makefile | 21 ++--------------
databases/mariadb105-client/Makefile.common | 35 ++++++----------------------
databases/mariadb105-server/Makefile | 21 ++--------------
4 files changed, 22 insertions(+), 90 deletions(-)
diffs (168 lines):
diff -r b5255668b7a1 -r 2481f592aaf7 databases/mariadb104-client/Makefile.common
--- a/databases/mariadb104-client/Makefile.common Tue May 25 11:06:41 2021 +0000
+++ b/databases/mariadb104-client/Makefile.common Tue May 25 11:14:54 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.5 2021/05/25 11:06:41 jperkin Exp $
+# $NetBSD: Makefile.common,v 1.6 2021/05/25 11:14:54 jperkin Exp $
#
# used by databases/mariadb104-client/Makefile
# used by databases/mariadb104-server/Makefile
@@ -24,32 +24,13 @@
.include "../../mk/bsd.prefs.mk"
-# home directory (location of the databases)
-.if !empty(MYSQL_DATADIR)
-MARIADB_DATADIR?= ${MYSQL_DATADIR}
-.else
-MARIADB_DATADIR?= ${VARBASE}/db/mariadb
-.endif
-
-# default character set
-.if !empty(MYSQL_CHARSET)
-MARIADB_CHARSET?= ${MYSQL_CHARSET}
-.else
-MARIADB_CHARSET?= utf8mb4
-.endif
-
-# additional character set to be compiled in
-.if !empty(MYSQL_COLLATION)
-MARIADB_COLLATION?= ${MYSQL_COLLATION}
-.else
-MARIADB_COLLATION?= utf8mb4_unicode_ci
-.endif
-
-.if !empty(MYSQL_EXTRA_CHARSET)
-MARIADB_EXTRA_CHARSET?= ${MYSQL_EXTRA_CHARSET}
-.else
-MARIADB_EXTRA_CHARSET?= all
-.endif
+#
+# Use MySQL defaults if set.
+#
+MARIADB_DATADIR?= ${MYSQL_DATADIR:U${VARBASE}/db/mariadb}
+MARIADB_CHARSET?= ${MYSQL_CHARSET:Uutf8mb4}
+MARIADB_COLLATION?= ${MYSQL_COLLATION:Uutf8mb4_unicode_ci}
+MARIADB_EXTRA_CHARSET?= ${MYSQL_EXTRA_CHARSET:Uall}
BUILD_DEFS+= VARBASE
diff -r b5255668b7a1 -r 2481f592aaf7 databases/mariadb104-server/Makefile
--- a/databases/mariadb104-server/Makefile Tue May 25 11:06:41 2021 +0000
+++ b/databases/mariadb104-server/Makefile Tue May 25 11:14:54 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2021/05/24 19:49:29 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2021/05/25 11:14:54 jperkin Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
PKGREVISION= 3
@@ -14,23 +14,8 @@
.include "../../mk/bsd.fast.prefs.mk"
-.if !empty(MYSQL_DATADIR)
-MARIADB_DATADIR?= ${MYSQL_DATADIR}
-.else
-MARIADB_DATADIR?= ${VARBASE}/db/mariadb
-.endif
-
-.if !empty(MYSQL_USER)
-MARIADB_USER?= ${MYSQL_USER}
-.else
-MARIADB_USER?= mariadb
-.endif
-
-.if !empty(MYSQL_GROUP)
-MARIADB_GROUP?= ${MYSQL_GROUP}
-.else
-MARIADB_GROUP?= mariadb
-.endif
+MARIADB_USER?= ${MYSQL_USER:Umariadb}
+MARIADB_GROUP?= ${MYSQL_GROUP:Umariadb}
PKG_USERS_VARS+= MARIADB_USER
PKG_GROUPS_VARS+= MARIADB_GROUP
diff -r b5255668b7a1 -r 2481f592aaf7 databases/mariadb105-client/Makefile.common
--- a/databases/mariadb105-client/Makefile.common Tue May 25 11:06:41 2021 +0000
+++ b/databases/mariadb105-client/Makefile.common Tue May 25 11:14:54 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.2 2021/05/25 11:06:41 jperkin Exp $
+# $NetBSD: Makefile.common,v 1.3 2021/05/25 11:14:54 jperkin Exp $
#
# used by databases/mariadb105-client/Makefile
# used by databases/mariadb105-server/Makefile
@@ -24,32 +24,13 @@
.include "../../mk/bsd.prefs.mk"
-# home directory (location of the databases)
-.if !empty(MYSQL_DATADIR)
-MARIADB_DATADIR?= ${MYSQL_DATADIR}
-.else
-MARIADB_DATADIR?= ${VARBASE}/db/mariadb
-.endif
-
-# default character set
-.if !empty(MYSQL_CHARSET)
-MARIADB_CHARSET?= ${MYSQL_CHARSET}
-.else
-MARIADB_CHARSET?= utf8mb4
-.endif
-
-# additional character set to be compiled in
-.if !empty(MYSQL_COLLATION)
-MARIADB_COLLATION?= ${MYSQL_COLLATION}
-.else
-MARIADB_COLLATION?= utf8mb4_unicode_ci
-.endif
-
-.if !empty(MYSQL_EXTRA_CHARSET)
-MARIADB_EXTRA_CHARSET?= ${MYSQL_EXTRA_CHARSET}
-.else
-MARIADB_EXTRA_CHARSET?= all
-.endif
+#
+# Use MySQL defaults if set.
+#
+MARIADB_DATADIR?= ${MYSQL_DATADIR:U${VARBASE}/db/mariadb}
+MARIADB_CHARSET?= ${MYSQL_CHARSET:Uutf8mb4}
+MARIADB_COLLATION?= ${MYSQL_COLLATION:Uutf8mb4_unicode_ci}
+MARIADB_EXTRA_CHARSET?= ${MYSQL_EXTRA_CHARSET:Uall}
BUILD_DEFS+= VARBASE
diff -r b5255668b7a1 -r 2481f592aaf7 databases/mariadb105-server/Makefile
--- a/databases/mariadb105-server/Makefile Tue May 25 11:06:41 2021 +0000
+++ b/databases/mariadb105-server/Makefile Tue May 25 11:14:54 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2021/05/24 19:49:29 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2021/05/25 11:14:55 jperkin Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
PKGREVISION= 1
@@ -14,23 +14,8 @@
.include "../../mk/bsd.fast.prefs.mk"
-.if !empty(MYSQL_DATADIR)
-MARIADB_DATADIR?= ${MYSQL_DATADIR}
-.else
-MARIADB_DATADIR?= ${VARBASE}/db/mariadb
-.endif
-
-.if !empty(MYSQL_USER)
-MARIADB_USER?= ${MYSQL_USER}
-.else
-MARIADB_USER?= mariadb
-.endif
-
-.if !empty(MYSQL_GROUP)
-MARIADB_GROUP?= ${MYSQL_GROUP}
-.else
-MARIADB_GROUP?= mariadb
-.endif
+MARIADB_USER?= ${MYSQL_USER:Umariadb}
+MARIADB_GROUP?= ${MYSQL_GROUP:Umariadb}
PKG_USERS_VARS+= MARIADB_USER
PKG_GROUPS_VARS+= MARIADB_GROUP
Home |
Main Index |
Thread Index |
Old Index