source: packages/sound/mpd/Makefile @ 21098

Last change on this file since 21098 was 21098, checked in by nico, 7 years ago

[packages] mpd: ship avahi files added in [21054], make dependency on alsa-lib conditional, more cleanup

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=mpd
11PKG_VERSION:=0.15.8
12PKG_RELEASE:=3
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@SF/musicpd
16PKG_MD5SUM:=824e1ce46c0f468865d9e5e403cdaf5d
17
18PKG_INSTALL:=1
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/mpd
23  SECTION:=sound
24  CATEGORY:=Sound
25  TITLE:=Music Player Daemon
26  URL:=http://www.musicpd.org/
27# libvorbis and therewith libogg are needed for shout support
28  DEPENDS:= \
29        +AUDIO_SUPPORT:alsa-lib \
30        +BUILD_PATENTED:libfaad2 +BUILD_PATENTED:libmad \
31        +glib2 +libcurl +libflac +libmms +libpthread +libshout \
32        +libvorbis +libvorbisidec
33endef
34
35define Package/mpd/description
36 MPD is a music player supporting flac, mp3 and ogg files. It is
37 typically controlled over a network using one of it's many clients
38 including mpc(console), gmpc(gnome), phpmp(php), etc...
39endef
40
41define Package/mpd/conffiles
42/etc/avahi/services/mpd.service
43/etc/mpd.conf
44endef
45
46# oggflac is not compatible with tremor
47CONFIGURE_ARGS += \
48        $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \
49        $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \
50        --enable-audiofile \
51        --disable-mpc \
52        $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \
53        --disable-lsr \
54        --disable-ao \
55        --disable-mvp \
56        --disable-lame-encoder \
57        --disable-ffmpeg \
58        --enable-flac \
59        --enable-vorbis \
60        --disable-oggflac \
61        --disable-cue \
62        --disable-jack \
63        --disable-modplug \
64        --disable-pulse \
65        --disable-sidplay \
66        --disable-sqlite \
67        --enable-shout \
68        --enable-id3 \
69        --enable-lastfm \
70        --enable-mms \
71        --enable-curl \
72        --disable-oss \
73        --enable-aac \
74        --with-zeroconf=no \
75        --disable-libOggFLACtest \
76        --disable-test \
77        --with-tremor=yes \
78        --with-faad="$(STAGING_DIR)/usr" \
79
80CONFIGURE_VARS += \
81        FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \
82        FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \
83        $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \
84        $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \
85
86TARGET_CFLAGS += \
87        -std=gnu99 \
88        -I$(STAGING_DIR)/usr/lib/libintl/include/ \
89        -I$(STAGING_DIR)/usr/lib/libiconv/include/ \
90
91TARGET_LDFLAGS += \
92        -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
93        -L$(STAGING_DIR)/usr/lib/libintl/lib/ \
94        -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \
95
96# use gcc instead of g++ to avoid unnecessary linking against libstdc++
97TARGET_CXX:=$(TARGET_CC)
98
99define Package/mpd/install
100        $(INSTALL_DIR) $(1)/etc
101        $(CP) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf
102        $(INSTALL_DIR) $(1)/usr/bin
103        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/
104        $(INSTALL_DIR) $(1)/etc/init.d
105        $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd
106        $(INSTALL_DIR) $(1)/etc/avahi/services
107        $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/
108endef
109
110$(eval $(call BuildPackage,mpd))
Note: See TracBrowser for help on using the repository browser.