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.

125 lines
3.3 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. # Copyright (C) 2015-2017 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.10.7
  11. PKG_RELEASE:=5
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
  14. PKG_HASH:=95b5e99775f700a9cdf6e2219eccfc8c037fa8841f87cb00344359c4b8c7bf26
  15. PKG_MAINTAINER:=Christian Beier <dontmind@freeshell.org>
  16. PKG_LICENSE:=LGPL-2.1-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  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. DEPENDS:=+protobuf +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
  32. endef
  33. define Package/ola/description
  34. OLA (Open Lighting Architecture) is a framework that allows applications to
  35. send and receive DMX512, using various hardware devices and 'DMX over IP'
  36. protocols. It enables software controllers talk to DMX hardware.
  37. endef
  38. CONFIGURE_ARGS += \
  39. --disable-dependency-tracking \
  40. --disable-static \
  41. --disable-fatal-warnings \
  42. --disable-unittests \
  43. --without-dns-sd \
  44. --with-ola-protoc-plugin="$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin"
  45. HOST_CONFIGURE_ARGS += \
  46. --disable-all-plugins \
  47. --disable-slp \
  48. --disable-osc \
  49. --disable-uart \
  50. --disable-libusb \
  51. --disable-http \
  52. --disable-examples \
  53. --disable-unittests \
  54. --disable-doxygen-html \
  55. --disable-doxygen-doc
  56. HOST_CPPFLAGS += \
  57. -std=gnu++11
  58. CONFIGURE_VARS += \
  59. require_gnu_plus_plus_11=yes
  60. HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
  61. TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lm)
  62. # only build the ola_protoc thingy
  63. define Host/Compile
  64. cd $(HOST_BUILD_DIR); \
  65. $(MAKE) protoc/ola_protoc_plugin
  66. endef
  67. define Host/Install
  68. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  69. $(CP) $(HOST_BUILD_DIR)/protoc/ola_protoc_plugin $(STAGING_DIR_HOSTPKG)/bin
  70. endef
  71. define Build/InstallDev
  72. $(INSTALL_DIR) $(1)/usr/include
  73. $(CP) $(PKG_INSTALL_DIR)/usr/include/ola $(1)/usr/include/
  74. $(CP) $(PKG_INSTALL_DIR)/usr/include/olad $(1)/usr/include/
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  77. endef
  78. define Package/ola/install
  79. $(INSTALL_DIR) $(1)/usr/bin
  80. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  81. $(INSTALL_DIR) $(1)/usr/lib
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  83. $(INSTALL_DIR) $(1)/etc/init.d
  84. $(INSTALL_BIN) ./files/olad.init $(1)/etc/init.d/olad
  85. $(INSTALL_DIR) $(1)/usr/share/ola/pids
  86. $(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
  87. $(INSTALL_DIR) $(1)/usr/share/olad/www
  88. $(CP) $(PKG_INSTALL_DIR)/usr/share/olad/www/* $(1)/usr/share/olad/www
  89. endef
  90. define Package/ola/postinst
  91. #!/bin/sh
  92. # make sure the conf dir exists and is writeable by the group olad uses
  93. mkdir -p $${IPKG_INSTROOT}/etc/ola
  94. chgrp nogroup $${IPKG_INSTROOT}/etc/ola
  95. chmod 775 $${IPKG_INSTROOT}/etc/ola
  96. endef
  97. $(eval $(call HostBuild))
  98. $(eval $(call BuildPackage,ola))