Changeset 34481


Ignore:
Timestamp:
2012-12-04T17:20:42+01:00 (5 years ago)
Author:
florian
Message:

procps: Split package into subpackages

Split procps package into various subpackages, one for
each applet. This allows the user to choose which applets
they want. This is similar to coreutils package.

All subpackages are defaulted to YES, to keep the current
behaviour, i.e., selecting procps package will select
all its subpackages.

Signed-off-by: Jonh Wendell <jonh.wendell@…>
Signed-off-by: Florian Fainelli <florian@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/procps/Makefile

    r22967 r34481  
    2020include $(INCLUDE_DIR)/package.mk 
    2121 
    22 define Package/procps 
     22PROCPS_APPLETS := \ 
     23    ps free pgrep pkill pmap pwdx skill w \ 
     24    slabtop snice tload top vmstat watch 
     25 
     26define Package/procps/Default 
    2327  SECTION:=utils 
    2428  CATEGORY:=Utilities 
     
    2630  TITLE:=proc utilities 
    2731  URL:=http://procps.sourceforge.net/ 
     32endef 
     33 
     34define Package/procps 
     35  $(call Package/procps/Default) 
     36  MENU:=1 
    2837endef 
    2938 
     
    3443endef 
    3544 
     45define GenPlugin 
     46 define Package/$(1) 
     47   $(call Package/procps/Default) 
     48   DEPENDS:=procps 
     49   TITLE:=Applet $(2) from the procps package 
     50   DEFAULT:=y 
     51 endef 
     52 
     53 define Package/$(1)/description 
     54  Installs the applet $(2). 
     55 endef 
     56endef 
     57 
     58$(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-$(a),$(a)))) 
     59 
    3660MAKE_FLAGS += \ 
    3761        CFLAGS="$(TARGET_CFLAGS)" \ 
     
    4165define Package/procps/install 
    4266        $(INSTALL_DIR) $(1)/usr/bin 
    43         $(INSTALL_BIN) $(PKG_BUILD_DIR)/free $(1)/usr/bin/ 
    44         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ps/ps $(1)/usr/bin 
    45         $(INSTALL_BIN) $(PKG_BUILD_DIR)/pgrep $(1)/usr/bin 
    46         $(INSTALL_BIN) $(PKG_BUILD_DIR)/pkill $(1)/usr/bin 
    47         $(INSTALL_BIN) $(PKG_BUILD_DIR)/pmap $(1)/usr/bin 
    48         $(INSTALL_BIN) $(PKG_BUILD_DIR)/pwdx $(1)/usr/bin 
    49         $(INSTALL_BIN) $(PKG_BUILD_DIR)/skill $(1)/usr/bin 
    50         $(INSTALL_BIN) $(PKG_BUILD_DIR)/slabtop $(1)/usr/bin 
    51         $(INSTALL_BIN) $(PKG_BUILD_DIR)/snice $(1)/usr/bin 
    52         $(INSTALL_BIN) $(PKG_BUILD_DIR)/tload $(1)/usr/bin 
    53         $(INSTALL_BIN) $(PKG_BUILD_DIR)/top $(1)/usr/bin/ 
    54         $(INSTALL_BIN) $(PKG_BUILD_DIR)/vmstat $(1)/usr/bin 
    55         $(INSTALL_BIN) $(PKG_BUILD_DIR)/w $(1)/usr/bin 
    56         $(INSTALL_BIN) $(PKG_BUILD_DIR)/watch $(1)/usr/bin 
    5767        $(INSTALL_DIR) $(1)/usr/lib 
    5868        $(INSTALL_BIN) $(PKG_BUILD_DIR)/proc/libproc-$(PKG_VERSION).so $(1)/usr/lib/ 
    5969endef 
    6070 
     71AUXDIR_ps := "ps/" 
     72 
     73define BuildPlugin 
     74  define Package/$(1)/install 
     75        $(INSTALL_DIR) $$(1)/usr/bin 
     76        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(AUXDIR_$(2))$(2) $$(1)/usr/bin/ 
     77  endef 
     78 
     79  $$(eval $$(call BuildPackage,$(1))) 
     80endef 
     81 
     82$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-$(a),$(a)))) 
    6183$(eval $(call BuildPackage,procps)) 
Note: See TracChangeset for help on using the changeset viewer.