summaryrefslogtreecommitdiff
path: root/www/wiliki/Makefile
blob: ed710cf446b4f2235aae167c8b3e3fa4bc31eca9 (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
52
53
54
55
56
57
58
# New ports collection makefile for:   WiLiKi
# Date created:                22 August 2003
# Whom:                        Kimura Fuyuki <fuyuki@nigredo.org>
#
# $FreeBSD$
#

PORTNAME=	wiliki
PORTVERSION=	0.5.3
CATEGORIES=	www scheme
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTNAME=	WiLiKi-${PORTVERSION}
EXTRACT_SUFX=	.tgz

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A lightweight Wiki engine written in Scheme

BUILD_DEPENDS=	gosh:${PORTSDIR}/lang/gauche
RUN_DEPENDS=	${LOCALBASE}/share/gauche/${GAUCHE_VER}/lib/dbm/gdbm.scm:${PORTSDIR}/databases/gauche-gdbm

USE_REINPLACE=	yes
GNU_CONFIGURE=	yes

.include <bsd.port.pre.mk>

.if ${ARCH} == "alpha"
BROKEN=		"Does not build"
.endif

.if exists(${LOCALBASE}/bin/gauche-config)
GAUCHE_VER!=	${LOCALBASE}/bin/gauche-config -V
.else
GAUCHE_VER=	none
.endif

post-patch:
	${REINPLACE_CMD} -E \
		-e 's,/usr/bin,${PREFIX}/bin,' \
		-e 's,/home/shiro/data/wikidata.dbm,/var/wiliki/data.dbm,' \
		-e 's,wiliki2?\.css,/&,' \
		-e "s/:language 'jp/:language 'en/" ${WRKSRC}/src/*.cgi

post-install:
	${MKDIR} ${PREFIX}/www/cgi-bin
.for f in wiliki.cgi wiliki2.cgi
	${INSTALL_DATA} ${WRKSRC}/src/${f} ${PREFIX}/www/cgi-bin/${f}.dist
.endfor
	${MKDIR} ${PREFIX}/www/data
	${INSTALL_DATA} ${WRKSRC}/src/*.css ${PREFIX}/www/data
	${MKDIR} /var/wiliki
	${CHOWN} www:www /var/wiliki
	@${CAT} ${PKGMESSAGE}

test:
	cd ${WRKSRC}; ${MAKE} check

.include <bsd.port.post.mk>