include: add a meta data field for required system user:group
[openwrt/openwrt.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 Menu-Depends: $(MDEPENDS)
35 Provides: $(PROVIDES)
36 $(if $(VARIANT),Build-Variant: $(VARIANT)
37 )$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS)
38 )$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS)
39 )$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES)
40 )Section: $(SECTION)
41 Category: $(CATEGORY)
42 Title: $(TITLE)
43 Maintainer: $(MAINTAINER)
44 $(if $(USERID),Require-User: $(USERID)
45 )Source: $(PKG_SOURCE)
46 Type: $(if $(Package/$(1)/targets),$(Package/$(1)/targets),$(if $(PKG_TARGETS),$(PKG_TARGETS),ipkg))
47 $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
48 )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
49 )$(if $(HIDDEN),Hidden: $(HIDDEN)
50 )$(if $(FEED),Feed: $(FEED)
51 )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
52 $(if $(URL),$(URL)
53 )$(MAINTAINER)
54 @@
55 $(if $(Package/$(1)/config),Config:
56 $(Package/$(1)/config)
57 @@
58 )$(foreach pc,$(preconfig_$(1)),
59 $(Preconfig/$(pc))))
60 endef
61
62 define Feature/Default
63 TARGET_NAME:=
64 TARGET_TITLE:=
65 PRIORITY:=
66 NAME:=
67 endef
68
69 define Feature
70 $(eval $(Feature/Default))
71 $(eval $(Feature/$(1)))
72 $(if $(DUMP),$(call Dumpinfo/Feature,$(1)))
73 endef
74
75 define Dumpinfo/Feature
76 $(info Feature: $(TARGET_NAME)_$(1)
77 Target-Name: $(TARGET_NAME)
78 Target-Title: $(TARGET_TITLE)
79 Feature-Name: $(NAME)
80 $(if $(PRIORITY),Feature-Priority: $(PRIORITY)
81 )Feature-Description:
82 $(Feature/$(1)/description)
83 @@
84 )
85 endef
86
87 endif