aboutsummaryrefslogtreecommitdiffstats
path: root/audio/musicpc/Makefile
blob: 9556c9a901715e9d187070d26f7717c260cb54dc (plain) (blame)
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
# Created by: Mark Reidel <ports@mark.reidle.info>
# $FreeBSD$

PORTNAME=   musicpc
PORTVERSION=    0.26
CATEGORIES= audio ipv6
MASTER_SITES=   http://musicpd.org/download/mpc/0/
DISTNAME=   mpc-${PORTVERSION}

MAINTAINER= gblach@FreeBSD.org
COMMENT=    Command line client for the musicpd

LICENSE=    GPLv2

LIB_DEPENDS=    libmpdclient.so:${PORTSDIR}/audio/libmpdclient

OPTIONS_DEFINE= EXAMPLES DOCS ICONV
OPTIONS_DEFAULT=    ICONV

USES=       tar:xz pkgconfig
GNU_CONFIGURE=  yes
LDFLAGS+=   -L${LOCALBASE}/lib
CFLAGS+=    -I${LOCALBASE}/include

PLIST_FILES=    bin/mpc man/man1/mpc.1.gz

PORTDOCS=   AUTHORS README NEWS
PORTEXAMPLES=   *

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MICONV}
USES+=      iconv
LDFLAGS+=   ${ICONV_LIB}
.else
CONFIGURE_ARGS+=--disable-iconv
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|-lintl|${ICONV_LIB}|g' ${WRKSRC}/configure

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/mpc ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/doc/mpc.1 ${STAGEDIR}${MAN1PREFIX}/man/man1

    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/mpc-completion.bash \
        ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>