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