updated on Sun Jan 22 08:00:21 UTC 2012
[aur-mirror.git] / redis-git / PKGBUILD
blob20d61fbdc00f2df8b5f47adb8dbd398d020cce03
1 # Maintainer: Hilton Medeiros <medeiros.hilton at gmail dot com>
2 # Contributor: David Trail <napalm10 at gmail>
3 # Contributor: Jan-Erik Rediger <badboy at archlinux dot us>
5 pkgname=redis-git
6 pkgver=20111002
7 pkgrel=1
8 pkgdesc="An open source, advanced key-value keystore"
9 arch=('i686' 'x86_64')
10 url="http://redis.io/"
11 license=('BSD')
12 depends=('bash')
13 makedepends=('git')
14 conflicts=('redis')
15 provides=('redis')
16 backup=('etc/redis.conf' 'etc/logrotate.d/redis')
17 source=("redis.d"
18         "redis.logrotate")
19 md5sums=('65a2c0a78168fbdb439ecc1911ab1c29'
20          '9e2d75b7a9dc421122d673fe520ef17f')
22 _gitroot="git://github.com/antirez/redis.git"
23 _gitname="redis"
25 build() {
26   cd "$srcdir"
27   msg "Connecting to Git server...."
29   if [ -d $_gitname ]; then
30     pushd $_gitname && git pull origin && popd
31     msg "The local files are updated"
32   else
33     git clone $_gitroot
34   fi
36   msg "Git checkout done or server timeout"
37   msg "Starting make..."
39   rm -rf $_gitname-build
40   git clone $_gitname $_gitname-build
41   cd $_gitname-build
43   make -j1
45   # Needs `tcl` from [extra]
46   #make test
49 package() {
50   cd "$srcdir/$_gitname-build"
52   make PREFIX="$pkgdir/usr" install
54   sed -i -e 's|daemonize no|daemonize yes|' \
55          -e "s|dir \./|dir /var/lib/$_gitname|" \
56          -e "s|logfile stdout|logfile /var/log/$_gitname.log|" \
57          "$_gitname.conf"
58   install -Dm644 $_gitname.conf "$pkgdir/etc/$_gitname.conf"
60   install -Dm644 COPYING "$pkgdir/usr/share/licenses/$_gitname/COPYING"
62   install -Dm755 "$srcdir/$_gitname.d" "$pkgdir/etc/rc.d/$_gitname"
63   install -Dm644 "$srcdir/$_gitname.logrotate" "$pkgdir/etc/logrotate.d/$_gitname"