Merge pull request #1558 from hauke/pps-tools
[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.9.7
13 PKG_RELEASE:=1
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:=2a306e4f0221fea9f4833ba04b042e72c6f10cd3
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 +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 --with-ola-protoc-plugin=$(HOST_BUILD_DIR)/protoc/ola_protoc_plugin
56
57 HOST_CONFIGURE_ARGS += \
58 --disable-all-plugins \
59 --disable-slp \
60 --disable-osc \
61 --disable-uart \
62 --disable-libusb \
63 --disable-libftdi \
64 --disable-http \
65 --disable-examples \
66 --disable-unittests \
67 --disable-doxygen-html \
68 --disable-doxygen-doc
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 # nothing to install for host part
77 define Host/Install
78 endef
79
80
81 define Build/InstallDev
82 $(INSTALL_DIR) $(1)/usr/include
83 $(CP) $(PKG_INSTALL_DIR)/usr/include/ola $(1)/usr/include/
84 $(CP) $(PKG_INSTALL_DIR)/usr/include/olad $(1)/usr/include/
85
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
88 endef
89
90 define Package/ola/install
91 $(INSTALL_DIR) $(1)/usr/bin
92 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
93
94 $(INSTALL_DIR) $(1)/usr/lib
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
96
97 $(INSTALL_DIR) $(1)/etc/init.d
98 $(INSTALL_BIN) ./files/olad.init $(1)/etc/init.d/olad
99
100 $(INSTALL_DIR) $(1)/usr/share/ola/pids
101 $(CP) $(PKG_INSTALL_DIR)/usr/share/ola/pids/* $(1)/usr/share/ola/pids
102 endef
103
104 define Package/ola/postinst
105 #!/bin/sh
106
107 # make sure the conf dir exists and is writeable by the group olad uses
108 mkdir -p $${IPKG_INSTROOT}/etc/ola
109 chgrp nogroup $${IPKG_INSTROOT}/etc/ola
110 chmod 775 $${IPKG_INSTROOT}/etc/ola
111 endef
112
113 $(eval $(call HostBuild))
114 $(eval $(call BuildPackage,ola))