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.

116 lines
3.0 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:=3
  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_LICENSE:=LGPL-2.1+
  16. PKG_FIXUP:=libtool
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_USE_MIPS16:=0
  20. HOST_BUILD_DEPENDS:=protobuf/host
  21. PKG_BUILD_DEPENDS:=ola/host
  22. include $(INCLUDE_DIR)/host-build.mk
  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 +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
  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. CONFIGURE_ARGS += \
  38. --disable-dependency-tracking \
  39. --disable-static \
  40. --disable-fatal-warnings \
  41. --disable-unittests \
  42. --without-dns-sd \
  43. --with-ola-protoc-plugin=$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin
  44. HOST_CONFIGURE_ARGS += \
  45. --disable-all-plugins \
  46. --disable-slp \
  47. --disable-osc \
  48. --disable-uart \
  49. --disable-libusb \
  50. --disable-http \
  51. --disable-examples \
  52. --disable-unittests \
  53. --disable-doxygen-html \
  54. --disable-doxygen-doc
  55. # only build the ola_protoc thingy
  56. define Host/Compile
  57. cd $(HOST_BUILD_DIR); \
  58. $(MAKE) protoc/ola_protoc_plugin
  59. endef
  60. define Host/Install
  61. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  62. $(CP) $(HOST_BUILD_DIR)/protoc/ola_protoc_plugin $(STAGING_DIR_HOSTPKG)/bin
  63. endef
  64. define Build/InstallDev
  65. $(INSTALL_DIR) $(1)/usr/include
  66. $(CP) $(PKG_INSTALL_DIR)/usr/include/ola $(1)/usr/include/
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/olad $(1)/usr/include/
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  70. endef
  71. define Package/ola/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  76. $(INSTALL_DIR) $(1)/etc/init.d
  77. $(INSTALL_BIN) ./files/olad.init $(1)/etc/init.d/olad
  78. $(INSTALL_DIR) $(1)/usr/share/ola/pids
  79. $(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
  80. $(INSTALL_DIR) $(1)/usr/share/olad/www
  81. $(CP) $(PKG_INSTALL_DIR)/usr/share/olad/www/* $(1)/usr/share/olad/www
  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))