# Copyright 2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # ebuild contributed by David Somers inherit eutils DESCRIPTION="CVSNT - source code revision control tools" HOMEPAGE="http://www.cvsnt.org/wiki" SRC_URI="http://www.cvsnt.org/archive/${P}.tar.gz" LICENSE="GPL-2 LGPL-2" SLOT="0" KEYWORDS="~x86" IUSE="kerberos pam ssl" DEPEND="virtual/libc >=sys-libs/zlib-1.1.4 ssl? (>=dev-libs/openssl-0.9.7d) kerberos? ( virtual/krb5 ) pam? ( >=sys-libs/pam-0.73 >=sys-apps/shadow-4.0.2-r2 )" RDEPEND=">=sys-apps/xinetd-2.3.13" src_compile() { # FYI, cvsnt has the following enable/disable options: # pam (note: needs PAM libs and headers) # server # lockserver # pserver # ext # fork (note: default is DISABLED) # rsh # gserver (note: needs MIT Kerberos V5 libs and headers) # sserver (note: needs OpenSSL libs and header) # sspi # cvsgui # rcs # NOTE: use --without-config-dir, until somebody works out how to # tweak this emerge to cope with the generated makefiles # trying to write into /etc/cvsnt econf \ --with-tmpdir=/tmp \ --without-config-dir \ --enable-rootcommit \ `use_enable pam` \ `use_enable ssl sserver` \ `use_enable kerberos gserver` \ || die emake || die "emake failed" } src_install() { einstall || die # cvsntpserver runs under xinetd.d insinto /etc/xinetd.d doins ${FILESDIR}/cvspserver || die "doins /etc/xinetd.d/cvspserver failed" # cvslockd exeinto /etc/init.d doexe ${FILESDIR}/cvslockd # sample config file and ca insinto /etc/cvsnt doins ${S}/doc/PServer.example || die "doins /etc/cvsnt/PServer.example failed" doins ${S}/ca.pem || die "doins /etc/cvsnt/ca.pem failed" # documentation dodoc ChangeLog* FAQ INSTALL NEWS README # pam if use pam; then insinto /etc/pam.d newins ${FILESDIR}/cvsnt.pam cvs || die "newins /etc/pam.d/cvsnt failed" fi } src_test() { einfo "FEATURES=\"maketest\" has been disabled for dev-util/cvsnt" } pkg_postinst() { draw_line einfo "If you are using cvsnt as a server, don't forget to:" einfo "1. customize /etc/cvsnt/PServer" einfo " set Repository0/Repository0Name, etc." einfo " (use /etc/cvsnt/PServer.example as a start)" einfo "2. customize /etc/xinetd.d/cvsntpserver" einfo " change disable = yes to disable = no" einfo " tweak only_from as applicable" einfo "3. do '/etc/init.d/xinetd restart'" einfo "4. do 'rc-update add cvslockd default'" einfo "5. do '/etc/init.d/cvslockd start'" einfo "6. setup your initial repository" einfo " (hint: cvs -d :local:/path/to/new/repository init)" }