You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=pianod
  9. PKG_VERSION:=174
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://deviousfish.com/Downloads/pianod/
  13. PKG_MD5SUM:=cca2143e4a5301dea8c0cb9fcbd20881
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_LICENSE:=MIT VARIOUS
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/pianod
  21. SECTION:=sound
  22. CATEGORY:=Sound
  23. DEPENDS:=+libao +libfaad2 +libmad +libpolarssl +libjson-c +libgcrypt +libpthread
  24. TITLE:=Pandora radio daemon
  25. USERID:=pianod=88:pianod=88
  26. URL:=http://deviousfish.com/pianod/
  27. endef
  28. define Package/pianod/description
  29. pianod is a Pandora music player client with line-oriented and Websocket control interfaces.
  30. A simple protocol makes for easy clients, mix scripting, integration with a
  31. home automation system, use as multiple-user music system for home or office.
  32. Documentation and configuration information can be found at:
  33. http://deviousfish.com/pianod/
  34. endef
  35. define Package/pianod-client
  36. SECTION:=sound
  37. CATEGORY:=Sound
  38. DEPENDS:=+pianod
  39. TITLE:=Pandora radio daemon WebUI
  40. URL:=http://deviousfish.com/pianod/
  41. endef
  42. define Package/pianod-client/description
  43. Web client UI and remote player viewer for pianod
  44. Examples --- (Note: The viewer.* files need not be on the pianod host)
  45. Main interface: http://pianod-host:4446/pianod
  46. Remote viewer: file:///<path>/viewer.html?server=pianod-host:4446 --or--
  47. http://pianod-host:4446/pianod/viewer.html?server=pianod-host:4446
  48. endef
  49. CONFIGURE_ARGS+= --with-polarssl
  50. PIANOD_CLIENT:=pianod-client-compiled-51.tar.gz
  51. define Download/pianod-client
  52. URL:=$(PKG_SOURCE_URL)
  53. FILE:=$(PIANOD_CLIENT)
  54. MD5SUM:=abbdee5627bcee6a00c8304da8b4e2e7
  55. endef
  56. define Package/pianod/conffiles
  57. /etc/pianod/startscript
  58. /etc/pianod/users
  59. endef
  60. define Build/Prepare
  61. $(call Build/Prepare/Default)
  62. ifneq ($(CONFIG_PACKAGE_pianod-client),)
  63. $(eval $(call Download,pianod-client))
  64. mkdir -p $(PKG_BUILD_DIR)/pianod-client
  65. $(TAR) -xf $(DL_DIR)/$(PIANOD_CLIENT) --strip=1 -C $(PKG_BUILD_DIR)/pianod-client
  66. endif
  67. endef
  68. define Package/pianod-client/Configure
  69. endef
  70. define Package/pianod-client/Compile
  71. endef
  72. define Package/pianod/install
  73. $(INSTALL_DIR) $(1)/usr/bin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pianod $(1)/usr/bin/
  75. # These scripts need ksh (install mksh and link)
  76. # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/piano $(1)/usr/bin/
  77. # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/runmix $(1)/usr/bin/
  78. $(INSTALL_DIR) $(1)/etc/pianod
  79. $(INSTALL_DATA) $(PKG_BUILD_DIR)/contrib/startscript-example $(1)/etc/pianod/startscript
  80. $(INSTALL_DIR) $(1)/etc/init.d
  81. $(INSTALL_BIN) ./files/pianod.init $(1)/etc/init.d/pianod
  82. endef
  83. define Package/pianod-client/install
  84. $(INSTALL_DIR) $(1)/www/pianod
  85. $(INSTALL_DATA) $(PKG_BUILD_DIR)/pianod-client/*.{html,js,gif,jpeg,css} $(1)/www/pianod/
  86. endef
  87. $(eval $(call BuildPackage,pianod))
  88. $(eval $(call BuildPackage,pianod-client))