updated on Wed Jan 11 12:00:27 UTC 2012
[aur-mirror.git] / mcelog-git / PKGBUILD
blob602e4e7bb2446e88daa5147f729522b8a71f5a10
1 # $Id$
2 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Thomas Mudrunka <harvie@@email..cz>
4 # Maintainer: Thomas Mudrunka <harvie@@email..cz>
5 # Maintainer: Dmitry Nosachev <quartz64@gmail.com>
7 pkgname=mcelog-git
8 pkgver=20111129
9 pkgrel=1
10 pkgdesc="Print machine check event log from x86-64 kernel"
11 url="http://mcelog.org/"
12 license=("GPL2")
13 arch=('i686' 'x86_64')
14 makedepends=('git')
15 provides=('mcelog')
16 options=('docs')
17 source=("mcelog.rc")
18 _gitroot="https://github.com/andikleen/mcelog"
19 _gitname=mcelog-git
20 md5sums=('f039a77d7bde3518d3d695b144816e8a')
22 build() {
23     cd "$srcdir"
24   msg "Connecting to GIT server...."
26   if [[ -d "$_gitname" ]]; then
27     cd "$_gitname" && git pull origin
28     msg "The local files are updated."
29   else
30     git clone "$_gitroot" "$_gitname"
31   fi
33   msg "GIT checkout done or server timeout"
34   msg "Starting build..."
36   rm -rf "$srcdir/$_gitname-build"
37   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
38   cd "$srcdir/$_gitname-build"
40   make
43 package() {
44   cd "$srcdir/$_gitname-build"
46   mkdir -p $pkgdir/usr/share/doc/mcelog
47   make install prefix=$pkgdir/usr etcprefix=$pkgdir DOCDIR=$pkgdir/usr/share/doc/mcelog
48   install -Dm0755 mcelog.cron "${pkgdir}/usr/sbin/mcelog.cron"
49   install -Dm0755 "${srcdir}/mcelog.rc" "${pkgdir}/etc/rc.d/mcelog"
50   install -Dm0644 mcelog.logrotate "${pkgdir}/etc/logrotate.d/mcelog.logrotate"
51   install -Dm0644 README "${pkgdir}/usr/share/doc/mcelog/README"