Browse Source

Copy dmapd package from old repository

Signed-off-by: W. Michael Petullo <mike@flyn.org>
W. Michael Petullo 10 years ago
parent
commit
72b33701ae
3 changed files with 102 additions and 0 deletions
  1. 61
    0
      net/dmapd/Makefile
  2. 30
    0
      net/dmapd/files/dmapd.init
  3. 11
    0
      net/dmapd/patches/001-dmapd_conf.patch

+ 61
- 0
net/dmapd/Makefile View File

@@ -0,0 +1,61 @@
1
+#
2
+# Copyright (C) 2009-2012 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:=dmapd
11
+PKG_VERSION:=0.0.50
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd
16
+PKG_MD5SUM:=2e04d7fb8437f9e7bd370dc3af450aae
17
+
18
+PKG_FIXUP:=autoreconf
19
+PKG_INSTALL:=2
20
+
21
+include $(INCLUDE_DIR)/package.mk
22
+include $(INCLUDE_DIR)/nls.mk
23
+
24
+define Package/dmapd
25
+  SECTION:=net
26
+  CATEGORY:=Network
27
+  DEPENDS:=+libdmapsharing +libdb47 +vips +GraphicsMagick
28
+  TITLE:= dmapd
29
+  URL:=http://www.flyn.org/projects/dmapd/
30
+  MAINTAINER:=W. Michael Petullo <mike@flyn.org>
31
+endef
32
+
33
+define Package/dmapd/decription
34
+	Dmapd is a DMAP server
35
+endef
36
+
37
+define Package/dmapd/conffiles
38
+/etc/dmapd.conf
39
+endef
40
+
41
+TARGET_LDFLAGS+=\
42
+	-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
43
+
44
+define Package/dmapd/install
45
+	$(INSTALL_DIR) $(1)/usr/sbin
46
+	$(INSTALL_DIR) $(1)/etc/init.d
47
+	$(INSTALL_CONF) $(PKG_BUILD_DIR)/distro/dmapd.conf $(1)/etc/
48
+	$(INSTALL_BIN) ./files/dmapd.init $(1)/etc/init.d/dmapd
49
+	$(INSTALL_DIR) $(1)/usr/lib/dmapd/$(PKG_VERSION)/modules
50
+	$(CP) \
51
+		$(PKG_INSTALL_DIR)/usr/sbin/dmapd \
52
+		$(1)/usr/sbin/
53
+	$(CP) \
54
+		$(PKG_INSTALL_DIR)/usr/lib/libdmapd.so* \
55
+		$(1)/usr/lib/
56
+	$(CP) \
57
+		$(PKG_INSTALL_DIR)/usr/lib/dmapd/$(PKG_VERSION)/modules/*.so \
58
+		$(1)/usr/lib/dmapd/$(PKG_VERSION)/modules/
59
+endef
60
+
61
+$(eval $(call BuildPackage,dmapd))

+ 30
- 0
net/dmapd/files/dmapd.init View File

@@ -0,0 +1,30 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2009-2012 OpenWrt.org
3
+
4
+START=60
5
+
6
+start() {
7
+	user_exists dmapd 56 || user_add dmapd 56
8
+	group_exists dmapd 56 || group_add dmapd 56
9
+	[ -d /var/run/dmapd ] || {
10
+		mkdir -m 0755 -p /var/run/dmapd
11
+		chown dmapd:dmapd /var/run/dmapd
12
+	}
13
+	[ -d /var/db/dmapd/DAAP ] || {
14
+		mkdir -m 0755 -p /var/db/dmapd/DAAP
15
+		chown dmapd:dmapd /var/db/dmapd/DAAP
16
+	}
17
+	[ -d /var/db/dmapd/DPAP ] || {
18
+		mkdir -m 0755 -p /var/db/dmapd/DPAP
19
+		chown dmapd:dmapd /var/db/dmapd/DPAP
20
+	}
21
+	mkdir -m 0755 -p /var/lock/subsys
22
+	mkdir -m 0755 -p /var/media/music
23
+	mkdir -m 0755 -p /var/media/pictures
24
+
25
+	service_start /usr/sbin/dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k
26
+}
27
+
28
+stop() {
29
+	service_stop /usr/sbin/dmapd
30
+}

+ 11
- 0
net/dmapd/patches/001-dmapd_conf.patch View File

@@ -0,0 +1,11 @@
1
+--- a/distro/dmapd.conf
2
++++ b/distro/dmapd.conf
3
+@@ -3,7 +3,7 @@
4
+ Database-Dir=/var/db/dmapd
5
+ 
6
+ # Name that will be used to identify share:
7
+-Share-Name=dmapd
8
++Share-Name=OpenWrt
9
+ 
10
+ # User that dmapd will run as, current user if undefined:
11
+ User=dmapd