aboutsummaryrefslogblamecommitdiffstats
path: root/community/libdwarf/APKBUILD
blob: f6542ee4d0016f27af6deb3fc5cb5997cb5399f2 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                    

               
                                                                    
                                          
          
                           
                          
                                                      
                                                          

                                
 
         
                      

                                                 









                                                                   
                               
                                       
                                                         
 
                                

                                              
                                               


                                   
                               
















                                                                             
                                                                                                                                                                       
# Contributor: David Huffman <storedbox@outlook.com>
# Maintainer: David Huffman <storedbox@outlook.com>
pkgname=libdwarf
pkgver=20180527
pkgrel=0
pkgdesc="Parsing library for DWARF2 and later debugging file format"
url="http://www.prevanders.net/dwarf.html"
arch="all"
license="LGPL-2.0-or-later"
makedepends="elfutils-dev"
subpackages="$pkgname-dev dwarf-tools dwarf-tools-doc"
source="http://www.prevanders.net/$pkgname-$pkgver.tar.gz"
options="!check"
builddir="$srcdir/dwarf-$pkgver"

build() {
	cd "$builddir"
	./configure --prefix=/usr --enable-shared
	make && make -C dwarfgen
}

package() {
	local bindir="$pkgdir/usr/bin"
	local docdir="$pkgdir/usr/share/doc/dwarf-tools"
	local incdir="$pkgdir/usr/include/libdwarf"
	local libdir="$pkgdir/usr/lib"
	local man1dir="$pkgdir/usr/share/man/man1"
	mkdir -p "$bindir" "$docdir" "$incdir" "$libdir" "$man1dir"

	cd "$builddir/libdwarf"
	cp dwarf.h libdwarf.h "$incdir"
	cp libdwarf.a libdwarf.so libdwarf.so.1 "$libdir"

	cd "$builddir/dwarfdump"
	cp dwarfdump "$bindir"
	cp COPYING "$docdir/dwarfdump.COPYING"
	cp DWARFDUMPCOPYRIGHT GPL.txt "$docdir"
	cp dwarfdump.conf "$libdir"
	cp dwarfdump.1 "$man1dir"

	cd "$builddir/dwarfgen"
	cp dwarfgen "$bindir"
	cp COPYING "$docdir/dwarfgen.COPYING"
	cp dwarfgen.1 "$man1dir"
}

tools() {
	license="GPL2 BSD"
	pkgdesc="Tools for interacting with DWARF2 and later debugging files"

	local bin="usr/bin"
	local lib="usr/lib"

	mkdir -p "$subpkgdir/$lib"
	mv "$pkgdir/$bin" "$subpkgdir/$bin"
	mv "$pkgdir/$lib/dwarfdump.conf" "$subpkgdir/$lib"
}

sha512sums="f8f285373d03498e0bcf607d61cc0fb17b555ca48bbeda7c133a9c620e34b727973aceecfa5402b53189211e3a0f15dbe49951c2cf3e63e43775fbc8e9fbfa5d  libdwarf-20180527.tar.gz"