summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ed68b899068ec9921966862dcf56f41daa05263e (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=irqbalance-git
pkgver=1.6.0.r0.gb47eea8
pkgrel=1
pkgdesc="A daemon to help balance the CPU load generated by interrupts across all of a systems CPUs"
arch=('i686' 'x86_64')
url="https://irqbalance.github.io/irqbalance/"
license=('GPL')
depends=('glib2' 'libcap-ng' 'numactl' 'systemd-libs')
makedepends=('git' 'systemd')
provides=('irqbalance')
conflicts=('irqbalance')
backup=('etc/irqbalance.env')
source=("git+https://github.com/Irqbalance/irqbalance.git")
sha256sums=('SKIP')


prepare() {
  cd "irqbalance"

  sed -i -e 's|/usr/sbin/|/usr/bin/|g' "misc/irqbalance.service"
  sed -i -e 's|EnvironmentFile=/path/to|EnvironmentFile=/etc|g' "misc/irqbalance.service"
}

pkgver() {
  cd "irqbalance"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "irqbalance"

  ./autogen.sh
  ./configure \
    --prefix="/usr" \
    --sbindir="/usr/bin" \
    --with-systemd
  make
}

package() {
  cd "irqbalance"

  make DESTDIR="$pkgdir" install

  install -Dm644 "misc/irqbalance.env" "$pkgdir/etc/irqbalance.env"
  install -Dm644 "misc/irqbalance.service" "$pkgdir/usr/lib/systemd/system/irqbalance.service"
}