summaryrefslogtreecommitdiff
path: root/www/ap-ruby/Makefile
blob: e00362c4766eb4136a43fc7ee1743f8e428b5ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# $NetBSD: Makefile,v 1.9 2002/03/20 15:09:40 taca Exp $
# $FreeBSD: ports/www/mod_ruby/Makefile,v 1.10 2000/12/31 10:14:53 knu Exp $

DISTNAME=	mod_ruby-${VERSION}
PKGNAME=	ap-${RUBY_PKGNAMEPREFIX}${VERSION}
CATEGORIES=	www
MASTER_SITES=	http://www.modruby.net/archive/

MAINTAINER=	taca@netbsd.org
HOMEPAGE=	http://www.modruby.net/
COMMENT=	Apache module that embeds Ruby interpreter within

DEPENDS+=	${BUILDLINK_DEPENDS.apache}:../../www/apache
DEPENDS+=	${RUBY_PKGNAMEPREFIX}eruby>=0.9:../../textproc/ruby-eruby

DIST_SUBDIR=	ruby
USE_RUBY=	yes
RUBY_REQD=	1.6
VERSION=	0.9.7

HAS_CONFIGURE=  yes
CONFIGURE_SCRIPT= ./configure.rb
CONFIGURE_ARGS=	--with-apxs="${APXS}" \
		--with-eruby-includes="${LOCALBASE}/include" \
		--with-eruby-libraries="${LOCALBASE}/lib"
INSTALL_TARGET=	site-install

CONF_FILES=	${RUBY_EXAMPLESDIR}/mod_ruby/mod_ruby.conf \
		${LOCALBASE}/etc/httpd/mod_ruby.conf
FILES_SUBST+=	RUBY_DOCDIR=${RUBY_DOCDIR}
FILES_SUBST+=	RUBY_EXAMPLESDIR=${RUBY_EXAMPLESDIR}

DOCS=		ChangeLog README.en README.ja

post-build:
	${SED} -e 's|/usr/local/apache/libexec|${LOCALBASE}/lib/httpd|g' \
		${WRKSRC}/examples/httpd.conf > ${WRKDIR}/mod_ruby.conf

post-install:
	${APXS} -i -A -n ruby ${WRKSRC}/mod_ruby.so
	${INSTALL_DATA_DIR} ${RUBY_EXAMPLESDIR}/mod_ruby
	${INSTALL_DATA} ${WRKDIR}/mod_ruby.conf  ${RUBY_EXAMPLESDIR}/mod_ruby
	${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/mod_ruby
.for f in ${DOCS}
	${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/mod_ruby
.endfor

.include "../../www/apache/buildlink.mk"
.include "../../lang/ruby-base/Makefile.common"
.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"