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