diff options
Diffstat (limited to 'dev-db/postgresql/postgresql-9999.ebuild')
| -rw-r--r-- | dev-db/postgresql/postgresql-9999.ebuild | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild index 4c37f742af7a..cbc1266c2067 100644 --- a/dev-db/postgresql/postgresql-9999.ebuild +++ b/dev-db/postgresql/postgresql-9999.ebuild @@ -22,7 +22,7 @@ HOMEPAGE="http://www.postgresql.org/" LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW" IUSE="kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python - +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +readline selinux +server systemd ssl static-libs tcl threads uuid xml zlib" for lingua in ${LINGUAS}; do IUSE+=" linguas_${lingua}" @@ -53,6 +53,7 @@ ssl? ( !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) libressl? ( dev-libs/libressl:= ) ) +server? ( systemd? ( sys-apps/systemd ) ) tcl? ( >=dev-lang/tcl-8:0= ) uuid? ( dev-libs/ossp-uuid ) xml? ( dev-libs/libxml2 dev-libs/libxslt ) @@ -155,6 +156,7 @@ src_configure() { $(use_with python) \ $(use_with readline) \ $(use_with ssl openssl) \ + $(usex server "$(use_with systemd)" '--without-systemd') \ $(use_with tcl) \ $(use_with uuid ossp-uuid) \ $(use_with xml libxml) \ @@ -183,9 +185,11 @@ src_install() { sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT} - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ - "${FILESDIR}/${PN}.service" | \ - systemd_newunit - ${PN}-${SLOT}.service + if use systemd; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service-9.6" | \ + systemd_newunit - ${PN}-${SLOT}.service + fi newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir @@ -389,9 +393,11 @@ pkg_config() { einfo "by default. You can disable it in the cluster's:" einfo " ${PGDATA%/}/postgresql.conf" einfo - einfo "The PostgreSQL server, by default, will log events to:" - einfo " ${DATA_DIR%/}/postmaster.log" - einfo + if ! use systemd; then + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + fi if use prefix ; then einfo "The location of the configuration files have moved to:" einfo " ${PGDATA}" @@ -402,6 +408,9 @@ pkg_config() { einfo einfo "Or move the configuration files back:" einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + elif use systemd; then + einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL" + einfo "instead of 'pg_ctl'." else einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" einfo "instead of 'pg_ctl'." |
