Browse Source

Merge pull request #583 from Frieds-Technology/libartnet

libartnet: new package added
Steven Barth 10 years ago
parent
commit
38befcd838
2 changed files with 72 additions and 0 deletions
  1. 60
    0
      libs/libartnet/Makefile
  2. 12
    0
      libs/libartnet/patches/001-bswap_16.patch

+ 60
- 0
libs/libartnet/Makefile View File

@@ -0,0 +1,60 @@
1
+#
2
+# Copyright (C) 2010-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libartnet
11
+PKG_VERSION:=1.1.2
12
+PKG_RELEASE:=1.1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=https://github.com/OpenLightingProject/libartnet/releases/download/1.1.2
16
+PKG_MD5SUM:=dcceab3efe3dae4c18fa549dbd198e71
17
+
18
+PKG_MAINTAINER:=Martijn Zilverschoon <martijn@friedzombie.com>
19
+
20
+PKG_LICENSE:=GPL-2.1
21
+PKG_LICENSE_FILES:=COPYING
22
+
23
+include $(INCLUDE_DIR)/package.mk
24
+
25
+define Package/libartnet
26
+	SECTION:=libs
27
+	CATEGORY:=Libraries
28
+	TITLE:=Libartnet is an implementation of the ArtNet protocol.
29
+	URL:=http://www.openlighting.org/libartnet-main/
30
+endef
31
+
32
+define Package/libartnet/description
33
+	Libartnet is an implementation of the ArtNet protocol. ArtNet allows the
34
+	transmission of DMX and related data over IP networks.
35
+endef
36
+
37
+define Build/Configure
38
+	$(call Build/Configure/Default)
39
+endef
40
+
41
+define Build/Compile
42
+	$(MAKE) -C $(PKG_BUILD_DIR) \
43
+	DESTDIR="$(PKG_INSTALL_DIR)" \
44
+	all install
45
+endef
46
+
47
+define Build/InstallDev
48
+	mkdir -p $(1)/usr/include
49
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/artnet $(1)/usr/include/
50
+	mkdir -p $(1)/usr/lib
51
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libartnet.{so,so.1,so.1.0.0} $(1)/usr/lib/
52
+endef
53
+
54
+
55
+define Package/libartnet/install
56
+	$(INSTALL_DIR) $(1)/usr/lib
57
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libartnet.{so,so.1,so.1.0.0} $(1)/usr/lib/
58
+endef
59
+
60
+$(eval $(call BuildPackage,libartnet))

+ 12
- 0
libs/libartnet/patches/001-bswap_16.patch View File

@@ -0,0 +1,12 @@
1
+--- a/artnet/private.h
2
++++ b/artnet/private.h
3
+@@ -100,7 +100,9 @@ extern uint16_t HIGH_BYTE;
4
+ #endif
5
+ 
6
+ // byte ordering macros
7
++#ifndef bswap_16
8
+ #define bswap_16(x)  ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
9
++#endif
10
+ 
11
+ // htols : convert short from host to little endian order
12
+ #ifdef WIN32