summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: deaced142ceeda8b81d12ab938c124fd4f28ae6e (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
# Contributor: Moritz Lipp <mlq@pwmt.org>

pkgname=libfiu
pkgver=0.95
pkgrel=1
pkgdesc="userspace fault injection framework"
arch=('i686' 'x86_64')
url="https://blitiri.com.ar/p/libfiu/"
license=('custom')
depends=()
makedepends=('make' 'gcc' 'python2')
source=("https://blitiri.com.ar/p/$pkgname/files/$pkgver/$pkgname-$pkgver.tar.gz"
        "$pkgname-$pkgver.patch")
md5sums=('f420196aded3c7a60c8f92739fad54f0'
         '91b295e1fbf4bd0a2bf73bb97a6ed91b')
install=$pkgname-$pkgver.install

prepare() {
  cd $srcdir/$pkgname-$pkgver

  patch -p1 < $startdir/$pkgname-$pkgver.patch
}

build() {
  cd $srcdir/$pkgname-$pkgver

  make PREFIX=$pkgdir/usr
}

package() {
  cd $srcdir/$pkgname-$pkgver

  make PREFIX=$pkgdir/usr install

  # Fix paths
  sed -e "s|${pkgdir}||g" \
    -i $pkgdir/usr/lib/pkgconfig/libfiu.pc \
    -i $pkgdir/usr/bin/fiu-run

  # Install LICENSE
  install -D -m664 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}