Browse Source

Merge pull request #240 from thess/menu-work

shadow: create utility sub-menu
sbyx 10 years ago
parent
commit
f8d4ba403b
1 changed files with 36 additions and 4 deletions
  1. 36
    4
      utils/shadow/Makefile

+ 36
- 4
utils/shadow/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=shadow
11 11
 PKG_VERSION:=4.2.1
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=2
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 15
 PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases
@@ -48,7 +48,9 @@ endef
48 48
 
49 49
 define Package/shadow
50 50
   $(call Package/shadow/Default)
51
+  TITLE+= (all)
51 52
   DEPENDS:=$(foreach u,$(SHADOW_APPLETS),+shadow-$(u))
53
+  HIDDEN:=1
52 54
 endef
53 55
 
54 56
 define Package/shadow/description
@@ -61,18 +63,48 @@ define Package/shadow/install
61 63
 	true
62 64
 endef
63 65
 
66
+define Package/shadow-utils/install
67
+endef
68
+
69
+define Package/shadow-utils
70
+  $(call Package/shadow/Default)
71
+  DEPENDS:=+ALL:shadow
72
+endef
73
+
74
+define Package/shadow-utils/config
75
+    menu "Select shadow utilities"
76
+      depends on PACKAGE_shadow-utils
77
+
78
+    config shadow-all
79
+      bool "Include all PLD shadow utilities"
80
+      select PACKAGE_shadow
81
+
82
+    comment "Utilities"
83
+
84
+  $(foreach u,$(SHADOW_APPLETS), \
85
+    config PACKAGE_shadow-$(u)
86
+      prompt "Full PLD version of $(u) utility"
87
+
88
+   )
89
+
90
+  endmenu
91
+
92
+endef
93
+
94
+Package/shadow-utils/description = $(Package/shadow/description)
64 95
 
65 96
 define Package/shadow-common
66 97
   $(call Package/shadow/Default)
67 98
   TITLE:=Shared definitions for the PLD Linux shadow utilities
99
+  HIDDEN:=1
68 100
 endef
69 101
 
70
-
71 102
 define GenPlugin
72 103
   define Package/shadow-$(1)
73 104
     $(call Package/shadow/Default)
74 105
     TITLE:=Utility $(1) from the PLD Linux shadow utilities
75 106
     DEPENDS:=+shadow-common
107
+    HIDDEN:=1
76 108
   endef
77 109
 
78 110
   define Package/shadow-$(1)/description
@@ -83,7 +115,6 @@ endef
83 115
 
84 116
 $(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u))))
85 117
 
86
-
87 118
 define Package/shadow-common/conffiles
88 119
 /etc/login.defs
89 120
 endef
@@ -110,5 +141,6 @@ endef
110 141
 
111 142
 $(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u))))
112 143
 
113
-$(eval $(call BuildPackage,shadow))
144
+$(eval $(call BuildPackage,shadow-utils))
114 145
 $(eval $(call BuildPackage,shadow-common))
146
+$(eval $(call BuildPackage,shadow))