diff options
author | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
---|---|---|
committer | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
commit | 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch) | |
tree | b9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/mpd |
Initial import
Diffstat (limited to 'package/mpd')
-rw-r--r-- | package/mpd/Config.in | 96 | ||||
-rw-r--r-- | package/mpd/Makefile | 94 | ||||
-rw-r--r-- | package/mpd/files/mpd.conf | 18 | ||||
-rw-r--r-- | package/mpd/files/mpd.init | 26 | ||||
-rw-r--r-- | package/mpd/ipkg/mpd.conffiles | 1 | ||||
-rw-r--r-- | package/mpd/ipkg/mpd.control | 5 | ||||
-rw-r--r-- | package/mpd/ipkg/mpd.postinst | 6 |
7 files changed, 246 insertions, 0 deletions
diff --git a/package/mpd/Config.in b/package/mpd/Config.in new file mode 100644 index 000000000..a2fc42afa --- /dev/null +++ b/package/mpd/Config.in @@ -0,0 +1,96 @@ +#menu "mpd............................... Music Player Daemon" + +config ADK_PACKAGE_MPD + prompt "mpd............................... Music Player Daemon" + tristate + default n + select ADK_PACKAGE_ALSA_LIB + select ADK_PACKAGE_GLIB2 + select ADK_PACKAGE_LIBCURL + help + MPD is a music player supporting flac, mp3 and ogg files. + It is typically controlled over a network using one of it's many + clients including mpc(console), gmpc(gnome), phpmp(php) etc. + + http://www.musicpd.org/ + +config ADK_COMPILE_MPD_WITH_MP3 + prompt " MP3 support" + bool + default y + depends ADK_PACKAGE_MPD + select ADK_PACKAGE_LIBMAD + select ADK_PACKAGE_LIBID3TAG + help + Enable mp3 support (libmad). + +config ADK_COMPILE_MPD_WITH_MP4 + prompt " MP4/AAC support" + bool + default y + depends ADK_PACKAGE_MPD + select ADK_PACKAGE_LIBFAAD2 + help + Enable mp4/aac support (libfaad2). + +config ADK_COMPILE_MPD_OGG + prompt " Ogg/Vorbis Support" + tristate + depends ADK_PACKAGE_MPD + select ADK_COMPILE_MPD_WITH_OGG if ADK_COMPILE_MPD_OGG_FLOAT + select ADK_COMPILE_MPD_WITH_TREMOR if ADK_COMPILE_MPD_OGG_FIXED + default y + help + Ogg/Vorbis support. + +choice +prompt "Ogg type" +depends on ADK_COMPILE_MPD_OGG +config ADK_COMPILE_MPD_OGG_FLOAT + bool "Ogg/Vorbis (floating point implementation)" +config ADK_COMPILE_MPD_OGG_FIXED + bool "Ogg/Vorbis (fixed point implementation)" +endchoice + +config ADK_COMPILE_MPD_WITH_OGG + bool + default n + depends ADK_PACKAGE_MPD + depends ADK_COMPILE_MPD_OGG_FLOAT + select ADK_PACKAGE_LIBOGG + select ADK_PACKAGE_LIBVORBIS + help + Enable ogg vorbis support. + +config ADK_COMPILE_MPD_WITH_TREMOR + bool + default n + depends ADK_PACKAGE_MPD + depends ADK_COMPILE_MPD_OGG_FIXED + select ADK_PACKAGE_LIBVORBISIDEC + help + Enable ogg support (tremor). + Can not be used with shout plugin. + +config ADK_COMPILE_MPD_WITH_FLAC + prompt " FLAC Support" + bool + default y + depends ADK_PACKAGE_MPD + select ADK_PACKAGE_LIBFLAC + help + Enable flac support (libflac). + +config ADK_COMPILE_MPD_WITH_SHOUT + prompt " Shout Support (Streaming support)" + bool + default y + depends ADK_PACKAGE_MPD + depends ADK_COMPILE_MPD_WITH_OGG + select ADK_PACKAGE_LIBSHOUT + select ADK_PACKAGE_LIBVORBISENC + select ADK_PACKAGE_LIBLAME + help + Enable shout support (libshout). + +#endmenu diff --git a/package/mpd/Makefile b/package/mpd/Makefile new file mode 100644 index 000000000..cc4a6d02e --- /dev/null +++ b/package/mpd/Makefile @@ -0,0 +1,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},${ARCH})) + +CONFIGURE_STYLE:= gnu +BUILD_STYLE:= auto +INSTALL_STYLE:= auto +XAKE_FLAGS+= MPD_CFLAGS='' +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 diff --git a/package/mpd/files/mpd.conf b/package/mpd/files/mpd.conf new file mode 100644 index 000000000..4e3725119 --- /dev/null +++ b/package/mpd/files/mpd.conf @@ -0,0 +1,18 @@ +# An example configuration file for MPD +user "mpd" +music_directory "~/music" +playlist_directory "~/.mpd/playlists" +db_file "~/.mpd/database" +log_file "~/.mpd/log" +error_file "~/.mpd/error-log" +# An example of an ALSA output +audio_output { + type "alsa" + name "My ALSA Device" + device "hw:0,0" # optional + format "44100:16:2" # optional +} +# Volume control mixer +mixer_type "alsa" +mixer_device "default" +mixer_control "PCM" diff --git a/package/mpd/files/mpd.init b/package/mpd/files/mpd.init new file mode 100644 index 000000000..b07a189a1 --- /dev/null +++ b/package/mpd/files/mpd.init @@ -0,0 +1,26 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${mpd:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + mpd + ;; +stop) + mpd --kill + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/mpd/ipkg/mpd.conffiles b/package/mpd/ipkg/mpd.conffiles new file mode 100644 index 000000000..a8d69760e --- /dev/null +++ b/package/mpd/ipkg/mpd.conffiles @@ -0,0 +1 @@ +/etc/mpd.conf diff --git a/package/mpd/ipkg/mpd.control b/package/mpd/ipkg/mpd.control new file mode 100644 index 000000000..946f3d022 --- /dev/null +++ b/package/mpd/ipkg/mpd.control @@ -0,0 +1,5 @@ +Package: mpd +Priority: optional +Section: net +Depends: alsa-lib +Description: A music player for flac, mp3 and ogg. diff --git a/package/mpd/ipkg/mpd.postinst b/package/mpd/ipkg/mpd.postinst new file mode 100644 index 000000000..361adeec0 --- /dev/null +++ b/package/mpd/ipkg/mpd.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +gid=$(get_next_gid) +add_group mpd $gid +add_user mpd $(get_next_uid) $gid /mnt +add_rcconf mpd |