diff options
author | Mamoru Komachi <usata@gentoo.org> | 2004-04-16 16:50:35 +0000 |
---|---|---|
committer | Mamoru Komachi <usata@gentoo.org> | 2004-04-16 16:50:35 +0000 |
commit | 695949f6d0f114f3964121eddb067db80948b293 (patch) | |
tree | 1f7631f3923cab242dc9d25f4d9fe4ffcfd7054a /dev-ruby/mod-ruby/mod-ruby-1.1.3-r1.ebuild | |
parent | ~amd64 (Manifest recommit) (diff) | |
download | gentoo-2-695949f6d0f114f3964121eddb067db80948b293.tar.gz gentoo-2-695949f6d0f114f3964121eddb067db80948b293.tar.bz2 gentoo-2-695949f6d0f114f3964121eddb067db80948b293.zip |
Fix configs for apache-1.x, thanks to Jeff Mitchell <quixoticsycophant@yahoo.com> for the patch. Closing bug #27649
Diffstat (limited to 'dev-ruby/mod-ruby/mod-ruby-1.1.3-r1.ebuild')
-rw-r--r-- | dev-ruby/mod-ruby/mod-ruby-1.1.3-r1.ebuild | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/dev-ruby/mod-ruby/mod-ruby-1.1.3-r1.ebuild b/dev-ruby/mod-ruby/mod-ruby-1.1.3-r1.ebuild new file mode 100644 index 000000000000..701e18e14b6f --- /dev/null +++ b/dev-ruby/mod-ruby/mod-ruby-1.1.3-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mod-ruby/mod-ruby-1.1.3-r1.ebuild,v 1.1 2004/04/16 16:50:35 usata Exp $ + +MY_P=mod_ruby-${PV} +DESCRIPTION="Embeds the Ruby interpreter into Apache" +HOMEPAGE="http://modruby.net/" +SRC_URI="http://modruby.net/archive/${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" +# 1.0.X -> stable branch; 1.1.Y -> development branch +KEYWORDS="~alpha ~sparc ~x86 ~ppc" +IUSE="apache2 doc" +DEPEND=">=net-www/apache-1.3.3 + virtual/ruby + doc? ( dev-ruby/rdtool )" +S=${WORKDIR}/${MY_P} + +apache2-detect() { + if [ "`has_version '=net-www/apache-1*'`" != 1 -o "`use apache2`" ]; then + true + else + false + fi +} + +src_compile() { + + local two + if apache2-detect ; then + two="2" + else # apache1 + ewarn "apache 1.3.x support is UNTESTED" + two="" + fi + + ./configure.rb --with-apxs=/usr/sbin/apxs${two} + + sed -i -e "s:\(^APACHE_LIBEXECDIR = \$(DESTDIR)/usr/lib/apache${two}\)/modules:\1-extramodules:" Makefile + + emake || die + + if [ "`use doc`" ]; then + cd doc + emake + fi +} + +src_install() { + + make DESTDIR=${D} install || die + + if apache2-detect ; then + insinto /etc/apache2/conf/modules.d + doins ${FILESDIR}/20_mod_ruby.conf + else # apache1 + insinto /etc/apache/conf/addon-modules + doins ${FILESDIR}/mod_ruby.conf + fi + + dodoc ChangeLog COPYING README.* + + if [ "`use doc`" ]; then + dohtml doc/*.css doc/*.html + fi + +} + +pkg_postinst() { + if apache2-detect ; then + einfo "To enable mod_ruby, edit /etc/conf.d/apache2 and add \"-D RUBY\"" + einfo "You may also wish to edit /etc/apache2/conf/modules.d/20_mod_ruby.conf" + else # apache1 + einfo "To enable mod_ruby:" + einfo "1. Run \"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" + einfo "2. Edit /etc/conf.d/apache and add \"-D RUBY\"" + fi + einfo "You must restart apache for changes to take effect" +} + +pkg_config() { + if ! apache2-detect ; then + echo -e "<IfDefine RUBY>\n Include conf/addon-modules/mod_ruby.conf\n</IfDefine>" \ + >> ${ROOT}/etc/apache/conf/apache.conf + fi +} |