Makefile (2762B)
1 # 2 # Copyright (C) 2006-2015 OpenWrt.org 3 # 4 # This is free software, licensed under the GNU General Public License v2. 5 # See /LICENSE for more information. 6 # 7 8 include $(TOPDIR)/rules.mk 9 10 PKG_NAME:=procps-ng 11 PKG_VERSION:=3.3.11 12 PKG_RELEASE:=3 13 PKG_LICENSE:=GPL-2.0 14 PKG_LICENSE_FILES:=COPYING COPYING.LIB 15 16 PKG_SOURCE_PROTO:=git 17 PKG_SOURCE_URL:=https://gitlab.com/procps-ng/procps.git 18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 19 PKG_SOURCE_VERSION:=8a198e3eafbde0b627e9992b41d26e6762e4f8c7 20 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz 21 22 PKG_BUILD_PARALLEL:=1 23 PKG_INSTALL:=1 24 PKG_FIXUP:=autoreconf 25 PKG_BUILD_DEPENDS:=gettext libiconv 26 27 include $(INCLUDE_DIR)/package.mk 28 29 CONFIGURE_ARGS += --enable-skill 30 31 PROCPS_APPLETS := \ 32 free kill pgrep pkill pmap ps pwdx skill slabtop \ 33 snice tload top uptime vmstat w watch 34 35 define Package/procps-ng/Default 36 SECTION:=utils 37 CATEGORY:=Utilities 38 DEPENDS:=+libncurses 39 TITLE:=procps-ng utilities 40 URL:=https://gitlab.com/procps-ng/procps 41 MAINTAINER:=Gergely Kiss <mail.gery@gmail.com> 42 endef 43 44 define Build/Prepare 45 $(call Build/Prepare/Default) 46 echo "$(PKG_VERSION)" > "$(PKG_BUILD_DIR)/.tarball-version" 47 endef 48 49 define Package/procps-ng 50 $(call Package/procps-ng/Default) 51 MENU:=1 52 endef 53 54 define Package/procps-ng/description 55 procps is a set of command line and full-screen utilities that provide information out of the pseudo-filesystem 56 most commonly located at /proc. This filesystem provides a simple interface to the kernel data structures. 57 The programs of procps generally concentrate on the structures that describe the processess running on the system. 58 59 NOTE: some utilities provided by procps-ng packages (ps, uptime, kill, ...) are installed as busybox applets, by default. 60 Conflicting applets should be removed from the build to avoid file conflicts. 61 endef 62 63 define GenPlugin 64 define Package/$(1) 65 $(call Package/procps-ng/Default) 66 DEPENDS:=procps-ng 67 TITLE:=Applet $(2) from the procps-ng package 68 DEFAULT:=y 69 endef 70 71 define Package/$(1)/description 72 Installs the applet $(2). 73 endef 74 endef 75 76 $(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a)))) 77 78 MAKE_FLAGS += \ 79 CFLAGS="$(TARGET_CFLAGS)" \ 80 CPPFLAGS="$(TARGET_CPPFLAGS)" \ 81 LDFLAGS="$(TARGET_LDFLAGS)" \ 82 83 define Package/procps-ng/install 84 $(INSTALL_DIR) $(1)/usr/bin 85 $(INSTALL_DIR) $(1)/usr/lib 86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/ 87 endef 88 89 define BuildPlugin 90 define Package/$(1)/install 91 $(INSTALL_DIR) $$(1)/usr/bin 92 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/ 93 endef 94 95 $$(eval $$(call BuildPackage,$(1))) 96 endef 97 98 $(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a)))) 99 $(eval $(call BuildPackage,procps-ng))