Receipt for: airsnort

source
# SliTaz package receipt.

PACKAGE="airsnort"
VERSION="0.2.7e"
CATEGORY="network"
SHORT_DESC="A wireless LAN (WLAN) tool which recovers encryption keys."
MAINTAINER="slaxemulator@gmail.com"
LICENSE="GPL2"
WEB_SITE="http://airsnort.shmoo.com/"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="gtk+ libpcap"
BUILD_DEPENDS="gtk+-dev libpcap-dev libpng+apng-dev"

# What is the latest version available today?
current_version()
{
	wget -O - https://sourceforge.net/projects/airsnort/files/airsnort/ 2>/dev/null | \
	sed '/scope="row/!d;s|.*a href="|"https://sourceforge.net|;s| .*||;q' | xargs wget -O - 2>/dev/null | \
	sed '/scope="row/!d;s|.*airsnort-||;s|.tar.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	./configure \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		$CONFIGURE_ARGS &&
	make && make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr
	cp -a $install/usr/bin $fs/usr
}