summaryrefslogtreecommitdiff
path: root/package/mpd/Makefile
blob: 16de1b05fbadc856884f0af20492ff300c99692d (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# 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.15.10
PKG_RELEASE:=		1
PKG_MD5SUM:=		3ee746cb9193acfd0e1bd7a8c54af1a6
PKG_DESCR:=		A music player daemon
PKG_SECTION:=		multimedia
PKG_DEPENDS:=		glib libstdcxx
PKG_BUILDDEP+=		glib
ifneq ($(ADK_PACKAGE_MPD_WITH_ALSA),)
PKG_BUILDDEP+=		alsa-lib
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_AO),)
PKG_BUILDDEP+=		libao
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_MP3),)
PKG_BUILDDEP+=		libid3tag libmad
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_MP4),)
PKG_BUILDDEP+=		faad2
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_OGG),)
PKG_BUILDDEP+=		libvorbis libogg
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_TREMOR),)
PKG_BUILDDEP+=		libvorbisidec
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_FLAC),)
PKG_BUILDDEP+=		flac
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_WAV),)
PKG_BUILDDEP+=		libaudiofile
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_SHOUT),)
PKG_BUILDDEP+=		lame libvorbis libshout
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_CURL),)
PKG_BUILDDEP+=		curl
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_MMS),)
PKG_BUILDDEP+=		libmms
endif
ifneq ($(ADK_PACKAGE_MPD_WITH_FFMPEG),)
PKG_BUILDDEP+=		ffmpeg
endif
PKG_URL:=		http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki
PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=musicpd/}

PKG_FLAVOURS:=		WITH_ALSA WITH_AO WITH_MP3 WITH_MP4 WITH_TREMOR \
			WITH_OGG WITH_FLAC WITH_WAV WITH_MMS WITH_FFMPEG \
			WITH_SHOUT WITH_CURL
PKGFD_WITH_ALSA:=	enable ALSA output
PKGFS_WITH_ALSA:=	alsa-lib
PKGFD_WITH_AO:=		enable Libao/ESD output
PKGFS_WITH_AO:=		libao
PKGFD_WITH_MP3:=	enable MP3 support
PKGFS_WITH_MP3:=	libid3tag libmad
PKGFD_WITH_MP4:=	enable MP4 support
PKGFS_WITH_MP4:=	libfaad2
PKGFD_WITH_OGG:=	enable OGG support
PKGFS_WITH_OGG:=	libvorbis libogg
PKGFD_WITH_TREMOR:=	enable fixpoint Vorbis/OGG support
PKGFS_WITH_TREMOR:=	libvorbisidec
PKGFD_WITH_FLAC:=	enable FLAC support
PKGFS_WITH_FLAC:=	libflac
PKGFD_WITH_WAV:=	enable WAVE support
PKGFS_WITH_WAV:=	libaudiofile
PKGFD_WITH_MMS:=	enable MMS support
PKGFS_WITH_MMS:=	libmms
PKGFD_WITH_FFMPEG:=	enable FFMPEG support
PKGFS_WITH_FFMPEG:=	ffmpeg
PKGFD_WITH_SHOUT:=	enable Shoutcast output support
PKGFS_WITH_SHOUT:=	libshout liblame libvorbis
PKGFD_WITH_CURL:=	enable CURL support
PKGFS_WITH_CURL:=	libcurl

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,MPD,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

TCFLAGS+=		-std=gnu99
XAKE_FLAGS+=		MPD_CFLAGS='-D_GNU_SOURCE'
CONFIGURE_ARGS+=	--disable-httpd-output \
			--disable-jack \
			--disable-fifo \
			--disable-pulse \
			--disable-oss \
			--disable-mpc \
			--disable-wavpack \
			--disable-sqlite \
			--with-zeroconf=no

ifneq (${ADK_PACKAGE_MPD_WITH_ALSA},)
CONFIGURE_ARGS+=	--enable-alsa
else
CONFIGURE_ARGS+=	--disable-alsa
endif

ifneq (${ADK_PACKAGE_MPD_WITH_AO},)
CONFIGURE_ARGS+=	--enable-ao
else
CONFIGURE_ARGS+=	--disable-ao
endif

ifneq (${ADK_PACKAGE_MPD_WITH_MP3},)
CONFIGURE_ARGS+=	--enable-id3 --enable-mad
else
CONFIGURE_ARGS+=	--disable-id3 --disable-mad
endif

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

ifneq (${ADK_PACKAGE_MPD_WITH_OGG},)
CONFIGURE_ARGS+=	--enable-vorbis
else
CONFIGURE_ARGS+=	--disable-vorbis
endif

ifneq (${ADK_PACKAGE_MPD_WITH_TREMOR},)
CONFIGURE_ARGS+=	\
			--disable-vorbis \
			--with-tremor \
			--with-tremor-includes=${STAGING_DIR}/usr/include \
			--with-tremor-libraries=${STAGING_DIR}/usr/lib
endif

ifneq (${ADK_PACKAGE_MPD_WITH_FLAC},)
CONFIGURE_ARGS+=	--enable-flac --enable-oggflac
else
CONFIGURE_ARGS+=	--disable-flac --disable-oggflac
endif

ifneq (${ADK_PACKAGE_MPD_WITH_WAV},)
CONFIGURE_ARGS+=	--enable-audiofile
else
CONFIGURE_ARGS+=	--disable-audiofile
endif

ifneq (${ADK_PACKAGE_MPD_WITH_SHOUT},)
CONFIGURE_ARGS+=	--enable-shout \
			--enable-lame-encoder \
			--with-lame=${STAGING_DIR}/usr \
			--enable-vorbis-encoder
else
CONFIGURE_ARGS+=	--disable-shout \
			--disable-lame-encoder \
			--disable-vorbis-encoder
endif

ifneq (${ADK_PACKAGE_MPD_WITH_CURL},)
CONFIGURE_ARGS+=	--enable-curl
else
CONFIGURE_ARGS+=	--disable-curl
endif

ifneq (${ADK_PACKAGE_MPD_WITH_MMS},)
CONFIGURE_ARGS+=	--enable-mms
else
CONFIGURE_ARGS+=	--disable-mms
endif

ifneq (${ADK_PACKAGE_MPD_WITH_FFMPEG},)
CONFIGURE_ARGS+=	--enable-ffmpeg
else
CONFIGURE_ARGS+=	--disable-ffmpeg
endif

post-install:
	${INSTALL_DIR} ${IDIR_MPD}/usr/bin ${IDIR_MPD}/etc
	${INSTALL_BIN} ${WRKINST}/usr/bin/mpd ${IDIR_MPD}/usr/bin
	${INSTALL_DATA} ./files/mpd.conf ${IDIR_MPD}/etc/mpd.conf

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