packages: assign PKG_CPE_ID for all missing packages
[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.0
9 PKG_RELEASE:=1
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
11 PKG_HASH:=10503b0217e1b07933e29e8d347a00015b2431bea5f59afe0bed3af30340c82d
12 PKG_SOURCE_URL:=@KERNEL/software/utils/dtc
13 PKG_LICENSE:=GPL-2.0
14 PKG_LICENSE_FILES:=GPL
15 PKG_CPE_ID:=cpe:/a:dtc_project:dtc
16
17 PKG_INSTALL:=1
18 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
19
20 include $(INCLUDE_DIR)/package.mk
21
22
23 define Package/dtc
24 SECTION:=utils
25 CATEGORY:=Utilities
26 TITLE:=Device Tree Compiler
27 URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
28 endef
29
30 define Package/dtc/description
31 Device Tree Compiler for Flat Device Trees Device Tree Compiler, dtc, takes
32 as input a device-tree in a given format and outputs a device-tree in another
33 format for booting kernels on embedded systems.
34 endef
35
36 define Package/dtc/install
37 $(INSTALL_DIR) $(1)/usr/bin
38 $(CP) $(PKG_INSTALL_DIR)/bin/dtc $(1)/usr/bin
39 endef
40
41
42 # See Documentation/manual.txt for details about each utility
43 define Package/fdt-utils
44 SECTION:=utils
45 CATEGORY:=Utilities
46 TITLE:=Flat Device Tree Utilities
47 URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
48 DEPENDS:=+libfdt
49 endef
50
51 define Package/fdt-utils/install
52 $(INSTALL_DIR) $(1)/usr/bin
53 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/convert-dtsv0 $(1)/usr/bin
54 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtdump $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtget $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtput $(1)/usr/bin
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fdtoverlay $(1)/usr/bin
58 endef
59
60
61 define Package/libfdt
62 SECTION:=libs
63 CATEGORY:=Libraries
64 TITLE:=a utility library for reading and manipulating dtb files
65 URL:=https://git.kernel.org/pub/scm/utils/dtc/dtc.git
66 endef
67
68 define Package/libfdt/description
69 This is a library containing functions for manipulating Flat Device Trees.
70 endef
71
72 define Package/libfdt/install
73 $(INSTALL_DIR) $(1)/usr/lib
74 $(CP) $(PKG_INSTALL_DIR)/lib/libfdt*.so* $(1)/usr/lib
75 endef
76
77 # NO_PYTHON is for disabling pylibfdt
78 MAKE_FLAGS += \
79 PREFIX= \
80 NO_PYTHON=1 \
81 NO_VALGRIND=1 \
82 NO_YAML=1 \
83 EXTRA_CFLAGS=$(EXTRA_CFLAGS) \
84
85 define Build/InstallDev
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(INSTALL_DIR) $(1)/usr/include
88 $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include
89 $(CP) $(PKG_INSTALL_DIR)/lib/* $(1)/usr/lib
90 endef
91
92 $(eval $(call BuildPackage,dtc))
93 $(eval $(call BuildPackage,fdt-utils))
94 $(eval $(call BuildPackage,libfdt))