summaryrefslogtreecommitdiff
path: root/audio/cplay/Makefile
blob: 221dc631ff88bff7dd2a6fd501d9bb542e28f7a0 (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
# $NetBSD: Makefile,v 1.2 2005/11/10 09:04:25 tonio Exp $

DISTNAME=		cplay-1.49
PKGREVISION=		1
CATEGORIES=		audio
MASTER_SITES=		${HOMEPAGE}

MAINTAINER=		geert.hendrickx@ua.ac.be
HOMEPAGE=		http://www.tf.hut.fi/~flu/cplay/
COMMENT=		Curses front-end for various audio players

PYTHON_PATCH_SCRIPTS=	cplay

USE_PKGINSTALL=		yes
BUILD_USE_MSGFMT=	yes
USE_PKGLOCALEDIR=	yes

PKGLOCALES=		da de hu pl
EGDIR=			${PREFIX}/share/examples/cplay
CONF_FILES=		${EGDIR}/cplayrc ${PKG_SYSCONFDIR}/cplayrc

SUBST_CLASSES+=		paths
SUBST_STAGE.paths=	pre-build
SUBST_FILES.paths=	cplay cplay.1
SUBST_SED.paths=	-e 's,/etc/cplayrc,${PKG_SYSCONFDIR}/cplayrc,g'
SUBST_SED.paths+=	-e 's,/usr/local/share/locale,${PREFIX}/${PKGLOCALEDIR}/locale,g'

do-build:
	cd ${WRKSRC} && ${MAKE_PROGRAM} cplayrc
.for M in ${PKGLOCALES}
	msgfmt -o ${WRKSRC}/po/${M}.mo ${WRKSRC}/po/${M}.po
.endfor

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/cplay ${PREFIX}/bin/
	${INSTALL_MAN} ${WRKSRC}/cplay.1 ${PREFIX}/man/man1/
	${INSTALL_DATA_DIR} ${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/cplayrc ${EGDIR}
.for L in ${PKGLOCALES}
	${INSTALL_DATA_DIR} ${PREFIX}/${PKGLOCALEDIR}/locale/${L}/LC_MESSAGES
	${INSTALL_DATA} ${WRKSRC}/po/${L}.mo ${PREFIX}/${PKGLOCALEDIR}/locale/${L}/LC_MESSAGES/cplay.mo
.endfor

.include "../../lang/python/application.mk"
.include "../../devel/py-curses/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"