summaryrefslogtreecommitdiff
path: root/package/sysstat/patches/patch-Makefile
blob: 21cc0e99440d355c6f749019057a6ee51fba1113 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
$Id$

	removes manpages, some chown-stuff and the cron-stuff (no need for it)
	fixes cross-compilation

--- sysstat-7.0.3.orig/Makefile	Sun Oct 22 16:27:03 2006
+++ sysstat-7.0.3/Makefile	Fri May 18 18:31:06 2007
@@ -7,7 +7,7 @@ VERSION = 7.0.3
 include build/CONFIG
 
 # Compiler to use
-CC = gcc
+CC ?= gcc
 # Other commands
 SED = sed
 CHMOD = chmod
@@ -37,8 +37,9 @@ NLS_DIR = $(PREFIX)/share/locale
 SYSCONFIG_DIR = /etc/sysconfig
 
 # Compiler flags
-CFLAGS = -Wall -Wstrict-prototypes -pipe -O2 -fno-strength-reduce
-LFLAGS = -s
+CFLAGS ?= -O2 -pipe
+CFLAGS += -Wall -Wstrict-prototypes -fno-strength-reduce
+LFLAGS = -s ${LDFLAGS}
 # SAS_DFLAGS may also contain SMP_RACE definition
 SAS_DFLAGS += -DSA_DIR=\"$(SA_DIR)\" -DSADC_PATH=\"$(SADC_PATH)\"
 
@@ -179,10 +180,8 @@ endif
 .PHONY: clean distclean config install install_base install_all uninstall \
 	uninstall_base uninstall_all dist bdist
 
-install_base: all man/sadc.8 man/sar.1 man/sadf.1 man/sa1.8 man/sa2.8 man/iostat.1
+install_base: all 
 	mkdir -p $(DESTDIR)$(SA_LIB_DIR)
-	mkdir -p $(DESTDIR)$(MAN1_DIR)
-	mkdir -p $(DESTDIR)$(MAN8_DIR)
 	mkdir -p $(DESTDIR)$(SA_DIR)
 ifeq ($(CLEAN_SA_DIR),y)
 	rm -f $(DESTDIR)$(SA_DIR)/sa??
@@ -191,19 +190,12 @@ endif
 	mkdir -p $(DESTDIR)$(DOC_DIR)
 	mkdir -p $(DESTDIR)$(SYSCONFIG_DIR)
 	install -m 755 sa1 $(DESTDIR)$(SA_LIB_DIR)
-	install -m 644 $(MANGRPARG) man/sa1.8 $(DESTDIR)$(MAN8_DIR)
 	install -m 755 sa2 $(DESTDIR)$(SA_LIB_DIR)
-	install -m 644 $(MANGRPARG) man/sa2.8 $(DESTDIR)$(MAN8_DIR)
 	install -m 755 sadc $(DESTDIR)$(SA_LIB_DIR)
-	install -m 644 $(MANGRPARG) man/sadc.8 $(DESTDIR)$(MAN8_DIR)
 	install -m 755 sar $(DESTDIR)$(BIN_DIR)
-	install -m 644 $(MANGRPARG) man/sar.1 $(DESTDIR)$(MAN1_DIR)
 	install -m 755 sadf $(DESTDIR)$(BIN_DIR)
-	install -m 644 $(MANGRPARG) man/sadf.1 $(DESTDIR)$(MAN1_DIR)
 	install -m 755 iostat $(DESTDIR)$(BIN_DIR)
-	install -m 644 $(MANGRPARG) man/iostat.1 $(DESTDIR)$(MAN1_DIR)
 	install -m 755 mpstat $(DESTDIR)$(BIN_DIR)
-	install -m 644 $(MANGRPARG) man/mpstat.1 $(DESTDIR)$(MAN1_DIR)
 	install -m 644 sysstat.ioconf $(DESTDIR)$(SYSCONFIG_DIR);
 	install -m 644 CHANGES $(DESTDIR)$(DOC_DIR)
 	install -m 644 COPYING $(DESTDIR)$(DOC_DIR)
@@ -243,18 +235,6 @@ ifdef REQUIRE_NLS
 endif
 
 install_all: install_base
-	$(CHOWN) $(CRON_OWNER) $(DESTDIR)$(SA_DIR)
-	if [ -d $(DESTDIR)/etc/cron.d ]; then \
-	   install -m 644 sysstat.crond $(DESTDIR)/etc/cron.d/sysstat; \
-	elif [ -d $(DESTDIR)/etc/cron.hourly -a -d $(DESTDIR)/etc/cron.daily ]; then \
-	   install -m 755 sysstat.cron.hourly $(DESTDIR)/etc/cron.hourly/sysstat; \
-	   install -m 755 sysstat.cron.daily $(DESTDIR)/etc/cron.daily/sysstat; \
-	else \
-	   su $(CRON_OWNER) -c "crontab -l > /tmp/crontab-$(CRON_OWNER).save"; \
-	   $(CP) -a /tmp/crontab-$(CRON_OWNER).save ./crontab-$(CRON_OWNER).`date '+%Y%m%d.%H%M%S'`.save; \
-	   echo "USER PREVIOUS CRONTAB SAVED IN CURRENT DIRECTORY (USING .save SUFFIX)."; \
-	   su $(CRON_OWNER) -c "crontab crontab"; \
-	fi
 	if [ -d $(DESTDIR)$(INIT_DIR) ]; then \
 	   install -m 755 sysstat $(DESTDIR)$(INIT_DIR)/sysstat; \
 	   if [ -x $(CHKCONFIG) ]; then \