a36de90f6af5f9fd6ce28bbb9f1d3688f5d30188
[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 # use gcc instead of g++ to avoid unnecessary linking against libstdc++
60 TARGET_CXX=$(TARGET_CC)
61
62 TARGET_CFLAGS+=-std=gnu99
63
64 CONFIGURE_VARS += \
65 CURL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto -lcurl" \
66 CURL_CFLAGS="-I$(STAGING_DIR)/usr/include" \
67 ID3TAG_LIBS="$(TARGET_LDFLAGS) -lz -lid3tag" \
68 ID3TAG_CFLAGS="$(TARGET_CPPFLAGS)" \
69 FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
70 FLAC_CFLAGS="-I$(STAGING_DIR)/usr/include/FLAC" \
71 MAD_LIBS="$(TARGET_LDFLAGS) -lmad" \
72 MAD_CFLAGS="$(TARGET_CPPFLAGS)" \
73 OGGVORBIS_LIBS="$(TARGET_LDLFAGS) -lvorbisidec" \
74 OGGVORBIS_CFLAGS="$(TARGET_CPPFLAGS)" \
75 GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \
76 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"
77
78 define Package/mpd/install
79 $(INSTALL_DIR) $(1)/etc
80 $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
81 $(INSTALL_DIR) $(1)/usr/bin
82 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
83 $(INSTALL_DIR) $(1)/etc/init.d
84 $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
85 endef
86
87 $(eval $(call BuildPackage,mpd))