summaryrefslogtreecommitdiff
path: root/sysutils/mgm/Makefile
blob: d70e91e5222e8730312af099186e44de876453cf (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
# $NetBSD: Makefile,v 1.16 2012/10/03 21:57:40 wiz Exp $

DISTNAME=	mgm-1.1
PKGREVISION=	3
CATEGORIES=	sysutils
MASTER_SITES=	http://www.xiph.org/mgm/
EXTRACT_SUFX=	.tgz

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://linuxmafia.com/mgm/
COMMENT=	Moaning Goat Meter

PKG_DESTDIR_SUPPORT=	user-destdir

DEPENDS+=	p5-Tk-[0-9]*:../../x11/p5-Tk

WRKSRC=		${WRKDIR}/mgm
NO_BUILD=	yes
USE_TOOLS+=	perl:run

MGM_PERL_DIR=	${PREFIX}/lib/mgm
MGM_DOC_DIR=	${PREFIX}/share/doc/mgm

INSTALLATION_DIRS=	bin

REPLACE_PERL+=	mgm lib/xpm

post-patch:
	${SED} -e 's|@@MGM_PERL_DIR@@|${MGM_PERL_DIR}|' \
		${FILESDIR}/mgm.sh > ${WRKDIR}/mgm.sh

INSTALLATION_DIRS+=	${MGM_PERL_DIR}/modules ${MGM_DOC_DIR}

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/mgm ${DESTDIR}${MGM_PERL_DIR}
	set -e; \
	cd ${WRKSRC}; \
	for DIR in lib modules/*; do \
		${INSTALL_DATA_DIR} ${DESTDIR}${MGM_PERL_DIR}/"$$DIR"; \
		for FILE in "$$DIR"/*; do \
			${INSTALL_DATA} "$$FILE" ${DESTDIR}${MGM_PERL_DIR}/"$$DIR"; \
		done; \
	done
	cd ${WRKSRC}/doc && ${INSTALL_DATA} * ${DESTDIR}${MGM_DOC_DIR}
	${INSTALL_SCRIPT} ${WRKDIR}/mgm.sh ${DESTDIR}${PREFIX}/bin/mgm

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