Fresh pull from upstream (stable) package feed
[librecmc/package-feed.git] / sound / pianod / Makefile
1 #
2 # Copyright (C) 2015-2017 Ted Hess <thess@kitschensync.net>
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:=pianod
11 PKG_VERSION:=174.05
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=https://github.com/thess/pianod-sc/releases/download/$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_MD5SUM:=0bae19b0c1e309343bc1b351e521173fe439431542a949dd2bacf4165cce5200
17
18 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
19
20 PKG_LICENSE:=MIT VARIOUS
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/pianod
29   SECTION:=sound
30   CATEGORY:=Sound
31   DEPENDS:=+libao +libfaad2 +libmad +libmbedtls +libjson-c +libgcrypt +libpthread
32   TITLE:=Pandora radio daemon
33   USERID:=pianod=88:pianod=88
34   URL:=http://deviousfish.com/pianod1/
35 endef
36
37 define Package/pianod/description
38   pianod is a Pandora music player client with line-oriented and Websocket control interfaces.
39   A simple protocol makes for easy clients, mix scripting, integration with a
40   home automation system, use as multiple-user music system for home or office.
41   Documentation and configuration information can be found at:
42       http://deviousfish.com/pianod1/
43 endef
44
45 define Package/pianod-client
46   SECTION:=sound
47   CATEGORY:=Sound
48   DEPENDS:=+pianod
49   TITLE:=Pandora radio daemon WebUI
50   URL:=http://deviousfish.com/pianod1/
51 endef
52
53 define Package/pianod-client/description
54   Web client UI and remote player viewer for pianod
55   Examples --- (Note: The viewer.* files need not be on the pianod host)
56   Main interface: http://pianod-host:4446/pianod
57   Remote viewer: file:///<path>/viewer.html?server=pianod-host:4446  --or--
58                  http://pianod-host:4446/pianod/viewer.html?server=pianod-host:4446
59 endef
60
61 CONFIGURE_ARGS+= --with-mbedtls
62
63 PIANOD_CLIENT:=pianod-client-compiled-51.tar.gz
64
65 define Download/pianod-client
66   URL:=http://deviousfish.com/Downloads/pianod/
67   FILE:=$(PIANOD_CLIENT)
68   MD5SUM:=abbdee5627bcee6a00c8304da8b4e2e7
69 endef
70
71 define Package/pianod/conffiles
72 /etc/pianod/startscript
73 /etc/pianod/users
74 endef
75
76 define Build/Prepare
77     $(call Build/Prepare/Default)
78     ifneq ($(CONFIG_PACKAGE_pianod-client),)
79         $(eval $(call Download,pianod-client))
80         mkdir -p $(PKG_BUILD_DIR)/pianod-client
81         $(TAR) -xf $(DL_DIR)/$(PIANOD_CLIENT) --strip=1 -C $(PKG_BUILD_DIR)/pianod-client
82     endif
83 endef
84
85 define Package/pianod-client/Configure
86 endef
87
88 define Package/pianod-client/Compile
89 endef
90
91 define Package/pianod/install
92         $(INSTALL_DIR) $(1)/usr/bin
93         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pianod $(1)/usr/bin/
94 # These scripts need ksh (install mksh and link)
95 #       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/piano $(1)/usr/bin/
96 #       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/runmix $(1)/usr/bin/
97
98         $(INSTALL_DIR) $(1)/etc/pianod
99         $(INSTALL_DATA) $(PKG_BUILD_DIR)/contrib/startscript-example $(1)/etc/pianod/startscript
100         $(INSTALL_DIR) $(1)/etc/init.d
101         $(INSTALL_BIN) ./files/pianod.init $(1)/etc/init.d/pianod
102 endef
103
104 define Package/pianod-client/install
105         $(INSTALL_DIR) $(1)/www/pianod
106         $(INSTALL_DATA) $(PKG_BUILD_DIR)/pianod-client/*.{html,js,gif,jpeg,css} $(1)/www/pianod/
107 endef
108
109 $(eval $(call BuildPackage,pianod))
110 $(eval $(call BuildPackage,pianod-client))