summaryrefslogtreecommitdiff
path: root/package/mpd/Makefile
blob: d8118809ad9564fc8ac19f6ccbe0dcb15a95dd98 (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
# $Id$
#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${TOPDIR}/rules.mk

PKG_NAME:=		mpd
PKG_VERSION:=		0.14.2
PKG_RELEASE:=		3
PKG_MD5SUM:=		64177135f64aca555887ba378de8cdfb
MASTER_SITES:=		${MASTER_SITE_SOURCEFORGE:=musicpd/}

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,MPD,mpd,${PKG_VERSION}-${PKG_RELEASE}))

CONFIGURE_STYLE:=	gnu
BUILD_STYLE:=		auto
INSTALL_STYLE:=		auto
XAKE_FLAGS+=		MPD_CFLAGS='-D_GNU_SOURCE'
PKG_DEPENDS:=		glib2 alsa-lib libcurl

CONFIGURE_ARGS+=	\
	--enable-alsa \
	--disable-mod \
	--disable-oss \
	--disable-audiofile \
	--disable-mpc \

ifneq (${ADK_COMPILE_MPD_WITH_MP3},)
PKG_DEPENDS+=		libid3tag libmad
CONFIGURE_ARGS+=	--enable-id3 --enable-mp3
else
CONFIGURE_ARGS+=	--disable-id3 --disable-mp3
endif

ifneq (${ADK_COMPILE_MPD_WITH_MP4},)
PKG_DEPENDS+=		libfaad2
CONFIGURE_ARGS+=	--enable-aac
else
CONFIGURE_ARGS+=	--disable-aac
endif

ifeq (${ADK_COMPILE_MPD_WITH_OGG},y)
PKG_DEPENDS+=		libvorbis libogg
CONFIGURE_ARGS+=	--enable-oggvorbis 
else
CONFIGURE_ARGS+=	--disable-oggvorbis 
endif

ifneq (${ADK_COMPILE_MPD_WITH_TREMOR},)
PKG_DEPENDS+=		libvorbisidec
CONFIGURE_ARGS+=	\
	--disable-oggvorbis \
	--with-tremor \
	--with-tremor-includes=${STAGING_DIR}/usr/include \
	--with-tremor-libraries=${STAGING_DIR}/usr/lib
endif

ifneq (${ADK_COMPILE_MPD_WITH_FLAC},)
PKG_DEPENDS+=		libflac
CONFIGURE_ARGS+=	--enable-flac
else
CONFIGURE_ARGS+=	--disable-flac
endif

ifneq (${ADK_COMPILE_MPD_WITH_SHOUT},)
PKG_DEPENDS+=		libshout liblame
CONFIGURE_ARGS+=	--enable-shout-ogg \
			--enable-shout-mp3 \
			--enable-lame
else
CONFIGURE_ARGS+=	--disable-shout-ogg \
			--disable-shout-mp3 \
			--disable-lame
endif

COMMA:=			,
EMPTY:=
SPACE:=			${EMPTY} ${EMPTY}
PKG_DEPENDS:=		${subst ${SPACE},${COMMA}${SPACE},${sort ${PKG_DEPENDS}}}


post-install:
	${INSTALL_DIR} ${IDIR_MPD}/usr/bin
	${INSTALL_DIR} ${IDIR_MPD}/etc/init.d
	${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
	${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf
	${INSTALL_BIN} ./files/mpd.init \
	    ${IDIR_MPD}/etc/init.d/mpd
	echo "Depends: ${PKG_DEPENDS}" >> ${IDIR_MPD}/CONTROL/control

include ${TOPDIR}/mk/pkg-bottom.mk