summaryrefslogtreecommitdiff
path: root/audio/rtunes/Makefile
blob: c47ab0371dc977323374a68c9c3f1b5616df2e0d (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
# $NetBSD: Makefile,v 1.8 2013/02/06 23:21:42 jperkin Exp $
#

DISTNAME=	rtunes-snap-20071122
PKGREVISION=	3
CATEGORIES=	audio
MASTER_SITES=	${MASTER_SITE_LOCAL}
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.nazgul.ch/dev.html
COMMENT=	Streams audio to an Apple AirPort Express device

WRKSRC=		${WRKDIR}/rtunes

NO_CONFIGURE=		yes
USE_TOOLS+=		yacc lex gmake
MAKE_FILE=		GNUmakefile

.include "../../mk/bsd.prefs.mk"

EGDIR=			${PREFIX}/share/examples/rtunes
CONF_FILES=		${EGDIR}/${RTUNES_CONF:T} \
				${PKG_SYSCONFDIR}/${RTUNES_CONF:T}
RTUNES_CONF=		${WRKDIR}/rtunes.conf

AUTO_MKDIRS=			yes

SUBST_CLASSES+=		doc
SUBST_FILES.doc=	librtunes/README
SUBST_STAGE.doc=	post-extract
SUBST_VARS.doc=		PREFIX

post-extract:
	cp ${FILESDIR}/${RTUNES_CONF:T} ${WRKDIR}/${RTUNES_CONF:T}

.if defined(RTUNES_SERVER) && !empty(RTUNES_SERVER)
pre-build: prepare-rtunes-conf
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/rtunes/rtunes \
		${DESTDIR}${PREFIX}/bin/rtunes
	${INSTALL_MAN} ${WRKSRC}/rtunes/rtunes.1 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
	${INSTALL_MAN} ${WRKSRC}/rtunes/rtunes.conf.5 \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
	${INSTALL_DATA} ${WRKSRC}/librtunes/librtunes.a \
		${DESTDIR}${PREFIX}/lib

	${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/rtunes
	${INSTALL_DATA} ${WRKDIR}/rtunes.conf ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/librtunes/mplayer.diff ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/librtunes/README \
		${DESTDIR}${PREFIX}/share/doc/rtunes

.PHONY: prepare-rtunes-conf
prepare-rtunes-conf:
	${RUN} ${ECHO_MSG} "stream to ${RTUNES_SERVER}" >> ${RTUNES_CONF:Q}

.include "../../security/openssl/buildlink3.mk"

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