tiff: fix autoreconf
[openwrt/svn-archive/archive.git] / libs / libugpio / Makefile
1 #
2 # Copyright (C) 2012 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.1
12 PKG_RELEASE=$(PKG_SOURCE_VERSION)-1
13
14 PKG_SOURCE_PROTO:=git
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
19
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libugpio
25 SECTION:=libs
26 CATEGORY:=Libraries
27 URL:=https://github.com/mhei/libugpio
28 TITLE:=Library for using sysfs gpio interface from C programs
29 DEPENDS:=@GPIO_SUPPORT
30 endef
31
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.
35 endef
36
37 define Package/gpioctl-sysfs
38 SECTION:=utils
39 CATEGORY:=Utilities
40 TITLE:=Tool for controlling gpio pins
41 DEPENDS:=+libugpio
42 endef
43
44 define Package/gpioctl-sysfs/description
45 Tool for controlling gpio pins using the sysfs api provided by the kernel.
46 endef
47
48 define Build/Configure
49 ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh )
50 $(call Build/Configure/Default)
51 endef
52
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/
60 endef
61
62 define Package/libugpio/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.so* $(1)/usr/lib/
65 endef
66
67 define Package/gpioctl-sysfs/install
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpioctl $(1)/usr/bin/
70 endef
71
72 $(eval $(call BuildPackage,libugpio))
73 $(eval $(call BuildPackage,gpioctl-sysfs))