Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / net / ola / Makefile
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
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ola
12 PKG_VERSION:=0.10.7
13 PKG_RELEASE:=6
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://codeload.github.com/OpenLightingProject/ola/tar.gz/$(PKG_VERSION)?
17 PKG_HASH:=95b5e99775f700a9cdf6e2219eccfc8c037fa8841f87cb00344359c4b8c7bf26
18
19 PKG_MAINTAINER:=Christian Beier <dontmind@freeshell.org>
20 PKG_LICENSE:=LGPL-2.1-or-later
21 PKG_LICENSE_FILES:=COPYING
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
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 DEPENDS:=+protobuf +libftdi1 +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +libmicrohttpd
40 endef
41
42 define Package/ola/description
43 OLA (Open Lighting Architecture) is a framework that allows applications to
44 send and receive DMX512, using various hardware devices and 'DMX over IP'
45 protocols. It enables software controllers talk to DMX hardware.
46 endef
47
48 CONFIGURE_ARGS += \
49 --disable-dependency-tracking \
50 --disable-static \
51 --disable-fatal-warnings \
52 --disable-unittests \
53 --without-dns-sd \
54 --with-ola-protoc-plugin="$(STAGING_DIR_HOSTPKG)/bin/ola_protoc_plugin"
55
56 HOST_CONFIGURE_ARGS += \
57 --disable-all-plugins \
58 --disable-osc \
59 --disable-uart \
60 --disable-libusb \
61 --disable-http \
62 --disable-examples \
63 --disable-unittests \
64 --disable-doxygen-html \
65 --disable-doxygen-doc
66
67 HOST_CPPFLAGS += \
68 -std=gnu++11
69
70 HOST_LDFLAGS += -Wl,-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib
71 TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lm)
72
73 # only build the ola_protoc thingy
74 define Host/Compile
75 cd $(HOST_BUILD_DIR); \
76 $(MAKE) protoc/ola_protoc_plugin
77 endef
78
79 define Host/Install
80 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
81 $(CP) $(HOST_BUILD_DIR)/protoc/ola_protoc_plugin $(STAGING_DIR_HOSTPKG)/bin
82 endef
83
84
85 define Build/InstallDev
86 $(INSTALL_DIR) $(1)/usr/include
87 $(CP) $(PKG_INSTALL_DIR)/usr/include/ola $(1)/usr/include/
88 $(CP) $(PKG_INSTALL_DIR)/usr/include/olad $(1)/usr/include/
89
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
92 endef
93
94 define Package/ola/install
95 $(INSTALL_DIR) $(1)/usr/bin
96 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
97
98 $(INSTALL_DIR) $(1)/usr/lib
99 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
100
101 $(INSTALL_DIR) $(1)/etc/init.d
102 $(INSTALL_BIN) ./files/olad.init $(1)/etc/init.d/olad
103
104 $(INSTALL_DIR) $(1)/usr/share/ola/pids
105 $(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
106
107 $(INSTALL_DIR) $(1)/usr/share/olad/www
108 $(CP) $(PKG_INSTALL_DIR)/usr/share/olad/www/* $(1)/usr/share/olad/www
109 endef
110
111 define Package/ola/postinst
112 #!/bin/sh
113
114 # make sure the conf dir exists and is writeable by the group olad uses
115 mkdir -p $${IPKG_INSTROOT}/etc/ola
116 chgrp nogroup $${IPKG_INSTROOT}/etc/ola
117 chmod 775 $${IPKG_INSTROOT}/etc/ola
118 endef
119
120 $(eval $(call HostBuild))
121 $(eval $(call BuildPackage,ola))