summaryrefslogtreecommitdiff
path: root/audio/cplay/Makefile
blob: a708fad87be091ba12fbac16be3d2ef0a4fed5ab (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
# $NetBSD: Makefile,v 1.22 2019/12/28 11:26:37 maya Exp $

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

MAINTAINER=		pkgsrc-users@NetBSD.org
#HOMEPAGE=		http://mask.tf.hut.fi/~flu/hacks/cplay/
COMMENT=		Curses front-end for various audio players
LICENSE=		gnu-gpl-v2

DEPENDS+=		${PYPKGPREFIX}-curses-[0-9]*:../../devel/py-curses

PYTHON_VERSIONS_ACCEPTED=	27
REPLACE_PYTHON=			cplay

USE_PKGLOCALEDIR=	yes
USE_TOOLS+=		msgfmt
USE_LANGUAGES=		# none

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'

INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1 share/examples/cplay
.for l in ${PKGLOCALES}
INSTALLATION_DIRS+=	${PKGLOCALEDIR}/locale/${l}/LC_MESSAGES
.endfor

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 ${DESTDIR}${PREFIX}/bin/
	${INSTALL_MAN} ${WRKSRC}/cplay.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/
	${INSTALL_DATA} ${WRKSRC}/cplayrc ${DESTDIR}${EGDIR}
.for l in ${PKGLOCALES}
	${INSTALL_DATA} ${WRKSRC}/po/${l}.mo ${DESTDIR}${PREFIX}/${PKGLOCALEDIR}/locale/${l}/LC_MESSAGES/cplay.mo
.endfor

.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"