summaryrefslogtreecommitdiffstats
path: root/package/procps/procps.mk
blob: 89573a2c2f1c7657f880b00816a612555bf2cd7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#############################################################
#
# procps
#
#############################################################
PROCPS_VER=3.2.3
PROCPS_SOURCE=procps-$(PROCPS_VER).tar.gz
PROCPS_SITE=http://procps.sourceforge.net/
PROCPS_DIR=$(BUILD_DIR)/procps-$(PROCPS_VER)
PROCPS_BINARY=ps/ps
PROCPS_TARGET_BINARY=usr/bin/vmstat

$(DL_DIR)/$(PROCPS_SOURCE):
	$(WGET) -P $(DL_DIR) $(PROCPS_SITE)/$(PROCPS_SOURCE)

$(PROCPS_DIR)/.source: $(DL_DIR)/$(PROCPS_SOURCE)
	zcat $(DL_DIR)/$(PROCPS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
	toolchain/patch-kernel.sh $(PROCPS_DIR) package/procps/ procps*.patch
	$(SED) '/^CFLAGS/s:-O2:$(TARGET_CFLAGS):' $(PROCPS_DIR)/Makefile
	touch $(PROCPS_DIR)/.source

$(PROCPS_DIR)/$(PROCPS_BINARY): $(PROCPS_DIR)/.source
	$(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(PROCPS_DIR)

$(TARGET_DIR)/$(PROCPS_TARGET_BINARY): $(PROCPS_DIR)/$(PROCPS_BINARY)
	$(TARGET_CONFIGURE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) \
		install='install -D' -C $(PROCPS_DIR) \
		ldconfig='/bin/true' install
	rm -Rf $(TARGET_DIR)/usr/man

procps: uclibc ncurses $(TARGET_DIR)/$(PROCPS_TARGET_BINARY)

procps-source: $(DL_DIR)/$(PROCPS_SOURCE)

procps-clean:
	$(MAKE) prefix=$(TARGET_DIR)/usr -C $(PROCPS_DIR) uninstall
	-$(MAKE) -C $(PROCPS_DIR) clean

procps-dirclean:
	rm -rf $(PROCPS_DIR)