libv4l: update to 1.22.1
[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.8
13 PKG_RELEASE:=4
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:=45bc101d1ddcc1c6320c063eb25a9345e5820a4233acfa5b29f2dfd99f7452e1
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_LDFLAGS += -Wl,-rpath$(comma)$(STAGING_DIR_HOSTPKG)/lib
68 TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lm)
69
70 # only build the ola_protoc thingy
71 define Host/Compile
72 cd $(HOST_BUILD_DIR); \
73 $(MAKE) protoc/ola_protoc_plugin
74 endef
75
76 define Host/Install
77 $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
78 $(CP) $(HOST_BUILD_DIR)/protoc/ola_protoc_plugin $(STAGING_DIR_HOSTPKG)/bin
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
104 $(INSTALL_DIR) $(1)/usr/share/olad/www
105 $(CP) $(PKG_INSTALL_DIR)/usr/share/olad/www/* $(1)/usr/share/olad/www
106 endef
107
108 define Package/ola/postinst
109 #!/bin/sh
110
111 # make sure the conf dir exists and is writeable by the group olad uses
112 mkdir -p $${IPKG_INSTROOT}/etc/ola
113 chgrp nogroup $${IPKG_INSTROOT}/etc/ola
114 chmod 775 $${IPKG_INSTROOT}/etc/ola
115 endef
116
117 $(eval $(call HostBuild))
118 $(eval $(call BuildPackage,ola))