4ad304f71242d65f381beff11facae65d53120eb
[openwrt/svn-archive/archive.git] / sound / mpd / Makefile
1 #
2 # Copyright (C) 2007-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mpd
11 PKG_VERSION:=0.15.8
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/musicpd
16 PKG_MD5SUM:=824e1ce46c0f468865d9e5e403cdaf5d
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/mpd
23 SECTION:=sound
24 CATEGORY:=Sound
25 DEPENDS:=+libflac +libid3tag +libmad +libvorbisidec +libpthread +glib2 \
26 +libmms +libcurl +libsqlite3 +libvorbis +libshout
27 TITLE:=Music Player Daemon
28 URL:=http://www.musicpd.org/
29 endef
30
31 define Package/mpd/description
32 MPD is a music player supporting flac, mp3 and ogg files.
33 It is typically controlled over a network using one of it's many
34 clients including mpc(console), gmpc(gnome), phpmp(php) etc.
35 endef
36
37 define Package/mpd/conffiles
38 /etc/mpd.conf
39 endef
40
41 CONFIGURE_ARGS+= \
42 --disable-audiofile \
43 --disable-mpc \
44 --disable-aac \
45 --disable-lsr \
46 --disable-ao \
47 --disable-mvp \
48 --disable-lametest \
49 --disable-lame-encoder \
50 --enable-flac \
51 --enable-lastfm \
52 --enable-mms \
53 --with-tremor="$(STAGING_DIR)/usr/lib" \
54
55 ifeq ($(CONFIG_PACKAGE_kmod-sound-core),)
56 CONFIGURE_ARGS+= --disable-alsa
57 endif
58
59 TARGET_CFLAGS+=-std=gnu99
60
61 CONFIGURE_VARS += \
62 CURL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lcurl" \
63 CURL_CFLAGS="-I$(STAGING_DIR)/usr/include" \
64 ID3TAG_LIBS="$(TARGET_LDFLAGS) -lz -lid3tag" \
65 ID3TAG_CFLAGS="$(TARGET_CPPFLAGS)" \
66 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
67 FLAC_CFLAGS="-I$(STAGING_DIR)/usr/include/FLAC" \
68 MAD_LIBS="$(TARGET_LDFLAGS) -lmad" \
69 MAD_CFLAGS="$(TARGET_CPPFLAGS)" \
70 OGGVORBIS_LIBS="$(TARGET_LDLFAGS) -lvorbisidec" \
71 OGGVORBIS_CFLAGS="$(TARGET_CPPFLAGS)" \
72 GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \
73 GLIB_LIBS="$(TARGET_LDLFAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib -lintl -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv -lglib-2.0 -lgthread-2.0 -pthread"
74
75 define Package/mpd/install
76 $(INSTALL_DIR) $(1)/etc
77 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
78 $(INSTALL_DIR) $(1)/usr/bin
79 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
80 $(INSTALL_DIR) $(1)/etc/init.d
81 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
82 endef
83
84 $(eval $(call BuildPackage,mpd))