summaryrefslogtreecommitdiff
path: root/community/mcelog/PKGBUILD
blob: d1db2b9f30c79d4016e7256dafcf789480a3972a (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
# $Id: PKGBUILD 91951 2013-05-30 09:42:52Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Thomas Mudrunka <harvie@@email..cz>
# Maintainer: Thomas Mudrunka <harvie@@email..cz>

pkgname=mcelog
pkgver=20130530
pkgrel=1
pkgdesc="Print machine check event log from x86-64 kernel"
url="http://freshmeat.net/projects/mcelog/"
license=("GPL")
arch=('i686' 'x86_64')
makedepends=('git')
options=('docs')
backup=('etc/mcelog/mcelog.conf')
source=("git://github.com/andikleen/mcelog.git"
	"mcelog.service")
md5sums=('SKIP'
         'afd7fc2b7a2f92a75e040b23d6b15958')

prepare() {
  cd "${srcdir}/mcelog"
  sed -i 's|sbin|bin|g' Makefile mcelog.cron
}

build() {
  cd "${srcdir}/mcelog"
  make
}

package() {
  cd "${srcdir}/mcelog"
  mkdir -p $pkgdir/usr/share/doc/mcelog
  make install prefix=$pkgdir/usr etcprefix=$pkgdir DOCDIR=$pkgdir/usr/share/doc/mcelog
  install -Dm0755 mcelog.cron "${pkgdir}/usr/bin/mcelog.cron"
  install -Dm0644 mcelog.logrotate "${pkgdir}/etc/logrotate.d/mcelog.logrotate"
  install -Dm0644 README "${pkgdir}/usr/share/doc/mcelog/README"
  install -Dm0644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
}