summaryrefslogtreecommitdiff
path: root/~lukeshu/libdwarf/PKGBUILD
blob: 591b9263390a156056e6d00d66c901c413d01747 (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
# Maintainer: Marti Raudsepp <marti@juffo.org>

pkgname=libdwarf
pkgver=20111214
pkgrel=1
pkgdesc="Static library for handling DWARF Debugging Information Format"
arch=(i686 x86_64)
license=('GPL' 'LGPL')
url="http://reality.sgiweb.org/davea/dwarf.html"
depends=('elfutils' 'gcc-libs')
makedepends=('libelf')
source=(http://reality.sgiweb.org/davea/$pkgname-$pkgver.tar.gz)

build() {
  cd $srcdir/dwarf-$pkgver/libdwarf
  ./configure
  make

  # dwarfdump
  cd $srcdir/dwarf-$pkgver/dwarfdump2
  ./configure --prefix=/usr CFLAGS=-I../libdwarf CXXFLAGS=-I../libdwarf LDFLAGS=-L../libdwarf
  # disable parallelization; -j5 build fails ~20% of the time on my machine
  make -j1
}

package() {
  cd $srcdir/dwarf-$pkgver/libdwarf

  install -d $pkgdir/usr/lib
  install -m 644 libdwarf.a $pkgdir/usr/lib

  install -d $pkgdir/usr/include/libdwarf
  install dwarf.h libdwarf.h $pkgdir/usr/include/libdwarf

  install -dm 755 $pkgdir/usr/share/doc/$pkgname
  install README NEWS *.pdf $pkgdir/usr/share/doc/$pkgname

  # dwarfdump
  cd $srcdir/dwarf-$pkgver/dwarfdump2
  install -Dm755 dwarfdump $pkgdir/usr/bin/dwarfdump
  install -Dm644 dwarfdump.1 $pkgdir/usr/share/man/man1/dwarfdump.1
  install -Dm644 dwarfdump.conf $pkgdir/usr/lib/dwarfdump.conf
}
md5sums=('573b49b94e38a0e65ff337768f003d33')