2 # Copyright (C) 2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
12 PKG_RELEASE
=$(PKG_SOURCE_VERSION
)-1
15 PKG_SOURCE_URL
:=git
://github.com
/mhei
/libugpio.git
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=8235d04096bfa9db594d5df75c5cd634a3bbc39a
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
)-$(PKG_SOURCE_VERSION
).
tar.gz
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/libugpio
27 URL
:=https
://github.com
/mhei
/libugpio
28 TITLE
:=Library for using sysfs gpio interface from C programs
29 DEPENDS
:=@GPIO_SUPPORT
32 define Package
/libugpio
/description
33 libugpio is a library to ease the use of linux kernel
's sysfs
34 gpio interface from C programs and/or other libraries.
37 define Package/gpioctl-sysfs
40 TITLE:=Tool for controlling gpio pins
44 define Package/gpioctl-sysfs/description
45 Tool for controlling gpio pins using the sysfs api provided by the kernel.
48 define Build/Configure
49 ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
50 $(call Build/Configure/Default)
53 define Build/InstallDev
54 $(INSTALL_DIR) $(1)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/ugpio $(1)/usr/include/
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.{so*,a} $(1)/usr/lib/
58 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libugpio.pc $(1)/usr/lib/pkgconfig/
62 define Package/libugpio/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.so* $(1)/usr/lib/
67 define Package/gpioctl-sysfs/install
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpioctl $(1)/usr/bin/
72 $(eval $(call BuildPackage,libugpio))
73 $(eval $(call BuildPackage,gpioctl-sysfs))