From 4d746eb6e98d70c9495ed242b1211842844b3302 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 21 May 2009 09:08:58 +0000 Subject: [PATCH] [package] add mpdas (#5125) git-svn-id: svn://svn.openwrt.org/openwrt/packages@15956 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- sound/mpdas/Makefile | 48 ++++++++++++++++++++++++++++++++++++ sound/mpdas/files/mpdas.init | 11 +++++++++ sound/mpdas/files/mpdasrc | 5 ++++ 3 files changed, 64 insertions(+) create mode 100644 sound/mpdas/Makefile create mode 100644 sound/mpdas/files/mpdas.init create mode 100644 sound/mpdas/files/mpdasrc diff --git a/sound/mpdas/Makefile b/sound/mpdas/Makefile new file mode 100644 index 000000000..ad21cf2d9 --- /dev/null +++ b/sound/mpdas/Makefile @@ -0,0 +1,48 @@ +# +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mpdas +PKG_VERSION:=0.2.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=http://50hz.ws/mpdas +PKG_MD5SUM:=8a694691dcb5d217c46754e40152186a + +include $(INCLUDE_DIR)/package.mk + +define Package/mpdas + SECTION:=sound + CATEGORY:=Sound + TITLE:=A MPD client which submits your tracks to Last.Fm + DEPENDS:=+libcurl +libmpd +libstdcpp + URL:=http://50hz.ws/mpdas/ +endef + +define Package/mpdas/description + mpdas is an AudioScrobbler client for MPD written in C++. + It supports the latest AudioScrobbler protocol (1.21). + In case of a downtime or connectivity problems, mpdas will + cache the played songs to ~/.mpdascache. +endef + +MAKE_FLAGS += \ + $(TARGET_CONFIGURE_OPTS) \ + $(1) \ + +define Package/mpdas/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) ./files/mpdasrc $(1)/etc/mpdasrc + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/mpdas $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/mpdas.init $(1)/etc/init.d/mpdas +endef + +$(eval $(call BuildPackage,mpdas)) diff --git a/sound/mpdas/files/mpdas.init b/sound/mpdas/files/mpdas.init new file mode 100644 index 000000000..a5706b057 --- /dev/null +++ b/sound/mpdas/files/mpdas.init @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2009 OpenWrt.org +START=94 + +start() { + /usr/bin/mpdas -c /etc/mpdasrc +} + +stop() { + killall mpdas +} diff --git a/sound/mpdas/files/mpdasrc b/sound/mpdas/files/mpdasrc new file mode 100644 index 000000000..34af9a7c6 --- /dev/null +++ b/sound/mpdas/files/mpdasrc @@ -0,0 +1,5 @@ +username = username_here +# create md5 password: +# echo -n password | md5sum +password = md5_hash_here +debug = 0