summaryrefslogtreecommitdiff
path: root/databases/geneweb/Makefile
blob: 831d49d046af20f035bd83c634904b07a19016dd (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# $NetBSD: Makefile,v 1.19 2005/02/04 22:17:51 adrianp Exp $
#

DISTNAME=	geneweb-4.10
CATEGORIES=	databases
MASTER_SITES=	ftp://ftp.inria.fr/INRIA/Projects/cristal/geneweb/Src/

MAINTAINER=	wulf@NetBSD.org
HOMEPAGE=	http://cristal.inria.fr/~ddr/GeneWeb/
COMMENT=	GeneWeb is a comprehensive genealogy database application

BUILD_DEPENDS+=	ocaml>=3.04:../../lang/ocaml

USE_PKGINSTALL=	yes
USE_GNU_TOOLS+=	make

RCD_SCRIPTS=	geneweb

.if !exists(${LOCALBASE}/bin/ocamlc.opt)
BUILD_TARGET=	out
.endif

.include "../../mk/bsd.prefs.mk"

# sysutils/coreutils a 'gwc' program, so conflict with it if
# ${GNU_PROGRAM_PREFIX} == "g"
.if ${GNU_PROGRAM_PREFIX} == "g"
CONFLICTS+=	coreutils-[0-9]*
.endif

# Stripped OCAML binaries don't seem to work nolonger
# Installing unstripped binaries until this is fixed
INSTALL_PROGRAM =  ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}

pre-configure:
		if ! ${TEST} -x ${LOCALBASE}/bin/ocamlc.opt; then \
		  ${ECHO} "No optimized ocaml binaries found"; \
		  cd ${WRKSRC}/tools/; \
		  ${MV} Makefile.inc Makefile.inc.orig; \
		  ${SED} -e "s/\.opt//g" Makefile.inc.orig > Makefile.inc; \
		fi

post-build:
		cd ${WRKSRC} && ${GMAKE} distrib

do-install:
		${INSTALL_DATA_DIR} ${PREFIX}/share/examples/geneweb
		${INSTALL_DATA_DIR} ${PREFIX}/share/doc/geneweb
		${INSTALL_DATA_DIR} ${PREFIX}/share/geneweb/etc
		${INSTALL_DATA_DIR} ${PREFIX}/share/geneweb/gwtp_tmp
		${INSTALL_DATA_DIR} ${PREFIX}/share/geneweb/images
		${INSTALL_DATA_DIR} ${PREFIX}/share/geneweb/lang
		${INSTALL_DATA_DIR} ${PREFIX}/share/geneweb/setup
		cd ${WRKSRC}/distribution/gw && \
		${INSTALL_PROGRAM} gwd ${PREFIX}/libexec && \
		${INSTALL_PROGRAM} consang ${PREFIX}/bin && \
		${INSTALL_PROGRAM} gwc ${PREFIX}/bin && \
		${INSTALL_PROGRAM} gwtp_tmp/gwtp ${PREFIX}/bin && \
		${INSTALL_PROGRAM} ged2gwb ${PREFIX}/bin && \
		${INSTALL_PROGRAM} gwb2ged ${PREFIX}/bin && \
		${INSTALL_PROGRAM} gwsetup ${PREFIX}/sbin && \
		${INSTALL_PROGRAM} gwu ${PREFIX}/bin && \
		${CP} -Rp doc/* ${PREFIX}/share/doc/geneweb && \
		${CP} -Rp etc ${PREFIX}/share/geneweb && \
		${CP} -Rp gwtp_tmp ${PREFIX}/share/geneweb && \
		${CP} -Rp images ${PREFIX}/share/geneweb && \
		${CP} -Rp lang ${PREFIX}/share/geneweb && \
		${CP} -Rp setup ${PREFIX}/share/geneweb && \
		${INSTALL_DATA} a.gwf ${PREFIX}/share/examples/geneweb && \
		${INSTALL_DATA} only.txt ${PREFIX}/share/examples/geneweb
		${TOUCH} ${PREFIX}/share/geneweb/gwtp_tmp/passwd
		${TOUCH} ${PREFIX}/share/geneweb/gwtp_tmp/gwtp.log
		${CHMOD} 600 ${PREFIX}/share/geneweb/gwtp_tmp/passwd
		${CHMOD} 600 ${PREFIX}/share/geneweb/gwtp_tmp/gwtp.log
		${CHOWN} -R nobody.${ROOT_GROUP} ${PREFIX}/share/geneweb

.include "../../mk/bsd.pkg.mk"