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

pkgname=irqbalance-git
pkgver=1.9.2.r22.g4a60b1a
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=('glibc' 'numactl' 'systemd-libs')
makedepends=('git' 'glib2' 'libcap-ng' 'ncurses' 'systemd')
provides=("irqbalance=$pkgver")
conflicts=('irqbalance')
backup=('etc/irqbalance.env')
source=("git+https://github.com/Irqbalance/irqbalance.git")
sha256sums=('SKIP')


prepare() {
  cd "irqbalance"

  sed \
    -e 's|/path/to/|/etc/|g' \
    -e 's|/usr/sbin|/usr/bin|g' \
    -i "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" -t "$pkgdir/etc"
  install -Dm644 "misc/irqbalance.service" -t "$pkgdir/usr/lib/systemd/system"
}