
makedepends=(libunwind)

description="Fast, multi-threaded malloc and nifty performance analysis tools"
url="https://github.com/gperftools/gperftools"

packager="Great-OS Team"
maintainer="Great-OS Team"

name="gperftools"
version="2.17.2"
release=1

source=(https://github.com/gperftools/gperftools/releases/download/gperftools-$version/gperftools-$version.tar.gz)
prepare() {
    cd $name-$version
    autoreconf -fi
}
build() {
    cd $name-$version
    ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-frame-pointers --enable-libunwind;
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
    make
}
package () 
{ 
    cd $name-$version
    make DESTDIR="$PKG" install
    install -Dm644 -t "$PKG/usr/share/licenses/$name-$version/" COPYING
}
