summaryrefslogtreecommitdiff
path: root/databases/rubygem-postgres/Makefile
blob: 5c9548e373fb6a78f455881d2ac021ab9be2e339 (plain) (blame)
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
# New ports collection makefile for:	ruby-postgres
# Date created:		19 April 1999
# Whom:			Yasuhiro Fukuma <yasuf@big.or.jp>
#
# $FreeBSD$
#

PORTNAME=	postgres
PORTVERSION=	0.6.1
CATEGORIES=	databases
MASTER_SITES=	http://webclub.kcom.ne.jp/mb/noborus/archive/
PKGNAMEPREFIX=	ruby-
DIST_SUBDIR=	ruby

MAINTAINER=	knu@FreeBSD.org

BUILD_DEPENDS=	ruby:${PORTSDIR}/lang/ruby
RUN_DEPENDS=	ruby:${PORTSDIR}/lang/ruby
LIB_DEPENDS=	pq.2:${PORTSDIR}/databases/postgresql7

WRKSRC=		${WRKDIR}/${PORTNAME}
CONFIGURE_ARGS+= --with-pgsql-include-dir="${PGDIR}/include" \
		--with-pgsql-lib-dir="${PGDIR}/lib"
PLIST_SUB+=	RUBY_VER="${RUBY_VER}" RUBY_ARCH="${RUBY_ARCH}"

RUBY?=		${PREFIX}/bin/ruby
RUBY_VER?=	1.4
RUBY_ARCH?=	${ARCH}-freebsd${OSREL}

PGDIR?=		${PREFIX}/pgsql

DOCS_EN=	ChangeLog README doc/postgres.html
DOCS_JA=	README.jp doc/postgres.jp.html

do-configure:
	@cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} extconf.rb ${CONFIGURE_ARGS}

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${PREFIX}/share/examples/ruby/postgres
	${INSTALL_DATA} ${WRKSRC}/sample/* ${PREFIX}/share/examples/ruby/postgres/
	${MKDIR} ${PREFIX}/share/doc/ruby/postgres/ja
.for f in ${DOCS_EN}
	${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/ruby/postgres/
.endfor
.for f in ${DOCS_JA}
	${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/ruby/postgres/ja/
.endfor
.endif

.include <bsd.port.mk>