summaryrefslogtreecommitdiff
path: root/pcr/mariadb-galera/PKGBUILD
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-07-25 02:18:30 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-07-25 02:18:30 -0300
commit6740bfa28d86a8ea5d2f051c0c215156c3914e6e (patch)
treee1e149d0551a6e3f50d24c139c222cfceab63327 /pcr/mariadb-galera/PKGBUILD
parent52a175ab2e683d8dcb8400c054b96d37db0f3d20 (diff)
galera replication for mariadb
Diffstat (limited to 'pcr/mariadb-galera/PKGBUILD')
-rw-r--r--pcr/mariadb-galera/PKGBUILD109
1 files changed, 77 insertions, 32 deletions
diff --git a/pcr/mariadb-galera/PKGBUILD b/pcr/mariadb-galera/PKGBUILD
index 950d077fd..1fc602d3b 100644
--- a/pcr/mariadb-galera/PKGBUILD
+++ b/pcr/mariadb-galera/PKGBUILD
@@ -1,39 +1,30 @@
# $Id$
-# Maintainer (Arch): Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
-pkgname=mariadb-galera
pkgbase=mariadb-galera
-pkgver=5.5.33a
+#pkgname=('libmariadbclient' 'mariadb-clients' 'mytop' 'mariadb-galera')
+pkgname='mariadb-galera'
+pkgver=10.0.12
_pkgver=${pkgver/.a/a}
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
url='https://mariadb.com/kb/en/galera/'
-pkgdesc='Fast SQL database server, drop-in replacement for MySQL with Galera Cluster'
-backup=('etc/mysql/my.cnf')
-install=mariadb.install
-depends=('mariadb-clients' 'inetutils' 'libaio' 'galera')
-conflicts=('mysql')
-provides=("mysql=$pkgver" "mariadb")
-options=('emptydirs')
-makedepends=('cmake' 'openssl' 'zlib' 'libaio')
-source=(http://ftp.wa.co.za/pub/mariadb/${pkgname}-${pkgver}/kvm-tarbake-jaunty-x86/${pkgname}-${pkgver}.tar.gz
+makedepends=('cmake' 'openssl' 'zlib' 'libaio' 'libxml2' 'openssl' 'pcre' 'galera')
+source=(http://ftp.wa.co.za/pub/mariadb/${pkgbase}-${pkgver}/source/${pkgbase}-${pkgver}.tar.gz
mariadb.service
mariadb-post.sh
mariadb-tmpfile.conf)
-sha256sums=('1b49e41e677d95f7a5b548771a81c6430ec6f0ee16e7ee624fb2fe2b278183b8'
- 'a6cf5446159fff16598d0d787dd3a3c30a53a656a5f876ddb608bc60e234d334'
- '368f9fd2454d80eb32abb8f29f703d1cf9553353fb9e1ae4529c4b851cb8c5dd'
- '2af318c52ae0fe5428e8a9245d1b0fc3bc5ce153842d1563329ceb1edfa83ddd')
-
-prepare() {
- mkdir build
-}
+md5sums=('4d142630c565a75d1b1b44246beb2923'
+ 'd488fffa9f62f9949c4aa1bb6e6db692'
+ 'b79e65a5aa536e6b5bc60988eb0b78a2'
+ '2fa6e456964d4ff5e6d4f9ff0126aed6')
build() {
+ mkdir -p build
cd build
- cmake ../mariadb-$pkgver \
+ cmake ../mariadb-$_pkgver \
-DBUILD_CONFIG=mysql_release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DSYSCONFDIR=/etc/mysql \
@@ -55,6 +46,7 @@ build() {
-DWITH_READLINE=ON \
-DWITH_ZLIB=system \
-DWITH_SSL=system \
+ -DWITH_PCRE=system \
-DWITH_LIBWRAP=OFF \
-DWITH_EXTRA_CHARSETS=complex \
-DWITH_EMBEDDED_SERVER=ON \
@@ -65,19 +57,72 @@ build() {
-DWITH_TOKUDB_STORAGE_ENGINE=1 \
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
-DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
- -DWITHOUT_OQGRAPH_STORAGE_ENGINE=1 \
-DWITHOUT_PBXT_STORAGE_ENGINE=1 \
- -DCMAKE_C_FLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
- -DCMAKE_CXX_FLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \
- -DWITH_MYSQLD_LDFLAGS="${LDFLAGS}" \
- -DWITH_WSREP=ON \
- -DWITH_INNODB_DISALLOW_WRITES=1
-
+ -DWITHOUT_TOKUDB=1 \
+ -DCMAKE_C_FLAGS="-fPIC $CFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer -fno-delete-null-pointer-checks" \
+ -DCMAKE_CXX_FLAGS="-fPIC $CXXFLAGS -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti -fno-delete-null-pointer-checks" \
+ -DWITH_MYSQLD_LDFLAGS="$LDFLAGS"
make
}
-package() {
+package_libmariadbclient() {
+ pkgdesc='MariaDB client libraries'
+ depends=('openssl' 'libaio' 'zlib' 'pcre')
+ conflicts=('libmysqlclient')
+ provides=("libmysqlclient=$pkgver")
+ options=('staticlibs')
+
+ cd build
+ for dir in include libmysql libmysqld libservices; do
+ make -C $dir DESTDIR="$pkgdir" install
+ done
+
+ install -Dm755 scripts/mysql_config "$pkgdir"/usr/bin/mysql_config
+ install -d "$pkgdir"/usr/share/man/man1
+ for man in mysql_config mysql_client_test_embedded mysqltest_embedded; do
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
+ done
+
+ rm "$pkgdir"/usr/lib/libmysql{client,client_r,d}.a
+}
+
+package_mariadb-clients() {
+ pkgdesc='MariaDB client tools'
+ depends=('libmariadbclient' 'zlib' 'openssl')
+ conflicts=('mysql-clients')
+ provides=("mysql-clients=$pkgver")
+
+ cd build
+ make -C client DESTDIR="$pkgdir" install
+
+ # install man pages
+ install -d "$pkgdir"/usr/share/man/man1
+ for man in mysql mysqladmin mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap; do
+ install -m644 "$srcdir"/$pkgbase-$_pkgver/man/$man.1 "$pkgdir"/usr/share/man/man1/$man.1
+ done
+
+ # provided by mariadb
+ rm "$pkgdir"/usr/bin/{mysql_{plugin,upgrade},mysqlbinlog,mysqltest}
+
+}
+
+package_mytop() {
+ pkgdesc='Top clone for MariaDB'
+ depends=('perl' 'perl-dbd-mysql' 'perl-term-readkey')
+
+ cd build
+ install -Dm755 scripts/mytop "$pkgdir"/usr/bin/mytop
+}
+
+package_mariadb-galera() {
+ pkgdesc='Fast SQL database server, drop-in replacement for MySQL with Galera replication'
+ backup=('etc/mysql/my.cnf')
+ install=mariadb.install
+ depends=('mariadb-clients' 'inetutils' 'libaio' 'libxml2' 'pcre' 'galera')
+ conflicts=('mysql' 'mariadb')
+ provides=("mysql=$pkgver" "mariadb=$pkgver")
+ options=('emptydirs')
cd build
make DESTDIR="$pkgdir" install
@@ -91,9 +136,9 @@ package() {
cd "$pkgdir"
rm -f usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
rm -f usr/lib/libmysql*
- rm -rf usr/include/
+ rm -f -r usr/include/
rm -f usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1
-
+
# provided by mariadb-clients
rm -f usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
rm -f usr/share/man/man1/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}.1
@@ -102,6 +147,6 @@ package() {
rm -f usr/bin/mytop
# not needed
- rm -rf usr/{data,mysql-test,sql-bench}
+ rm -f -r usr/{data,mysql-test,sql-bench}
rm -f usr/share/man/man1/mysql-test-run.pl.1
}