From 879635b7038fa026add386e6d4e07f866b438acc Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Tue, 11 Aug 2015 20:30:39 -0400 Subject: dev-db/maxscale Initial commit Package-Manager: portage-2.2.20 --- dev-db/maxscale/Manifest | 1 + dev-db/maxscale/files/maxscale-1.2.0-rpath.patch | 48 ++++++++++++++++ dev-db/maxscale/files/maxscale-init.d | 21 +++++++ dev-db/maxscale/maxscale-1.2.0.ebuild | 71 ++++++++++++++++++++++++ dev-db/maxscale/metadata.xml | 13 +++++ 5 files changed, 154 insertions(+) create mode 100644 dev-db/maxscale/Manifest create mode 100644 dev-db/maxscale/files/maxscale-1.2.0-rpath.patch create mode 100644 dev-db/maxscale/files/maxscale-init.d create mode 100644 dev-db/maxscale/maxscale-1.2.0.ebuild create mode 100644 dev-db/maxscale/metadata.xml (limited to 'dev-db') diff --git a/dev-db/maxscale/Manifest b/dev-db/maxscale/Manifest new file mode 100644 index 000000000000..f78d3463cdcc --- /dev/null +++ b/dev-db/maxscale/Manifest @@ -0,0 +1 @@ +DIST MaxScale-1.2.0.tar.gz 8747330 SHA256 9408238ba589f0f22d16005f0274e09f5bf3dc54d660b10ece3136d5c26c260b SHA512 59988397fc7c8112dc81e77d317b4625e071448c0669805fdee91e156553c2144d802f70ebc047df75aab6f7e0114e22a3f9f68768f779ab2300536196c34a7e WHIRLPOOL 823be39fa22ad13868dcc0c9942dd4fecbecf56afcbeb2df92bcf096d268e602b49bd43794f9b8fb3ebe1213def82296473c955347b5793ec9a582975136b1fa diff --git a/dev-db/maxscale/files/maxscale-1.2.0-rpath.patch b/dev-db/maxscale/files/maxscale-1.2.0-rpath.patch new file mode 100644 index 000000000000..76cca09845f8 --- /dev/null +++ b/dev-db/maxscale/files/maxscale-1.2.0-rpath.patch @@ -0,0 +1,48 @@ +diff -aurN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2015-07-15 09:34:27.000000000 -0400 ++++ b/CMakeLists.txt 2015-08-10 22:12:06.021818283 -0400 +@@ -56,7 +56,7 @@ + endif() + endif() + +-set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/${MAXSCALE_LIBDIR}) ++set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${MAXSCALE_LIBDIR}) + + # Make sure the release notes for this release are present if it is a stable one + if(${MAXSCALE_VERSION} MATCHES "-stable") +diff -aurN a/server/modules/filter/hint/CMakeLists.txt b/server/modules/filter/hint/CMakeLists.txt +--- a/server/modules/filter/hint/CMakeLists.txt 2015-07-15 09:34:27.000000000 -0400 ++++ b/server/modules/filter/hint/CMakeLists.txt 2015-08-10 22:12:49.413170068 -0400 +@@ -1,4 +1,3 @@ + add_library(hintfilter SHARED hintfilter.c hintparser.c) +-set_target_properties(hintfilter PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${MAXSCALE_LIBDIR}) + target_link_libraries(hintfilter ssl log_manager utils) + install(TARGETS hintfilter DESTINATION ${MAXSCALE_LIBDIR}) +diff -aurN a/server/modules/routing/binlog/CMakeLists.txt b/server/modules/routing/binlog/CMakeLists.txt +--- a/server/modules/routing/binlog/CMakeLists.txt 2015-07-15 09:34:27.000000000 -0400 ++++ b/server/modules/routing/binlog/CMakeLists.txt 2015-08-10 22:12:35.565376937 -0400 +@@ -1,4 +1,3 @@ + add_library(binlogrouter SHARED blr.c blr_master.c blr_cache.c blr_slave.c blr_file.c) +-set_target_properties(binlogrouter PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${MAXSCALE_LIBDIR}) + target_link_libraries(binlogrouter ssl pthread log_manager) + install(TARGETS binlogrouter DESTINATION ${MAXSCALE_LIBDIR}) +diff -aurN a/server/modules/routing/maxinfo/CMakeLists.txt b/server/modules/routing/maxinfo/CMakeLists.txt +--- a/server/modules/routing/maxinfo/CMakeLists.txt 2015-07-15 09:34:27.000000000 -0400 ++++ b/server/modules/routing/maxinfo/CMakeLists.txt 2015-08-10 22:12:25.265530805 -0400 +@@ -1,4 +1,3 @@ + add_library(maxinfo SHARED maxinfo.c maxinfo_parse.c maxinfo_error.c maxinfo_exec.c) +-set_target_properties(maxinfo PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${MAXSCALE_LIBDIR}) + target_link_libraries(maxinfo pthread log_manager) + install(TARGETS maxinfo DESTINATION ${MAXSCALE_LIBDIR}) +diff -aurN a/server/core/CMakeLists.txt b/server/core/CMakeLists.txt +--- a/server/core/CMakeLists.txt 2015-07-15 09:34:27.000000000 -0400 ++++ b/server/core/CMakeLists.txt 2015-08-10 22:39:22.709368505 -0400 +@@ -8,6 +8,8 @@ + target_link_libraries(fullcore ${CURL_LIBRARIES} utils log_manager pthread ${EMBEDDED_LIB} ${PCRE_LINK_FLAGS} ssl aio rt crypt dl crypto inih z m stdc++) + endif() + ++SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) ++ + add_executable(maxscale atomic.c buffer.c spinlock.c gateway.c + gw_utils.c utils.c dcb.c load_utils.c session.c service.c server.c + poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c diff --git a/dev-db/maxscale/files/maxscale-init.d b/dev-db/maxscale/files/maxscale-init.d new file mode 100644 index 000000000000..1eaa046aefe9 --- /dev/null +++ b/dev-db/maxscale/files/maxscale-init.d @@ -0,0 +1,21 @@ +#!/sbin/openrc-run + +command=/usr/bin/maxscale +command_args="-U maxscale -P /run/maxscale" +name="MaxScale database proxy" +pidfile="/run/maxscale/maxscale.pid" + +description="MaxScale provides database specific proxy functionality" +extra_started_commands="reload" + +start_pre() { + checkpath -D -o maxscale:maxscale /run/maxscale +} + +reload() +{ + ebegin "Reloading ${name}" + pkill -HUP -F /run/maxscale/maxscale.pid + eend $? +} + diff --git a/dev-db/maxscale/maxscale-1.2.0.ebuild b/dev-db/maxscale/maxscale-1.2.0.ebuild new file mode 100644 index 000000000000..1a5d63a89c17 --- /dev/null +++ b/dev-db/maxscale/maxscale-1.2.0.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils cmake-utils multilib user + +MY_PN="MaxScale" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="A content aware, plug-able MySQL proxy server" +HOMEPAGE="http://mariadb.com/MaxScale" +SRC_URI="https://github.com/mariadb-corporation/${MY_PN}/archive/${PV}.tar.gz -> ${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="jemalloc rabbitmq tcmalloc" + +REQUIRED_USE="?? ( jemalloc tcmalloc )" + +DEPEND=" + dev-libs/libaio + >=dev-libs/libpcre-8.35 + dev-libs/openssl:0 + net-misc/curl + virtual/mysql[embedded] + jemalloc? ( dev-libs/jemalloc ) + rabbitmq? ( net-libs/rabbitmq-c ) + tcmalloc? ( dev-util/google-perftools:= ) +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}/${PN}-1.2.0-rpath.patch" ) + +pkg_setup() { + enewgroup maxscale + enewuser maxscale -1 -1 -1 maxscale +} + +src_configure() { +# -DEMBEDDED_LIB=/usr/$(get_libdir)/mysql + local mycmakeargs=( + -DSTATIC_EMBEDDED=OFF + -DWITH_SCRIPTS=OFF + $(cmake-utils_use_with jemalloc JEMALLOC) + $(cmake-utils_use_build rabbitmq RABBITMQ) + $(cmake-utils_use_with tcmalloc TCMALLOC) + -DMODULE_INSTALL_PATH=$(get_libdir)/${PN} + ) + cmake-utils_src_configure +} + +src_install() { + local DOCS=( README README.md "${BUILD_DIR}"/Changelog.txt "${BUILD_DIR}"/ReleaseNotes.txt ) + cmake-utils_src_install + # Remove badly placed documents + rm "${D}usr/share/${PN}/README" "${D}usr/share/${PN}/Changelog.txt" \ + "${D}usr/share/${PN}/LICENSE" "${D}usr/share/${PN}/COPYRIGHT" \ + "${D}usr/share/${PN}/ReleaseNotes.txt" || die + newinitd "${FILESDIR}/${PN}-init.d" ${PN} + keepdir /var/log/maxscale /var/lib/maxscale/data \ + /var/cache/maxscale + fowners maxscale:maxscale /var/log/maxscale \ + /var/lib/maxscale/data \ + /var/lib/maxscale \ + /var/cache/maxscale +} diff --git a/dev-db/maxscale/metadata.xml b/dev-db/maxscale/metadata.xml new file mode 100644 index 000000000000..154341b9f536 --- /dev/null +++ b/dev-db/maxscale/metadata.xml @@ -0,0 +1,13 @@ + + + +mysql + + grknight@gentoo.org + Brian Evans + + + Use dev-libs/jemalloc for allocations + Add support for RabbitMQ message queue + + -- cgit v1.2.3-65-gdbad