Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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.10.1
  11. PKG_RELEASE:=2
  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:=5b86f5802e2e5b23c6a010dc8d10788e6dc57614
  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 +liblo +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. --without-dns-sd \
  46. --with-ola-protoc-plugin=$(HOST_BUILD_DIR)/protoc/ola_protoc_plugin
  47. HOST_CONFIGURE_ARGS += \
  48. --disable-all-plugins \
  49. --disable-slp \
  50. --disable-osc \
  51. --disable-uart \
  52. --disable-libusb \
  53. --disable-libftdi \
  54. --disable-http \
  55. --disable-examples \
  56. --disable-unittests \
  57. --disable-doxygen-html \
  58. --disable-doxygen-doc
  59. # only build the ola_protoc thingy
  60. define Host/Compile
  61. cd $(HOST_BUILD_DIR); \
  62. $(MAKE) protoc/ola_protoc_plugin
  63. endef
  64. # nothing to install for host part
  65. define Host/Install
  66. endef
  67. define Build/InstallDev
  68. $(INSTALL_DIR) $(1)/usr/include
  69. $(CP) $(PKG_INSTALL_DIR)/usr/include/ola $(1)/usr/include/
  70. $(CP) $(PKG_INSTALL_DIR)/usr/include/olad $(1)/usr/include/
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  73. endef
  74. define Package/ola/install
  75. $(INSTALL_DIR) $(1)/usr/bin
  76. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  79. $(INSTALL_DIR) $(1)/etc/init.d
  80. $(INSTALL_BIN) ./files/olad.init $(1)/etc/init.d/olad
  81. $(INSTALL_DIR) $(1)/usr/share/ola/pids
  82. $(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
  83. endef
  84. define Package/ola/postinst
  85. #!/bin/sh
  86. # make sure the conf dir exists and is writeable by the group olad uses
  87. mkdir -p $${IPKG_INSTROOT}/etc/ola
  88. chgrp nogroup $${IPKG_INSTROOT}/etc/ola
  89. chmod 775 $${IPKG_INSTROOT}/etc/ola
  90. endef
  91. $(eval $(call HostBuild))
  92. $(eval $(call BuildPackage,ola))