summaryrefslogtreecommitdiff
path: root/misc/send-pr/Makefile
blob: bd6caacecacbdcd739427b1c9eb54df4e5bfb4f5 (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
# $NetBSD: Makefile,v 1.3 2012/10/08 09:57:37 asau Exp $

DISTNAME=	gnats-3.113.1
PKGNAME=	send-pr-${GNATS_VERSION}
CATEGORIES=	misc
MASTER_SITES=	${MASTER_SITE_GNU:=gnats/}

MAINTAINER=	cheusov@NetBSD.org
HOMEPAGE=	http://www.gnu.org/software/gnats/
COMMENT=	GNATS problem reporting tool
LICENSE=	gnu-gpl-v2

WRKSRC=		${WRKDIR}/gnats-${GNATS_VERSION}/send-pr
GNATS_VERSION=	${DISTNAME:S/gnats-//}

CONFLICTS+=	gnats-[0-9]* arla-[0-9]*

GNU_CONFIGURE=		YES

USE_TOOLS+=		makeinfo
INFO_FILES=		yes

LISPDIR=		${PREFIX}/share/emacs/site-lisp
CONFIGURE_ARGS=		--with-lispdir=${LISPDIR}

CONFIGURE_ENV+=		GNATS_ROOT=${PKG_SYSCONFDIR}/gnats

INSTALL_TARGET=		install install-info

# this stops the configuration program from pulling installation
# information in from the standard NetBSD send-pr program
CONFIGURE_ENV+=		SEND_PR=/dev/null

BUILD_MAKE_FLAGS+=	MAKEINFO=makeinfo\ --no-split
INSTALL_MAKE_FLAGS+=	INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} \
			man1dir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 \
			bindir=${DESTDIR}${PREFIX}/bin \
			datadir=${DESTDIR}${PREFIX}/share \
			infodir=${DESTDIR}${PREFIX}/${PKGINFODIR} \
			lispdir=${DESTDIR}${LISPDIR}

AUTO_MKDIRS=		yes

EGDIR=			${PREFIX}/share/examples/gnats
CONF_FILES=		${EGDIR}/config \
			${PKG_SYSCONFDIR}/gnats/gnats-adm/config

MAKE_DIRS+=		${PKG_SYSCONFDIR}/gnats \
			${PKG_SYSCONFDIR}/gnats/gnats-adm

SUBST_CLASSES+=		fix-paths
SUBST_STAGE.fix-paths=	post-patch
SUBST_MESSAGE.fix-paths=Fixing paths
SUBST_FILES.fix-paths=	send-pr.sh
SUBST_SED.fix-paths=	-e 's,install-sid,${PREFIX}/bin/install-sid,'
SUBST_SED.fix-paths+=	-e 's,send-pr --request-id,${PREFIX}/bin/send-pr --request-id,'

post-build:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} info

post-install:
	${INSTALL_DATA} ${WRKSRC}/INSTALL ${DESTDIR}${PREFIX}/share/gnats/dist/INSTALL.send-pr
	${INSTALL_DATA} ${FILESDIR}/netbsd-categories ${DESTDIR}${PREFIX}/share/gnats/netbsd
	${INSTALL_DATA} ${FILESDIR}/config ${DESTDIR}${EGDIR}

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