From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Subject: [PATCH 3/3] gnu: Add MariaDB. Date: Fri, 17 Apr 2015 15:24:58 +0800 Message-ID: <1429255498-32458-3-git-send-email-iyzsong@gmail.com> References: <1429255498-32458-1-git-send-email-iyzsong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj0dy-0000jR-Hi for guix-devel@gnu.org; Fri, 17 Apr 2015 03:24:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj0dq-0004bt-08 for guix-devel@gnu.org; Fri, 17 Apr 2015 03:24:54 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:36400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj0dp-0004az-Hf for guix-devel@gnu.org; Fri, 17 Apr 2015 03:24:45 -0400 Received: by pabsx10 with SMTP id sx10so116664127pab.3 for ; Fri, 17 Apr 2015 00:24:44 -0700 (PDT) In-Reply-To: <1429255498-32458-1-git-send-email-iyzsong@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/database.scm (mariadb): New variable. --- gnu/packages/databases.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index ee97977..5d64757 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2014 David Thompson ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Eric Bavier +;;; Copyright © 2015 Sou Bunnbu ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,6 +37,10 @@ #:use-module (gnu packages curl) #:use-module (gnu packages gnupg) #:use-module (gnu packages python) + #:use-module (gnu packages pcre) + #:use-module (gnu packages xml) + #:use-module (gnu packages bison) + #:use-module (gnu packages jemalloc) #:use-module ((guix licenses) #:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft bsd-2 public-domain)) @@ -43,6 +48,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix build-system cmake) #:use-module (srfi srfi-26) #:use-module (ice-9 match)) @@ -149,6 +155,77 @@ management system that supports the standardized Structured Query Language.") (license gpl2))) +(define-public mariadb + (package + (name "mariadb") + (version "10.0.17") + (source (origin + (method url-fetch) + (uri (string-append "https://downloads.mariadb.org/f/" + name "-" version "/source/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "04ckq67qgkghh7yzrbzwidk7wn7yjml15gzj2c5p1hs2k7lr9lww")))) + (build-system cmake-build-system) + (outputs '("out" "test")) + (arguments + '(#:configure-flags + '("-DBUILD_CONFIG=mysql_release" + "-DDEFAULT_CHARSET=utf8" + "-DDEFAULT_COLLATION=utf8_general_ci" + "-DMYSQL_DATADIR=/var/lib/mysql" + "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" + "-DINSTALL_INFODIR=share/mysql/docs" + "-DINSTALL_MANDIR=share/man" + "-DINSTALL_PLUGINDIR=lib/mysql/plugin" + "-DINSTALL_SCRIPTDIR=bin" + "-DINSTALL_INCLUDEDIR=include/mysql" + "-DINSTALL_DOCREADMEDIR=share/mysql/docs" + "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files" + "-DINSTALL_MYSQLSHAREDIR=share/mysql" + "-DINSTALL_DOCDIR=share/mysql/docs" + "-DINSTALL_SHAREDIR=share/mysql") + #:phases + (alist-cons-before + 'configure 'pre-configure + (lambda _ + (setenv "CONFIG_SHELL" (which "sh")) + ;; XXX: libstdc++.so lacks RUNPATH for libgcc_s.so. + (setenv "LDFLAGS" "-lgcc_s") + #t) + (alist-cons-after + 'install 'post-install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (test (assoc-ref outputs "test"))) + (substitute* (string-append out "/bin/mysql_install_db") + (("basedir=\"\"") + (string-append "basedir=\"" out "\""))) + ;; Install testing data to the 'test' output. + (mkdir-p test) + (system* "mv" (string-append out "/data") test) + (system* "mv" (string-append out "/mysql-test") test) + (system* "mv" (string-append out "/sql-bench") test))) + %standard-phases)))) + (native-inputs + `(("bison" ,bison) + ("perl" ,perl))) + (inputs + `(("jemalloc" ,jemalloc) + ("libaio" ,libaio) + ("libxml2" ,libxml2) + ("ncurses" ,ncurses) + ("openssl" ,openssl) + ("pcre" ,pcre) + ("zlib" ,zlib))) + (home-page "https://mariadb.org/") + (synopsis "SQL database server") + (description + "MariaDB is a multi-user and multi-threaded SQL database server, designed +as a drop-in replacement of MySQL.") + (license gpl2))) + (define-public postgresql (package (name "postgresql") -- 2.2.1