procd: make mDNS TXT record parsing more solid
[openwrt/openwrt.git] / package / utils / dtc / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # Copyright (C) 2016-2019 Yousong Zhou <yszhou4tech@gmail.com>
4
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=dtc
8 PKG_VERSION:=1.6.1
9 PKG_RELEASE:=$(AUTORELEASE)
10
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
12 PKG_HASH:=65cec529893659a49a89740bb362f507a3b94fc8cd791e76a8d6a2b6f3203473
13 PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
14
15 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
16 PKG_LICENSE:=GPL-2.0-only
17 PKG_LICENSE_FILES:=GPL
18 PKG_CPE_ID:=cpe:/a:dtc_project:dtc
19
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/meson.mk
24
25 define Package/dtc
26 SECTION:=utils
27 CATEGORY:=Utilities
28 TITLE:=Device Tree Compiler
29 URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
30 endef
31
32 define Package/dtc/description
33 Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
34 as input a device-tree in a given format and outputs a device-tree in another
35 format for booting kernels on embedded systems.
36 endef
37
38 define Package/dtc/install
39 $(INSTALL_DIR) $(1)/usr/bin
40 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin
41 endef
42
43
44 # See Documentation/manual.txt for details about each utility
45 define Package/fdt-utils
46 SECTION:=utils
47 CATEGORY:=Utilities
48 TITLE:=Flat Device Tree Utilities
49 URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
50 DEPENDS:=+libfdt
51 endef
52
53 define Package/fdt-utils/install
54 $(INSTALL_DIR) $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/convert-dtsv0 $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtdump $(1)/usr/bin
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtget $(1)/usr/bin
58 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtput $(1)/usr/bin
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fdtoverlay $(1)/usr/bin
60 endef
61
62
63 define Package/libfdt
64 SECTION:=libs
65 CATEGORY:=Libraries
66 TITLE:=a utility library for reading and manipulating dtb files
67 URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
68 endef
69
70 define Package/libfdt/description
71 This is a library containing functions for manipulating Flat Device Trees.
72 endef
73
74 define Package/libfdt/install
75 $(INSTALL_DIR) $(1)/usr/lib
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdt*.so* $(1)/usr/lib
77 endef
78
79 MESON_ARGS += \
80 -Dtools=true \
81 -Dyaml=disabled \
82 -Dvalgrind=disabled \
83 -Dpython=disabled
84
85 define Build/InstallDev
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(INSTALL_DIR) $(1)/usr/include
88 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
90 endef
91
92 $(eval $(call BuildPackage,dtc))
93 $(eval $(call BuildPackage,fdt-utils))
94 $(eval $(call BuildPackage,libfdt))