summaryrefslogtreecommitdiff
path: root/audio/musicpd/Makefile
blob: 7ecc6279ee3877fb23964108a320a6104516bd28 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# $NetBSD: Makefile,v 1.11 2004/11/11 03:17:07 simonb Exp $

DISTNAME=		mpd-0.11.5
PKGNAME=		${DISTNAME:S/mpd/musicpd/}
CATEGORIES=		audio
MASTER_SITES=		http://mercury.chem.pitt.edu/~shank/

MAINTAINER=		simonb@NetBSD.org
HOMEPAGE=		http://musicpd.org/
COMMENT=		Remote controllable audio player

GNU_CONFIGURE=		yes
USE_BUILDLINK3=		yes
USE_LIBTOOL=		yes
USE_PKGINSTALL=		yes

BUILD_DEFS+=		MUSICPD_WITH_AAC
BUILD_DEFS+=		MUSICPD_WITH_AUDIOFILE
BUILD_DEFS+=		MUSICPD_WITH_FLAC
BUILD_DEFS+=		MUSICPD_WITH_ICONV
BUILD_DEFS+=		MUSICPD_WITH_ID3
BUILD_DEFS+=		MUSICPD_WITH_OGG
#BUILD_DEFS+=		USE_INET6

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

MUSICPD_WITH_AAC?=	YES
MUSICPD_WITH_AUDIOFILE?=YES
MUSICPD_WITH_FLAC?=	YES
MUSICPD_WITH_ICONV?=	YES
MUSICPD_WITH_ID3?=	YES
MUSICPD_WITH_OGG?=	YES

EGDIR=			${PREFIX}/share/examples/mpd
RCD_SCRIPTS=		mpd

FILES_SUBST+=		DEVOSSAUDIO=${DEVOSSAUDIO}
LDFLAGS+=		${LIBOSSAUDIO}

SUBST_CLASSES+=		config
SUBST_STAGE.config=	pre-configure
SUBST_FILES.config=	src/main.c
SUBST_SED.config=	-e s,/etc/mpd.conf,${PKG_SYSCONFDIR}/mpd.conf,

.if ${MUSICPD_WITH_AAC} == "YES"
.  include "../../audio/faad2/buildlink3.mk"
CONFIGURE_ARGS+=	--with-faad=${BUILDLINK_PREFIX.faad2}
.else
CONFIGURE_ARGS+=	--disable-aac
.endif

.if ${MUSICPD_WITH_AUDIOFILE} == "YES"
.  include "../../audio/libaudiofile/buildlink3.mk"
CONFIGURE_ARGS+=	--with-audiofile=${BUILDLINK_PREFIX.audiofile}
CONFIGURE_ENV+=		ac_cv_lib_iconv_iconv_open=yes
.else
CONFIGURE_ARGS+=	--disable-audiofile
.endif

.if ${MUSICPD_WITH_FLAC} == "YES"
.  include "../../audio/flac/buildlink3.mk"
CONFIGURE_ARGS+=	--with-flac=${BUILDLINK_PREFIX.flac}
.else
CONFIGURE_ARGS+=	--disable-flac
.endif

.if ${MUSICPD_WITH_ICONV} == "YES"
.  include "../../converters/libiconv/buildlink3.mk"
CONFIGURE_ARGS+=	--with-iconv=${BUILDLINK_PREFIX.iconv}
.else
CONFIGURE_ARGS+=	--disable-iconv
.endif

.if ${MUSICPD_WITH_ID3} == "YES"
.  include "../../audio/libid3tag/buildlink3.mk"
CONFIGURE_ARGS+=	--with-id3tag=${BUILDLINK_PREFIX.libid3tag}
.else
CONFIGURE_ARGS+=	--disable-id3
.endif

.if ${MUSICPD_WITH_OGG} == "YES"
.  include "../../audio/libvorbis/buildlink3.mk"
CONFIGURE_ARGS+=	--with-ogg=${BUILDLINK_PREFIX.libvorbis}
.else
CONFIGURE_ARGS+=	--disable-ogg
.endif

# when IPv6 support is enabled, mpd doesn't listen on an IPv4 address.
#.if defined(USE_INET6) && ${USE_INET6} == "YES"
#CONFIGURE_ARGS+=	--enable-ipv6
#.else
CONFIGURE_ARGS+=	--disable-ipv6
#.endif

post-build:
	@${SED} ${FILES_SUBST_SED} ${FILESDIR}/mpd.conf > ${WRKDIR}/mpd.conf

post-install:
	${INSTALL_DATA_DIR} ${EGDIR}
	${INSTALL_DATA} ${WRKDIR}/mpd.conf ${EGDIR}

.include "../../audio/libao/buildlink3.mk"
.include "../../audio/libmad/buildlink3.mk"

.include "../../mk/ossaudio.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"