blob: 2f17099f3320cb869d50a93649138fd7309e366f (
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
64
|
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=tidb-git
pkgver=2.1.0.alpha
pkgrel=1
pkgdesc="Distributed NewSQL database compatible with MySQL protocol"
arch=('i686' 'x86_64')
url="https://pingcap.com/"
license=('APACHE')
depends=('glibc')
makedepends=('go' 'godep' 'git')
source=(git+https://github.com/pingcap/tidb.git
config.toml
tidb.service
tidb.user
tidb.tmpfile)
backup=(etc/tidb/config.toml)
sha256sums=('SKIP'
'0651e419f27961ccb85bf5ea7ef9576bbc433f7211aa8a77e2b6139f7dba8c7e'
'66c85143faeec8b136a71dbf1d400afa041eace57271dbfce0edfccca3874402'
'e8e60176eca71d4f930828e9e152c3bae4db70cff409a7557f12e145700e4a03'
'30ce83fbec8f102c30e438282bb5b18c026d08480f2386d68f1116c12481bf66')
pkgver() {
cd "$srcdir"/tidb
git describe --tags --always | sed 's/-/./g;s/^v//'
}
prepare() {
mkdir -p src/github.com/pingcap
cd src/github.com/pingcap
rm -f tidb
ln -s "$srcdir/tidb"
cd "$srcdir"/tidb
sed 's|/tmp/tidb|/var/lib/tidb|g' -i tidb-server/main.go config/config.go
}
build() {
export GOPATH="$srcdir"
export PATH="$PATH:$GOPATH/bin"
cd src/github.com/pingcap/tidb
LDFLAGS= make
}
#check() {
# export GOPATH="$srcdir"
# export PATH="$PATH:$GOPATH/bin"
# cd src/github.com/pingcap/tidb
# make test
#}
package() {
export GOPATH="$srcdir"
export PATH="$PATH:$GOPATH/bin"
install -Dm644 config.toml "$pkgdir"/etc/tidb/config.toml
install -Dm644 tidb.service "$pkgdir"/usr/lib/systemd/system/tidb.service
install -Dm644 tidb.user "$pkgdir"/usr/lib/sysusers.d/tidb.conf
install -Dm644 tidb.tmpfile "$pkgdir"/usr/lib/tmpfiles.d/tidb.conf
cd src/github.com/pingcap/tidb
install -Dm755 bin/tidb-server "$pkgdir"/usr/bin/tidb-server
}
|