# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Flexible Single Sign-On Solution: nsvs - Name Service Via Sockets" HOMEPAGE="http://fssos.sourceforge.net/" SRC_URI="http://fssos.sourceforge.net/snapshot/${P}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="" S=${WORKDIR}/${PN} DEPEND="virtual/libc >=dev-db/mysql-3.2 !sys-libs/libnss-mysql" src_compile() { econf \ --prefix= \ --sbindir=/sbin \ --sysconfdir=/etc/nsvs \ --localstatedir=/var \ --libdir=/lib \ || die "configure failed" emake || die "make failed" } src_install() { emake DESTDIR="${D}" install exeinto /etc/init.d newexe support/nsvsd-gentoo.init nsvsd dodoc NEWS,README,TODO,SNAPSHOT,ChangeLog newdoc sample/nsvsd/README README.sample docinto sample dodoc sample/nsvsd/linux/{*.sql,*.conf} } pkg_preinst() { enewuser nsvsd 110 } pkg_postinst() { einfo "" einfo "You should do following:" einfo "" einfo "Add data to MySQL. The default configs will work well with the sample" einfo "sql database in /usr/share/doc/${P}/sample/sample_database.sql." einfo "" einfo "Edit /etc/nsvs/nsvsd.conf" einfo "" einfo "Edit /etc/nsswitch.conf such that it contains the following:" einfo "" einfo "passwd: files nsvs" einfo "group: files nsvs" einfo "shadow: files nsvs" einfo "" einfo "If you don't want groups from MySQL, simply don't include 'nsvs' in" einfo "in the 'group' line." einfo "" einfo "Start 'nsvsd':" einfo "/etc/init.d/nsvsd start" einfo "rc-update add nsvsd default" einfo "" }