updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / handlersocket-mysql-git / PKGBUILD
blob22de7ecea38447b13aaf7f44704a99f0ef370b01
1 # Maintainer: Steven Merrill <steven.merrill@gmail.com>
3 pkgname=handlersocket-mysql-git
4 pkgver=20110611
5 pkgrel=1
6 pkgdesc="A high-performance interface to MySQL's InnoDB read/write threads."
7 arch=('i686' 'x86_64')
9 depends=('mysql-clients' 'mysql' 'git')
10 provides=('handlersocket')
11 conflicts=('handlersocket')
12 #optdepends=('perl-dbi' 'perl-dbd-mysql')
13 #makedepends=('cmake' 'openssl' 'tcp_wrappers' 'zlib')
15 license=('BSD')
16 url="https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL"
17 #options=('!libtool')
18 #backup=('etc/mysql/my.cnf')
19 install="handlersocket-mysql-git.install"
21 _mysqlpkgver=5.5.13
22 _gitroot="https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL"
23 _gitname="handlersocket"
25 source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.5/mysql-${_mysqlpkgver}.tar.gz"
26         "handlersocket-mysql-git.install")
27 md5sums=('f0e519e90ee7c00fceb0730edf859d7b'
28          'e9461cb3b215de91d2e86691261358be')
30 build() {
31   cd ${srcdir}
32   msg "Connecting to git server...."
34   if [[ -d ${_gitname} ]] ; then
35     cd ${_gitname} && git pull origin
36     msg "The local files are updated."
37   else
38     git clone ${_gitroot} ${_gitname}
39   fi
41   msg "git checkout done or server timeout"
42   msg "Starting make..."
44   rm -rf ${srcdir}/${_gitname}-build
45   git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
46   cd ${srcdir}/${_gitname}-build
48   ./autogen.sh
49   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-mysql-source=${srcdir}/mysql-${_mysqlpkgver} --with-mysql-bindir=/usr/bin
50   make
53 package() {
54   cd ${srcdir}/${_gitname}-build
56   make DESTDIR=${pkgdir} install
58   #Extract the BSD license clause from the README.
59   sed -n -e'1p;2,/^--/p' README > LICENSE
61   install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE