You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.9 KiB
67 lines
1.9 KiB
3 months ago
|
# Copyright 1999-2024 Gentoo Authors
|
||
5 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
1 year ago
|
EAPI=8
|
||
5 years ago
|
|
||
|
inherit systemd s6 tmpfiles
|
||
|
|
||
3 years ago
|
DESCRIPTION="Gentoo MySQL init scripts"
|
||
4 years ago
|
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
|
||
1 year ago
|
# Need to set S due to PMS saying we need it existing, but no SRC_URI
|
||
|
S=${WORKDIR}
|
||
5 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
2 years ago
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||
5 years ago
|
|
||
|
# This _will_ break with MySQL 5.0, 4.x, 3.x
|
||
|
# It also NEEDS openrc for the save_options/get_options builtins.
|
||
|
# The s6 support was added after openrc 0.16.2
|
||
|
# mysql-connector-c needed for my_print_defaults
|
||
|
RDEPEND="
|
||
|
!<dev-db/mysql-5.1
|
||
|
!<sys-apps/openrc-0.16.2
|
||
|
dev-db/mysql-connector-c
|
||
5 years ago
|
!prefix? (
|
||
|
acct-group/mysql acct-user/mysql
|
||
|
)
|
||
1 year ago
|
"
|
||
5 years ago
|
|
||
|
src_install() {
|
||
1 year ago
|
newconfd "${FILESDIR}"/conf.d-2.0 mysql
|
||
5 years ago
|
|
||
|
# s6 init scripts
|
||
|
if use amd64 || use x86 ; then
|
||
1 year ago
|
newconfd "${FILESDIR}"/conf.d-2.0 mysql-s6
|
||
|
newinitd "${FILESDIR}"/init.d-s6-2.3 mysql-s6
|
||
|
s6_install_service mysql "${FILESDIR}"/run-s6
|
||
|
s6_install_service mysql/log "${FILESDIR}"/log-s6
|
||
5 years ago
|
fi
|
||
|
|
||
1 year ago
|
newinitd "${FILESDIR}"/init.d-2.3 mysql
|
||
|
newinitd "${FILESDIR}"/init.d-supervise-2.3 mysql-supervise
|
||
5 years ago
|
|
||
|
# systemd unit installation
|
||
|
exeinto /usr/libexec
|
||
|
doexe "${FILESDIR}"/mysqld-wait-ready
|
||
1 year ago
|
systemd_newunit "${FILESDIR}"/mysqld-v2.service mysqld.service
|
||
|
systemd_newunit "${FILESDIR}"/mysqld_at-v2.service mysqld@.service
|
||
|
newtmpfiles "${FILESDIR}"/mysql.conf-r1 mysql.conf
|
||
5 years ago
|
|
||
|
insinto /etc/logrotate.d
|
||
1 year ago
|
newins "${FILESDIR}"/logrotate.mysql-2.3 mysql
|
||
5 years ago
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
tmpfiles_process mysql.conf
|
||
1 year ago
|
|
||
5 years ago
|
if use amd64 || use x86 ; then
|
||
|
elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
|
||
|
elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf"
|
||
1 year ago
|
elog
|
||
5 years ago
|
fi
|
||
|
|
||
|
elog "Starting with version 10.1.8, MariaDB includes an improved systemd unit named mariadb.service"
|
||
|
elog "You should prefer that unit over this package's mysqld.service."
|
||
|
}
|