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.

114 lines
2.9 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. # Copyright (C) 2015 Christian Beier <dontmind@freeshell.org>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=ola
  10. PKG_VERSION:=0.9.7
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/OpenLightingProject/ola.git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_VERSION:=2a306e4f0221fea9f4833ba04b042e72c6f10cd3
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  17. PKG_LICENSE:=LGPL-2.1+
  18. PKG_FIXUP:=libtool
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_USE_MIPS16:=0
  22. HOST_BUILD_DEPENDS:=protobuf/host
  23. PKG_BUILD_DEPENDS:=ola/host
  24. include $(INCLUDE_DIR)/host-build.mk
  25. include $(INCLUDE_DIR)/package.mk
  26. define Package/ola
  27. SECTION:=net
  28. CATEGORY:=Network
  29. TITLE:=Open Lighting Architecture Daemon
  30. URL:=https://www.openlighting.org/
  31. MAINTAINER:=Christian Beier <dontmind@freeshell.org>
  32. DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +sudo
  33. endef
  34. define Package/ola/description
  35. OLA (Open Lighting Architecture) is a framework that allows applications to
  36. send and receive DMX512, using various hardware devices and 'DMX over IP'
  37. protocols. It enables software controllers talk to DMX hardware.
  38. endef
  39. CONFIGURE_ARGS += \
  40. --disable-dependency-tracking \
  41. --disable-static \
  42. --disable-fatal-warnings \
  43. --disable-unittests \
  44. --disable-http \
  45. --with-ola-protoc-plugin=$(HOST_BUILD_DIR)/protoc/ola_protoc_plugin
  46. HOST_CONFIGURE_ARGS += \
  47. --disable-all-plugins \
  48. --disable-slp \
  49. --disable-osc \
  50. --disable-uart \
  51. --disable-libusb \
  52. --disable-libftdi \
  53. --disable-http \
  54. --disable-examples \
  55. --disable-unittests \
  56. --disable-doxygen-html \
  57. --disable-doxygen-doc
  58. # only build the ola_protoc thingy
  59. define Host/Compile
  60. cd $(HOST_BUILD_DIR); \
  61. $(MAKE) protoc/ola_protoc_plugin
  62. endef
  63. # nothing to install for host part
  64. define Host/Install
  65. endef
  66. define Build/InstallDev
  67. $(INSTALL_DIR) $(1)/usr/include
  68. $(CP) $(PKG_INSTALL_DIR)/usr/include/ola $(1)/usr/include/
  69. $(CP) $(PKG_INSTALL_DIR)/usr/include/olad $(1)/usr/include/
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  72. endef
  73. define Package/ola/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  78. $(INSTALL_DIR) $(1)/etc/init.d
  79. $(INSTALL_BIN) ./files/olad.init $(1)/etc/init.d/olad
  80. $(INSTALL_DIR) $(1)/usr/share/ola/pids
  81. $(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
  82. endef
  83. define Package/ola/postinst
  84. #!/bin/sh
  85. # make sure the conf dir exists and is writeable by the group olad uses
  86. mkdir -p $${IPKG_INSTROOT}/etc/ola
  87. chgrp nogroup $${IPKG_INSTROOT}/etc/ola
  88. chmod 775 $${IPKG_INSTROOT}/etc/ola
  89. endef
  90. $(eval $(call HostBuild))
  91. $(eval $(call BuildPackage,ola))