# SliTaz package receipt.

PACKAGE="freeradius"
VERSION="2.1.10"
CATEGORY="security"
SHORT_DESC="radius server"
MAINTAINER="Serge Daigle sdaigl@lacitec.on.ca"
SOURCE="freeradius-server"
TARBALL="$SOURCE-$VERSION.tar.gz"
WEB_SITE="http://www.freeradius.org/"
WGET_URL="ftp://ftp.freeradius.org/pub/radius/$TARBALL"

DEPENDS="libssl cyrus-sasl libldap libltdl python readline libunixODBC \
libkrb5 libcomerr3 libmysqlclient gdbm"
BUILD_DEPENDS="libtool openldap-dev openssl-dev pam-dev krb5-dev gdbm-dev"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	export CFLAGS="$CFLAGS -fno-strict-aliasing"
	./configure --sysconfdir=/etc \
		--localstatedir=/var \
		--with-system-libtool \
		--with-system-libltdl \
		$CONFIGURE_ARGS &&
	make -j1 &&
	make R=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib $fs/usr/share

	cp -a $_pkg/usr/bin $fs/usr
	cp -a $_pkg/usr/sbin $fs/usr
	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
	cp -a $_pkg/usr/share/freeradius $fs/usr/share
	cp -a $_pkg/etc $fs
	cp -a $_pkg/var $fs
	rm -f $fs/usr/lib/rlm_pam* $fs/etc/raddb/modules/pam
}