NAME=rp-pppoe
VERSION=3.8
SOURCE=http://www.roaringpenguin.com/penguin/pppoe/rp-pppoe-$VERSION.tar.gz
BUILD=1
OPTIMIZE=${OPTIMIZE:-"-O2"}

build() {
	_explode 0
	cd rp-pppoe-$VERSION/src
	$CONFIGURE
	make
	make RPM_INSTALL_ROOT=$PKG install

	# Compatibility with 3.5: adsl-* have been renamed to pppoe-*
	# which as is probably a good thing, but probably breaks scripts:
	for I in setup stop status start connect; do
		ln -s pppoe-$I $PKG$SBINDIR/adsl-$I
	done

	# This directory is already in in ppp-package. It is acutally
	# a symlink to ppp plugins directory.
	rm -rf $PKG/etc/ppp/plugins

	# Don't overwrite configuration files:
	_new 0 \
		etc/ppp/pppoe-server-options \
		etc/ppp/firewall-masq \
		etc/ppp/firewall-standalone \
		etc/ppp/pppoe.conf

	_chfix
	_chgrp_bin
}
