description="Library for constructing and injecting network packets"
url="http://libnet-dev.sf.net"

license="BSD"

contributors="Timcowchip,Greg,Tnut"
packager="spiky <spiky@nutyx.org>"

name=libnet
version=1.3

source=(https://github.com/libnet/libnet/releases/download/v${version}/$name-$version.tar.gz)

build() {

    cd $name-$version
    export CFLAGS=$CFLAGS" -fPIC" 

    ./configure --prefix=/usr --mandir=/usr/man
    sed -i 's/ sample//g' Makefile
    make
   
    make DESTDIR=$PKG install
    install -D -m 755 libnet-config $PKG/usr/bin/libnet-config
    
    # Obsolet lib
    rm $PKG/usr/lib/libnet.la

    install -Dm644 LICENSE $PKG/usr/share/licenses/$name/LICENSE
}
