[package] add dmapd (#6299)
authorFlorian Fainelli <florian@openwrt.org>
Mon, 7 Dec 2009 16:48:21 +0000 (16:48 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 7 Dec 2009 16:48:21 +0000 (16:48 +0000)
SVN-Revision: 18677

net/dmapd/Makefile [new file with mode: 0644]
net/dmapd/files/dmapd.init [new file with mode: 0644]

diff --git a/net/dmapd/Makefile b/net/dmapd/Makefile
new file mode 100644 (file)
index 0000000..9879fc6
--- /dev/null
@@ -0,0 +1,52 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dmapd
+PKG_VERSION:=0.0.18
+PKG_RELEASE:=1
+PKG_SOURCE:=dmapd-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd/
+PKG_MD5SUM:=df89e6d4bd9ad8c0697fc5a44435a345
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/dmapd-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dmapd
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=+libdmapsharing +gstreamer
+  TITLE:= dmapd
+  URL:=http://www.flyn.org/projects/dmapd/
+endef
+
+define Package/dmapd/decription
+       Dmapd is a DMAP server
+endef
+
+define Build/Configure
+       $(call Build/Configure/Default)
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
+endef
+
+define Package/dmapd/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/dmapd.init $(1)/etc/init.d/dmapd
+       $(INSTALL_DIR) $(1)/usr/lib/dmapd/$(PKG_VERSION)/modules/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/sbin/dmapd \
+               $(1)/usr/sbin/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libdmapd.so* \
+               $(1)/usr/lib/
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/dmapd/$(PKG_VERSION)/modules/*.so \
+               $(1)/usr/lib/dmapd/$(PKG_VERSION)/modules
+endef
+
+$(eval $(call BuildPackage,dmapd))
diff --git a/net/dmapd/files/dmapd.init b/net/dmapd/files/dmapd.init
new file mode 100644 (file)
index 0000000..dd24886
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2009 OpenWrt.org
+
+START=60
+
+start() {
+       mkdir -p /var/cache/dmapd/
+       mkdir -p /var/run/dmapd/
+       mkdir -p /var/lock/subsys/
+       
+       DMAPD_PHOTO_MODULE=null /usr/sbin/dmapd -m /var/db/BigDisk/Storage/Music/
+}
+
+stop() {
+       killall dmapd 2> /dev/null
+}