archrelease: copy trunk to extra-x86_64
[arch-packages.git] / irqbalance / repos / extra-x86_64 / PKGBUILD
blobebdbac453010e74b983e2b20ea51aa6d3d0beddc
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Dan McGee <dan@archlinux.org>
3 # Contributor: Martin Striz <ms@poruba.net>
5 pkgname=irqbalance
6 pkgver=1.8.0
7 pkgrel=2
8 pkgdesc="IRQ balancing daemon for SMP systems"
9 arch=(x86_64)
10 url="https://github.com/irqbalance/irqbalance"
11 license=(GPL2)
12 backup=(etc/$pkgname.env)
13 depends=(glibc)
14 makedepends=(glib2 libcap-ng ncurses numactl systemd systemd-libs)
15 options=(debug)
16 source=(
17   $pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
18   $pkgname-1.8.0-printf_werror_format_security.patch::https://github.com/Irqbalance/irqbalance/commit/f8bdd0e64284d841544fd3ebe22f4652902ba8d2.patch
20 sha512sums=('3d757198dbe680b010ed9233d73cbf3b4a150e6b07ef97d3e94f5fa0472a22b0b3800868634340fb413a18683ff95ff6a8f7fa51ace65d870651336479e32740'
21             '0cb423b9be08c848688cbcbf9ab5c8a6dd4de93c21178e663c691cbf3b9640f86cefc3163a9bbf8abab0d1d29ceaf8e6e769156eddbde571be0d0797a4621b7f')
22 b2sums=('0181ee57c4ddbdb55e1529cfd7da4b875320eff65cb606f925f0b4f4243b51e1349d4aba38690a78d7deab6d3f55ae8d6c45af44a904f03d7127678202f288db'
23         '13cd26d8ce73fb5c0e0d3c75c70a084164f010013ee6fcef69795b82333ce5ecf8101b883e7a5ff60cb2393c56a68e463291e2ec2186d7cc4d6603f3ebce86da')
25 prepare() {
26   # fix issues with -Werror=format-security: https://bugs.archlinux.org/task/74485
27   patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-1.8.0-printf_werror_format_security.patch
29   cd $pkgname-$pkgver
30   # fix location of configuration and binary in service
31   sed -e 's|/path/to/|/etc/|g;s|/usr/sbin|/usr/bin|g' -i misc/$pkgname.service
32   autoreconf -fiv
35 build() {
36   cd $pkgname-$pkgver
37   ./configure --prefix=/usr \
38               --sbindir=/usr/bin \
39               --with-systemd
40   make
43 package() {
44   depends+=(libglib-2.0.so libcap-ng.so libncursesw.so libnuma.so libsystemd.so)
46   cd $pkgname-$pkgver
47   make install DESTDIR="$pkgdir"
48   install -vDm 644 misc/irqbalance.service -t "$pkgdir/usr/lib/systemd/system/"
49   install -vDm 644 misc/irqbalance.env -t "$pkgdir/etc/"
50   install -vDm 644 {AUTHORS,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"