procps-ng: fix alternatives of procps-ng-sysctl
align with busybox sysctl Signed-off-by: Huangbin Zhan <zhanhb88@gmail.com>
This commit is contained in:
parent
0542a0ecae
commit
7106e83d68
1 changed files with 10 additions and 13 deletions
|
@ -30,15 +30,19 @@ CONFIGURE_ARGS += --enable-skill
|
|||
# most of these have alternatives provided by busybox applets
|
||||
PROCPS_APPLETS := \
|
||||
free kill pgrep pkill pmap ps pwdx skill slabtop \
|
||||
snice tload top uptime vmstat w watch
|
||||
snice sysctl tload top uptime vmstat w watch
|
||||
|
||||
# procps-ng will be configured with "--bindir=/usr/bin --sbindir=/usr/sbin" and
|
||||
# as such executables will be installed there by default, but some of them need
|
||||
# to reside in locations such as /bin and /sbin to be in accordance with
|
||||
# busybox alternatives which is also other distributions like debian and centos
|
||||
# are doing
|
||||
PROCPS_APPLETS_DIR_bin:=kill ps watch
|
||||
procps-applets-dir=$(if $(filter $(PROCPS_APPLETS_DIR_bin),$(1)),/bin,/usr/bin)
|
||||
PROCPS_APPLETS_SRC_DIR_SBIN:=sysctl
|
||||
procps-applets-src-dir=$(if $(filter $(PROCPS_APPLETS_SRC_DIR_SBIN),$(1)),/usr/sbin,/usr/bin)
|
||||
|
||||
PROCPS_APPLETS_DIR_BIN:=kill ps watch
|
||||
PROCPS_APPLETS_DIR_SBIN:=sysctl
|
||||
procps-applets-dir=$(if $(filter $(PROCPS_APPLETS_DIR_BIN),$(1)),/bin,$(if $(filter $(PROCPS_APPLETS_DIR_SBIN),$(1)),/sbin,/usr/bin))
|
||||
|
||||
define Package/procps-ng/Default
|
||||
SECTION:=utils
|
||||
|
@ -81,7 +85,6 @@ define GenPlugin
|
|||
endef
|
||||
|
||||
$(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a)))))
|
||||
$(eval $(call GenPlugin,procps-ng-sysctl,sysctl,/usr/sbin))
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
|
@ -93,20 +96,14 @@ define Package/procps-ng/install
|
|||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/procps-ng-sysctl/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sysctl $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
define BuildPlugin
|
||||
define Package/$(1)/install
|
||||
$(INSTALL_DIR) $$(1)$(3)
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)$(3)/$(1)
|
||||
$(INSTALL_DIR) $$(1)$(4)
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)$(3)/$(2) $$(1)$(4)/$(1)
|
||||
endef
|
||||
|
||||
$$(eval $$(call BuildPackage,$(1)))
|
||||
endef
|
||||
|
||||
$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a)))))
|
||||
$(eval $(call BuildPackage,procps-ng-sysctl))
|
||||
$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a),$(call procps-applets-src-dir,$(a)),$(call procps-applets-dir,$(a)))))
|
||||
$(eval $(call BuildPackage,procps-ng))
|
||||
|
|
Loading…
Reference in a new issue