Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=pianod
  9. PKG_VERSION:=174.05
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=https://github.com/thess/pianod-sc/releases/download/$(PKG_VERSION)
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_MD5SUM:=0bae19b0c1e309343bc1b351e521173fe439431542a949dd2bacf4165cce5200
  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 +libmbedtls +libjson-c +libgcrypt +libpthread
  24. TITLE:=Pandora radio daemon
  25. USERID:=pianod=88:pianod=88
  26. URL:=http://deviousfish.com/pianod1/
  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/pianod1/
  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/pianod1/
  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-mbedtls
  50. PIANOD_CLIENT:=pianod-client-compiled-51.tar.gz
  51. define Download/pianod-client
  52. URL:=http://deviousfish.com/Downloads/pianod/
  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))