usbmuxd: Update to latest git
[feed/packages.git] / libs / libgpiod / Makefile
1 #
2 # Copyright (C) 2018 Michael Heimpold <mhei@heimpold.de>
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:=libgpiod
11 PKG_VERSION:=1.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/
16 PKG_HASH:=b6b9079c933f7c8524815437937dda6b795a16141bca202a9eec70ba5844b5ba
17
18 PKG_LICENSE:=LGPL-2.1+
19 PKG_LICENSE_FILES:=COPYING
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 ifneq ($(CONFIG_PACKAGE_gpiod-tools),)
29 CONFIGURE_ARGS += --enable-tools
30 endif
31
32 define Package/libgpiod
33 SECTION:=libs
34 CATEGORY:=Libraries
35 URL:=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
36 TITLE:=Library for interacting with Linux's GPIO character device
37 DEPENDS:=@GPIO_SUPPORT @(LINUX_4_9||LINUX_4_14)
38 endef
39
40 define Package/libgpiod/description
41 C library for interacting with the linux GPIO character device
42 (gpiod stands for GPIO device).
43 endef
44
45 define Package/gpiod-tools
46 SECTION:=utils
47 CATEGORY:=Utilities
48 TITLE:=Tools for interacting with GPIO pins
49 DEPENDS:=+libgpiod
50 endef
51
52 define Package/gpiod-tools/description
53 Tools for interacting with the linux GPIO character device
54 (gpiod stands for GPIO device).
55 endef
56
57 define Build/InstallDev
58 $(INSTALL_DIR) $(1)/usr/include
59 $(CP) $(PKG_INSTALL_DIR)/usr/include/gpiod.h $(1)/usr/include/
60
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.{so*,a} $(1)/usr/lib/
63
64 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgpiod.pc $(1)/usr/lib/pkgconfig/
66 endef
67
68 define Package/libgpiod/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.so* $(1)/usr/lib/
71 endef
72
73 define Package/gpiod-tools/install
74 $(INSTALL_DIR) $(1)/usr/bin
75 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
76 endef
77
78 $(eval $(call BuildPackage,libgpiod))
79 $(eval $(call BuildPackage,gpiod-tools))