# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit git ruby DESCRIPTION="Most awesome pagination solution for Ruby" HOMEPAGE="http://github.com/mislav/will_paginate/wikis" EGIT_REPO_URI="git://github.com/mislav/will_paginate.git" EGIT_BRANCH="master" EGIT_TREE="2.3.6" SRC_URI="" LICENSE="Ruby" SLOT="0" KEYWORDS="~x86" IUSE="doc examples" USE_RUBY="ruby18" DEPEND="doc? (dev-ruby/rake)" RDEPEND="${DEPEND} >=dev-ruby/activesupport-1.4.4" SITERUBY=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') INSTALLDIR="${SITERUBY}/1.8/${PN}/" src_unpack(){ git_src_unpack } src_compile(){ if use doc; then rake rdoc || die "rake rdoc failed" fi } src_install(){ dodir ${INSTALLDIR} cp -r lib "${D}${INSTALLDIR}" || die "Installing failed." dodoc CHANGELOG.rdoc LICENSE README.rdoc || die "Installing docs failed." # installing loader insinto ${SITERUBY} doins ${FILESDIR}/will_paginate.rb if use doc; then dohtml -r doc/* || die "Installing html documentation failed." fi if use examples; then docinto examples dodoc examples/* || die "Installing examples failes." fi }