1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 21:03:56 +02:00

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:
Huangbin Zhan 2020-10-27 06:07:08 +08:00
parent 0542a0ecae
commit 7106e83d68

View File

@ -30,15 +30,19 @@ CONFIGURE_ARGS += --enable-skill
# most of these have alternatives provided by busybox applets # most of these have alternatives provided by busybox applets
PROCPS_APPLETS := \ PROCPS_APPLETS := \
free kill pgrep pkill pmap ps pwdx skill slabtop \ 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 # 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 # 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 # 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 # busybox alternatives which is also other distributions like debian and centos
# are doing # are doing
PROCPS_APPLETS_DIR_bin:=kill ps watch PROCPS_APPLETS_SRC_DIR_SBIN:=sysctl
procps-applets-dir=$(if $(filter $(PROCPS_APPLETS_DIR_bin),$(1)),/bin,/usr/bin) 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 define Package/procps-ng/Default
SECTION:=utils SECTION:=utils
@ -81,7 +85,6 @@ define GenPlugin
endef endef
$(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a))))) $(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 += \ MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \
@ -93,20 +96,14 @@ define Package/procps-ng/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/
endef 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 BuildPlugin
define Package/$(1)/install define Package/$(1)/install
$(INSTALL_DIR) $$(1)$(3) $(INSTALL_DIR) $$(1)$(4)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)$(3)/$(1) $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(3)/$(2) $$(1)$(4)/$(1)
endef endef
$$(eval $$(call BuildPackage,$(1))) $$(eval $$(call BuildPackage,$(1)))
endef endef
$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a))))) $(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-sysctl))
$(eval $(call BuildPackage,procps-ng)) $(eval $(call BuildPackage,procps-ng))