|
@@ -0,0 +1,72 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2012-2015 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:=libugpio
|
|
11
|
+PKG_VERSION:=0.0.6
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|
15
|
+PKG_SOURCE_URL:=https://github.com/mhei/libugpio/releases/download/v$(PKG_VERSION)
|
|
16
|
+PKG_MD5SUM:=09c35abbc25f7ebff125bc43ff21ac35
|
|
17
|
+
|
|
18
|
+PKG_LICENSE:=LGPL-2.1+
|
|
19
|
+PKG_LICENSE_FILES:=COPYING.LESSER
|
|
20
|
+
|
|
21
|
+PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
|
|
22
|
+
|
|
23
|
+PKG_INSTALL:=1
|
|
24
|
+PKG_BUILD_PARALLEL:=1
|
|
25
|
+
|
|
26
|
+include $(INCLUDE_DIR)/package.mk
|
|
27
|
+
|
|
28
|
+define Package/libugpio
|
|
29
|
+ SECTION:=libs
|
|
30
|
+ CATEGORY:=Libraries
|
|
31
|
+ URL:=https://github.com/mhei/libugpio
|
|
32
|
+ TITLE:=Library for using sysfs gpio interface from C programs
|
|
33
|
+ DEPENDS:=@GPIO_SUPPORT
|
|
34
|
+endef
|
|
35
|
+
|
|
36
|
+define Package/libugpio/description
|
|
37
|
+ libugpio is a library to ease the use of linux kernel's sysfs
|
|
38
|
+ gpio interface from C programs and/or other libraries.
|
|
39
|
+endef
|
|
40
|
+
|
|
41
|
+define Package/gpioctl-sysfs
|
|
42
|
+ SECTION:=utils
|
|
43
|
+ CATEGORY:=Utilities
|
|
44
|
+ TITLE:=Tool for controlling gpio pins
|
|
45
|
+ DEPENDS:=+libugpio
|
|
46
|
+endef
|
|
47
|
+
|
|
48
|
+define Package/gpioctl-sysfs/description
|
|
49
|
+ Tool for controlling gpio pins using the sysfs api provided by the kernel.
|
|
50
|
+endef
|
|
51
|
+
|
|
52
|
+define Build/InstallDev
|
|
53
|
+ $(INSTALL_DIR) $(1)/usr/include
|
|
54
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/ugpio $(1)/usr/include/
|
|
55
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
56
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.{so*,a} $(1)/usr/lib/
|
|
57
|
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
58
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libugpio.pc $(1)/usr/lib/pkgconfig/
|
|
59
|
+endef
|
|
60
|
+
|
|
61
|
+define Package/libugpio/install
|
|
62
|
+ $(INSTALL_DIR) $(1)/usr/lib
|
|
63
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.so* $(1)/usr/lib/
|
|
64
|
+endef
|
|
65
|
+
|
|
66
|
+define Package/gpioctl-sysfs/install
|
|
67
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
68
|
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpioctl $(1)/usr/bin/
|
|
69
|
+endef
|
|
70
|
+
|
|
71
|
+$(eval $(call BuildPackage,libugpio))
|
|
72
|
+$(eval $(call BuildPackage,gpioctl-sysfs))
|