# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /usr/local/portage/net-misc/xsupplicant/xsupplicant-1.2.8-r5.ebuild,v 0.5 2007/04/13 16:51:36 Acevery Exp $ inherit flag-o-matic DESCRIPTION="Open Source Implementation of IEEE 802.1x" HOMEPAGE="http://open1x.sourceforge.net/" SRC_URI="mirror://sourceforge/open1x/${P}.tar.gz" LICENSE="|| ( GPL-2 BSD )" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" IUSE="gsm" RDEPEND=">=dev-libs/openssl-0.9.7 net-wireless/wireless-tools gsm? (sys-apps/pcsc-lite )" DEPEND="sys-devel/bison sys-devel/flex ${RDEPEND}" src_compile() { local conf # fix compilation with recent kernels append-flags -DHEADERS_KERNEL if use gsm; then use wireless # fix USE=-gsm (bug #118885) conf="--enable-eap-sim" # fix compilation with pcsc-lite-1.2.9_beta9 (bug #81338) append-flags -I/usr/include/PCSC fi epatch ${FILESDIR}/${P}-rj.patch econf \ ${conf} \ || die "econf failed" emake || die "emake failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" dodoc AUTHORS README TODO \ doc/README.certificates doc/README.wpa dohtml doc/Xsupplicant-wireless-cards.html docinto examples dodoc etc/*-example.conf insinto /etc newins etc/xsupplicant.conf xsupplicant.conf.example newins ${FILESDIR}/8021x.exe 8021x.exe newinitd ${FILESDIR}/saier saier newinitd ${FILESDIR}/ruijie ruijie newinitd ${FILESDIR}/${P}-init.d ${PN} } pkg_postinst() { einfo einfo "To use ${P} you must create the configuration file" einfo "/etc/xsupplicant.conf" einfo einfo "An example configuration file has been installed as" einfo "/etc/xsupplicant.conf.example" einfo einfo "To use Authenticate with Ruijie private protocal" einfo "You need to set account and password in default section" einfo einfo "Then," einfo "If you use dynamic IP" einfo "You need use: /etc/init.d/ruijie start | stop to begin or stop" einfo "If your network interface is not eth0" einfo "Just modify /etc/init.d/ruijie" einfo einfo "If you use Static IP" einfo "You need to set your IP and router" einfo "/etc/init.d/net as usual" einfo "Then use: /etc/init.d/saier start | stop to begin or stop" ewarn "You need to change the DNS in /etc/init.d/saier to yours." einfo }