blob: 5e09ba146a59929cb6d3a1547744928ea246c35c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer: Frederick Zhang <frederick888@tsundere.moe>
# Contributor: Raphaƫl Doursenaud <rdoursenaud@free.fr>
pkgname=mysql-shell
pkgver=8.0.25
pkgrel=1
pkgdesc='An interface supporting development and administration for the MySQL Server'
arch=('x86_64' 'i686')
url="https://dev.mysql.com/downloads/shell/"
license=('GPL')
source=(
"https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-$pkgver-src.tar.gz"
"mysql-shell-$pkgver-src.tar.gz.asc::https://dev.mysql.com/downloads/gpg/?file=mysql-shell-$pkgver-src.tar.gz&p=43"
"https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-$pkgver.tar.gz"
"mysql-boost-$pkgver.tar.gz.asc::https://dev.mysql.com/downloads/gpg/?file=mysql-boost-$pkgver.tar.gz&p=23"
)
md5sums=('51f0728030495716e7994f834a7425b2'
'SKIP'
'e142c2058313b4646c36fa9bb1b38493'
'SKIP')
validpgpkeys=('A4A9406876FCBD3C456770C88C718D3B5072E1F5')
depends=('python' 'openssl' 'curl')
optdepends=('mysql-clients: login-path secret store support')
makedepends=('v8-6.7-static' 'cmake' 'zip' 'zlib' 'libsasl' 'rpcsvc-proto')
build() {
export CC="gcc"
export CXX="g++"
cd "$srcdir/mysql-$pkgver"
mkdir -p bld && cd $_
cmake .. -DWITH_BOOST="../boost" -DWITH_SSL=system -DWITH_PROTOBUF=bundled -Dprotobuf_BUILD_SHARED_LIBS=OFF
cmake --build . --target mysqlclient
cmake --build . --target mysqlxclient
cd "$srcdir/$pkgname-$pkgver-src"
mkdir -p bld && cd $_
protobuf_dir="$(basename "$(find $srcdir/mysql-$pkgver/extra/protobuf -maxdepth 1 -type d -name 'protobuf-*')")"
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DMYSQL_SOURCE_DIR="$srcdir/mysql-$pkgver" \
-DMYSQL_BUILD_DIR="$srcdir/mysql-$pkgver/bld" \
-DHAVE_PYTHON=1 \
-DHAVE_V8=1 \
-DV8_INCLUDE_DIR="/usr/include" \
-DV8_LIB_DIR="/usr/lib" \
-DWITH_SSL=system \
-DWITH_STATIC_LINKING=1 \
-DPACKAGE_YEAR="$(date +%Y)" \
-DWITH_PROTOBUF="$srcdir/mysql-$pkgver/extra/protobuf/$protobuf_dir/src" \
-DPROTOBUF_INCLUDE_DIR="$srcdir/mysql-$pkgver/extra/protobuf/$protobuf_dir/src" \
-DPROTOBUF_LIBRARY="$srcdir/mysql-$pkgver/bld/extra/protobuf/$protobuf_dir/cmake/libprotobuf.a"
make
}
package() {
cd "$srcdir/$pkgname-$pkgver-src/bld"
make DESTDIR="$pkgdir/" install
install -Dm644 "$srcdir/$pkgname-$pkgver-src/doc/man/mysqlsh.1" "$pkgdir/usr/share/man/man1/mysqlsh.1"
install -Dm644 "$srcdir/$pkgname-$pkgver-src/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim: set tabstop=4 shiftwidth=2 expandtab smarttab autoindent:
|