Source

wok-tank / crda / receipt

# SliTaz package receipt.

PACKAGE="crda"
VERSION="1.1.2"
CATEGORY="network"
SHORT_DESC="Central Regulatory Domain Agent for wireless networks"
MAINTAINER="slaxemulator@gmail.com"
WEB_SITE="http://wireless.kernel.org/en/developers/Regulatory/CRDA"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="http://wireless.kernel.org/download/$PACKAGE/$TARBALL"

DEPENDS="wireless-regdb libnl libgcrypt udev iw"
BUILD_DEPENDS="coreutils-operations m2crypto wireless-regdb libnl-dev libgcrypt-dev udev-dev iw-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	patch -Np1 -i $stuff/libnl32.patch
	make crda regdbdump
	make DESTDIR=$DESTDIR install
	mkdir -p $fs/lib/udev/rules.d
	# This rule automatically sets the regulatory domain when cfg80211 is loaded
	echo 'ACTION=="add" SUBSYSTEM=="module", DEVPATH=="/module/cfg80211", RUN+="/etc/init.d/wireless-regdom start >/dev/null"' >> $fs/lib/udev/rules.d/85-regulatory.rules
}

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