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.

128 lines
3.2 KiB

  1. #
  2. # Copyright (C) 2006-2011 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.3
  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:=d949ab88ab2c12d4d94b50a0a0df633d634f08fd
  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. PKG_BUILD_DEPENDS:=protobuf/host ola/host
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/ola
  25. SECTION:=net
  26. CATEGORY:=Network
  27. TITLE:=Open Lighting Architecture Daemon
  28. URL:=https://www.openlighting.org/
  29. MAINTAINER:=Christian Beier <dontmind@freeshell.org>
  30. DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +sudo @BROKEN
  31. endef
  32. define Package/ola/description
  33. OLA (Open Lighting Architecture) is a framework that allows applications to
  34. send and receive DMX512, using various hardware devices and 'DMX over IP'
  35. protocols. It enables software controllers talk to DMX hardware.
  36. endef
  37. include $(INCLUDE_DIR)/host-build.mk
  38. # When building the host part, disable as much as possible to speed up
  39. # the configure step and avoid missing host dependencies.
  40. # Stolen from http://git.buildroot.net/buildroot/commit/?id=66056a5179ef49f2ec10ba5d7fbd1a58863d1350
  41. define Host/Configure
  42. $(call Host/Configure/Default,\
  43. --disable-all-plugins \
  44. --disable-slp \
  45. --disable-osc \
  46. --disable-uart \
  47. --disable-libusb \
  48. --disable-libftdi \
  49. --disable-http \
  50. --disable-examples \
  51. --disable-unittests \
  52. --disable-doxygen-html \
  53. --disable-doxygen-doc)
  54. endef
  55. # only build the ola_protoc thingy
  56. define Host/Compile
  57. cd $(HOST_BUILD_DIR); \
  58. $(MAKE) protoc/ola_protoc
  59. endef
  60. # only need ola_protoc
  61. define Host/Install
  62. $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
  63. $(CP) $(HOST_BUILD_DIR)/protoc/ola_protoc $(STAGING_DIR_HOST)/bin/
  64. endef
  65. $(eval $(call HostBuild))
  66. define Build/Configure
  67. $(call Build/Configure/Default,\
  68. --disable-dependency-tracking \
  69. --disable-static \
  70. --disable-fatal-warnings \
  71. --disable-unittests \
  72. --disable-http \
  73. --with-ola-protoc=$(STAGING_DIR_HOST)/bin/ola_protoc)
  74. endef
  75. define Build/InstallDev
  76. mkdir -p $(1)/usr/include
  77. $(CP) $(PKG_INSTALL_DIR)/usr/include/ola $(1)/usr/include/
  78. mkdir -p $(1)/usr/include
  79. $(CP) $(PKG_INSTALL_DIR)/usr/include/olad $(1)/usr/include/
  80. mkdir -p $(1)/usr/lib
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  82. endef
  83. define Package/ola/install
  84. $(INSTALL_DIR) $(1)/usr/bin
  85. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  86. $(INSTALL_DIR) $(1)/usr/lib
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  88. $(INSTALL_DIR) $(1)/etc/init.d
  89. $(INSTALL_BIN) ./files/olad.init $(1)/etc/init.d/olad
  90. $(INSTALL_DIR) $(1)/usr/share/ola/pids
  91. $(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
  92. endef
  93. define Package/ola/postinst
  94. #!/bin/sh
  95. # make sure the conf dir exists and is writeable by the group olad uses
  96. mkdir -p /etc/ola
  97. chgrp nogroup /etc/ola
  98. chmod 775 $(1)/etc/ola
  99. exit 0
  100. endef
  101. $(eval $(call BuildPackage,ola))