summaryrefslogtreecommitdiff
path: root/databases/gnats/Makefile
blob: cca949d49ad5ea0d550158e0d066b8a915e8d1e6 (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
# $NetBSD: Makefile,v 1.28 2006/04/23 00:12:36 jlam Exp $

DISTNAME=	gnats-4.1.0
PKGREVISION=	2
CATEGORIES=	databases
MASTER_SITES=	${MASTER_SITE_GNU:=gnats/}

MAINTAINER=	recht@NetBSD.org
HOMEPAGE=	http://www.gnu.org/software/gnats/
COMMENT=	GNATS bug tracking system

USE_PKGLOCALEDIR=	yes
USE_TOOLS+=		gm4 gmake makeinfo bison
TEXINFO_REQD+=		4.6
USE_LIBTOOL=		yes
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+=	--with-gnats-service=service-name=${GNATS_SERVICE}
CONFIGURE_ARGS+=	--with-gnats-user=${GNATS_USER:Q}
CONFIGURE_ARGS+=	--with-gnatsd-user-access-file=${GNATS_USER_FILE:Q}
CONFIGURE_ARGS+=	--with-gnatsd-host-access-file=${GNATS_HOST_FILE:Q}
CONFIGURE_ARGS+=	--with-gnats-dblist-file=${GNATS_DB_FILE:Q}
CONFIGURE_ARGS+=	--with-gnats-default-db=${GNATS_DBHOME:Q}
CONFIGURE_ARGS+=	--with-lispdir=${PREFIX}/share/gnats

INFO_FILES=		# PLIST

PKG_SYSCONFSUBDIR=	gnats

GNATS_USER?=	gnats
GNATS_GROUP?=	daemon
GNATS_SERVICE?=	support
GNATS_HOME?=	${VARBASE}/db/gnats
PKG_GROUPS=	${GNATS_GROUP}
PKG_USERS=	${GNATS_USER}:${GNATS_GROUP}

PKG_GECOS.${GNATS_USER}=	GNATS database owner
PKG_HOME.${GNATS_USER}=		${GNATS_HOME}
PKG_SHELL.${GNATS_USER}=	${SH}

GNATS_USER_FILE?=	${PKG_SYSCONFDIR}/gnatsd.user_access
GNATS_HOST_FILE?=	${PKG_SYSCONFDIR}/gnatsd.host_access
GNATS_DB_FILE?=		${PKG_SYSCONFDIR}/databases
GNATS_DBHOME?=		${GNATS_HOME}/gnatsdb

REQD_DIRS+=		${PREFIX}/share/gnats
REQD_DIRS+=		${PREFIX}/libexec/gnats
REQD_DIRS+=		${EGDIR}
OWN_DIRS_PERMS+=	${GNATS_HOME} gnats daemon 755

EGDIR=			${PREFIX}/share/examples/gnats
CONF_FILES_PERMS+=	${EGDIR}/gnatsd.user_access  ${GNATS_USER_FILE}	\
			${GNATS_USER} ${GNATS_GROUP} 0600
CONF_FILES_PERMS+=	${EGDIR}/gnatsd.host_access  ${GNATS_HOST_FILE}	\
			${GNATS_USER} ${GNATS_GROUP} 0600
CONF_FILES_PERMS+=	${EGDIR}/databases ${GNATS_DB_FILE}		\
			${GNATS_USER} ${GNATS_GROUP} 0600
CONF_FILES+=		${EGDIR}/send-pr.conf ${PKG_SYSCONFDIR}/send-pr.conf

MESSAGE_SUBST+=		PREFIX=${PREFIX:Q}
MESSAGE_SUBST+=		GNATS_USER=${GNATS_USER:Q}
MESSAGE_SUBST+=		GNATS_SERVICE=${GNATS_SERVICE:Q}

SUBST_CLASSES+=		gnats
SUBST_STAGE.gnats=	pre-configure
SUBST_FILES.gnats=	gnats/Makefile.in gnats/mkdb.sh send-pr/Makefile.in
SUBST_SED.gnats=	-e "s,%%EGDIR%%,${EGDIR},g"
SUBST_SED.gnats+=	-e "s,%%GNATS_DEFAULTS%%,${PREFIX}/share/gnats/defaults,g"

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