Добавлен пакет omega2-ctrl
[lede-packages.git] / am2320 / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: $
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=am2320
13 PKG_VERSION:=0.1
14 PKG_RELEASE:=2
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17
18 include $(INCLUDE_DIR)/package.mk
19
20 MAKEFLAGS_KMOD:= -C "$(LINUX_DIR)" \
21                 CROSS_COMPILE="$(TARGET_CROSS)" \
22                 ARCH="$(LINUX_KARCH)" \
23                 PATH="$(TARGET_PATH)" \
24                 SUBDIRS="$(PKG_BUILD_DIR)"
25
26 define KernelPackage/am2320
27   SUBMENU:=Other modules
28   DEPENDS:=
29   TITLE:=Kernel driver for AM2320 temperature/humidity sensor
30   URL:=https://github.com/rvbglas/linux-am2320-driver
31   FILES:=$(PKG_BUILD_DIR)/am2320.$(LINUX_KMOD_SUFFIX)
32   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(PKG_RELEASE)
33   AUTOLOAD:=$(call AutoLoad,80,am2320)
34   $(call AddDepends/hwmon,+kmod-i2c-core)
35 endef 
36
37 define KernelPackage/am2320/description
38         Kernel driver for AM2320 i2c temperature/humidity sensor
39 endef
40
41
42 define Build/Prepare
43         mkdir -p $(PKG_BUILD_DIR)
44         $(CP) ./src/* $(PKG_BUILD_DIR)/
45 endef
46
47 define Build/Compile
48         $(MAKE) $(MAKEFLAGS_KMOD) \
49                 modules
50 endef
51
52 $(eval $(call KernelPackage,am2320))