include/package-dumpinfo.mk: introduce Repository values
[openwrt/staging/chunkeey.git] / include / package-dumpinfo.mk
1 #
2 # Copyright (C) 2006 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 ifneq ($(DUMP),)
9
10 dumpinfo: FORCE
11
12 define Config/template
13 Preconfig: $(1)
14 Preconfig-Type: $(2)
15 Preconfig-Default: $(3)
16 Preconfig-Label: $(4)
17
18 endef
19
20 define Config
21 Preconfig/$(1) = $$(call Config/template,$(1),$(2),$(3),$(4))
22 preconfig_$$(1) += $(1)
23 endef
24
25 define Dumpinfo/Package
26 $(info Package: $(1)
27 $(if $(MENU),Menu: $(MENU)
28 )$(if $(SUBMENU),Submenu: $(SUBMENU)
29 )$(if $(SUBMENUDEP),Submenu-Depends: $(SUBMENUDEP)
30 )$(if $(DEFAULT),Default: $(DEFAULT)
31 )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1
32 )Version: $(VERSION)
33 Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS))
34 Conflicts: $(CONFLICTS)
35 Menu-Depends: $(MDEPENDS)
36 Provides: $(PROVIDES)
37 $(if $(VARIANT),Build-Variant: $(VARIANT)
38 $(if $(DEFAULT_VARIANT),Default-Variant: $(VARIANT)
39 ))$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
40 )$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
41 )$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
42 )Section: $(SECTION)
43 Category: $(CATEGORY)
44 $(if $(filter nonshared,$(PKG_FLAGS)),,Repository: $(if $(FEED),$(FEED),base)
45 )Title: $(TITLE)
46 Maintainer: $(MAINTAINER)
47 $(if $(USERID),Require-User: $(USERID)
48 )Source: $(PKG_SOURCE)
49 $(if $(PKG_LICENSE),License: $(PKG_LICENSE)
50 )$(if $(PKG_LICENSE_FILES),LicenseFiles: $(PKG_LICENSE_FILES)
51 )Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
52 $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
53 )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
54 )$(if $(HIDDEN),Hidden: $(HIDDEN)
55 )$(if $(PACKAGE_SUBDIR),Package-Subdir: $(PACKAGE_SUBDIR)
56 )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
57 $(if $(URL),$(URL)
58 )$(MAINTAINER)
59 @@
60 $(if $(Package/$(1)/config),Config:
61 $(Package/$(1)/config)
62 @@
63 )$(foreach pc,$(preconfig_$(1)),
64 $(Preconfig/$(pc))))
65 endef
66
67 define Feature/Default
68 TARGET_NAME:=
69 TARGET_TITLE:=
70 PRIORITY:=
71 NAME:=
72 endef
73
74 define Feature
75 $(eval $(Feature/Default))
76 $(eval $(Feature/$(1)))
77 $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
78 endef
79
80 define Dumpinfo/Feature
81 $(info Feature: $(TARGET_NAME)_$(1)
82 Target-Name: $(TARGET_NAME)
83 Target-Title: $(TARGET_TITLE)
84 Feature-Name: $(NAME)
85 $(if $(PRIORITY),Feature-Priority: $(PRIORITY)
86 )Feature-Description:
87 $(Feature/$(1)/description)
88 @@
89 )
90 endef
91
92 endif