Changeset 36547


Ignore:
Timestamp:
2013-05-05T01:14:44+02:00 (5 years ago)
Author:
luka
Message:

[package] shadow: rework Makefile

Signed-off-by: Luka Perkov <luka@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/shadow/Makefile

    r36546 r36547  
    11# 
    2 # Copyright (C) 2008-2012 OpenWrt.org 
     2# Copyright (C) 2008-2013 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1717 
    1818PKG_FIXUP:=autoreconf 
    19  
     19PKG_BUILD_PARALLEL:=1 
    2020PKG_INSTALL:=1 
    2121 
    2222include $(INCLUDE_DIR)/package.mk 
    2323 
    24 UTILS := \ 
     24SHADOW_APPLETS := \ 
    2525        chage groupadd groupdel groupmod groups passwd su \ 
    2626        useradd userdel usermod 
     
    3535        --without-nscd 
    3636 
    37 define Package/shadow 
     37define Package/shadow/Default 
    3838  SECTION:=utils 
    3939  CATEGORY:=Utilities 
    4040  TITLE:=The PLD Linux shadow utilities 
    4141  URL:=http://pkg-shadow.alioth.debian.org/ 
    42   DEPENDS:=$(foreach u,$(UTILS),+shadow-$(u)) 
     42endef 
     43 
     44define Package/shadow 
     45  $(call Package/shadow/Default) 
     46  MENU:=1 
    4347endef 
    4448 
    4549define Package/shadow/description 
    46   Full versions of standard shadow utilities.  Normally, you would not 
     50  Full versions of standard shadow utilities. Normally, you would not 
    4751  use this package, since the functionality in BusyBox is more than 
    4852  sufficient and much smaller. 
     
    5559 
    5660define Package/shadow-common 
    57   SECTION:=utils 
    58   CATEGORY:=Utilities 
    59   TITLE:=Shared definitions for the shadow utilities 
    60   URL:=http://pkg-shadow.alioth.debian.org/ 
     61  $(call Package/shadow/Default) 
     62  TITLE:=Shared definitions for the PLD Linux shadow utilities 
     63  DEPENDS:=shadow 
    6164endef 
     65 
     66 
     67define GenPlugin 
     68  define Package/shadow-$(1) 
     69    $(call Package/shadow/Default) 
     70    TITLE:=Utility $(1) from the PLD Linux shadow utilities 
     71    DEPENDS:=shadow +shadow-common 
     72  endef 
     73 
     74  define Package/shadow-$(1)/description 
     75    Full version of standard $(1) utility. Normally, you would not use this 
     76    package, since the functionality in BusyBox is more than sufficient. 
     77  endef 
     78endef 
     79 
     80$(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u)))) 
     81 
    6282 
    6383define Package/shadow-common/conffiles 
     
    7191 
    7292 
    73 define program 
    74   define Package/shadow-$(1) 
    75     SECTION:=utils 
    76     CATEGORY:=Utilities 
    77     TITLE:=Utility $(1) from the PLD Linux shadow utilities 
    78     URL:=http://pkg-shadow.alioth.debian.org/ 
    79     DEPENDS:=+shadow-common 
    80   endef 
    81  
    82   define Package/shadow-$(1)/description 
    83     Full version of standard $(1) utility. Normally, you would not use this 
    84     package, since the functionality in BusyBox is more than sufficient. 
    85   endef 
    86  
     93define BuildPlugin 
    8794  define Package/shadow-$(1)/install 
    8895        [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \ 
     
    98105endef 
    99106 
     107$(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u)))) 
     108 
    100109$(eval $(call BuildPackage,shadow)) 
    101110$(eval $(call BuildPackage,shadow-common)) 
    102 $(foreach u,$(UTILS),$(eval $(call program,$(u)))) 
Note: See TracChangeset for help on using the changeset viewer.