| 1 | NAME = sysstat |
|---|
| 2 | VERSION = 20111025 |
|---|
| 3 | CATEGORIES = utils |
|---|
| 4 | GARTYPE = v2 |
|---|
| 5 | |
|---|
| 6 | DESCRIPTION = Key system statistics at a glance |
|---|
| 7 | define BLURB |
|---|
| 8 | sysstat is thought to be a complementary tool in the list of utilities |
|---|
| 9 | included in Solaris for system observation (prstat, vmstat, iostat, mpstat, |
|---|
| 10 | nfsstat, netstat, ...). It provides an overall view of the current system |
|---|
| 11 | performance. Its key feature is to present all most important performance |
|---|
| 12 | metrics to the user at a single glance. Use it to get a general idea of |
|---|
| 13 | what is happening on the system. If you encounter any bottlenecks, |
|---|
| 14 | please ask the standard board utilities for more detailed statistics to |
|---|
| 15 | find out what is going on. sysstat might point you into the right direction, |
|---|
| 16 | but it probably won't be able to give you all the information you need |
|---|
| 17 | in more complex scenarios. |
|---|
| 18 | endef |
|---|
| 19 | |
|---|
| 20 | MASTER_SITES = http://www.maier-komor.de/$(NAME)/ |
|---|
| 21 | DISTFILES = $(NAME)-$(VERSION).tgz |
|---|
| 22 | |
|---|
| 23 | RUNTIME_DEP_PKGS_CSWsysstat += CSWlibncurses5 |
|---|
| 24 | |
|---|
| 25 | VENDOR_URL = http://www.maier-komor.de/sysstat.html |
|---|
| 26 | |
|---|
| 27 | LICENSE = LICENSE |
|---|
| 28 | |
|---|
| 29 | PATCHFILES = patch-onlyisaexec-sysstatd.diff |
|---|
| 30 | |
|---|
| 31 | CONFIGURE_SCRIPTS = custom |
|---|
| 32 | |
|---|
| 33 | # As kernel data is accessed we need separate builds for 32 and 64 bit |
|---|
| 34 | # choosen by the current kernel with isaexec |
|---|
| 35 | BUILD64 = 1 |
|---|
| 36 | |
|---|
| 37 | # There are no optimized libraries |
|---|
| 38 | NOISALIST = 1 |
|---|
| 39 | |
|---|
| 40 | MKRULES_MODULES_32 = daemon/sysstatd app/sysstat |
|---|
| 41 | MKRULES_MODULES_64 = daemon/sysstatd |
|---|
| 42 | MKRULES_MODULES = $(MKRULES_MODULES_$(MEMORYMODEL)) |
|---|
| 43 | |
|---|
| 44 | MKRULES_INSTALL_32 = install_sysstatd install_sysstat |
|---|
| 45 | MKRULES_INSTALL_64 = install_sysstatd |
|---|
| 46 | MKRULES_INSTALL = $(MKRULES_INSTALL_$(MEMORYMODEL)) |
|---|
| 47 | |
|---|
| 48 | # The package doesn't have a test script |
|---|
| 49 | TEST_TARGET = |
|---|
| 50 | |
|---|
| 51 | INSTALL_SCRIPTS = custom |
|---|
| 52 | |
|---|
| 53 | # The main sysstat binary is 32 bit only, kernel access is |
|---|
| 54 | # only done via sysstatd which uses isaexec. |
|---|
| 55 | ISAEXEC_FILES = $(sbindir)/sysstatd |
|---|
| 56 | |
|---|
| 57 | PROTOTYPE_MODIFIERS = makesuid |
|---|
| 58 | PROTOTYPE_FILES_makesuid = .*/sysstatd |
|---|
| 59 | PROTOTYPE_PERMS_makesuid = 4755 |
|---|
| 60 | |
|---|
| 61 | include gar/category.mk |
|---|
| 62 | |
|---|
| 63 | # We don't have a autoconf-style configure. The configure script |
|---|
| 64 | # supplied with the package is custom made and is not flexible |
|---|
| 65 | # enough to set all necessary parameters, so we generate the |
|---|
| 66 | # resulting parametrization directly. |
|---|
| 67 | configure-custom: $(WORKSRC)/mkrules |
|---|
| 68 | @cat $< |
|---|
| 69 | @$(MAKECOOKIE) |
|---|
| 70 | |
|---|
| 71 | QUOTED_LDFLAGS = $(shell echo '$(LDFLAGS)') |
|---|
| 72 | SOLARIS = $(shell echo ${GAROSREL} | sed -e 's/5\.//') |
|---|
| 73 | |
|---|
| 74 | $(WORKSRC)/mkrules: |
|---|
| 75 | @( echo "OS = SunOS"; \ |
|---|
| 76 | echo "INSTALL = /usr/sbin/install"; \ |
|---|
| 77 | echo "CC = ${CC}"; \ |
|---|
| 78 | echo "C_CFLAGS = ${CFLAGS} -xc99=no_lib -I$(includedir)/ncurses -I$(includedir) -DSOLARIS=$(SOLARIS)"; \ |
|---|
| 79 | echo "D_CFLAGS = ${CFLAGS} -xc99=no_lib -I$(includedir)/ncurses -I$(includedir) -DSOLARIS=$(SOLARIS)"; \ |
|---|
| 80 | echo "CDIR = app"; \ |
|---|
| 81 | echo "DDIR = daemon"; \ |
|---|
| 82 | echo 'C_LIBS += $(LDFLAGS) -lncurses -lsocket -lnsl'; \ |
|---|
| 83 | echo 'LIBS = '; \ |
|---|
| 84 | echo "PREFIX = ${DESTDIR}${prefix}"; \ |
|---|
| 85 | echo "ISAEXEC = ${bindir}/isaexec"; \ |
|---|
| 86 | echo "MKDEP = ${CC} -xM1 ${CFLAGS} -I$(includedir)/ncurses -I$(includedir)"; \ |
|---|
| 87 | echo "modules: $(MKRULES_MODULES)"; \ |
|---|
| 88 | echo "install: $(MKRULES_INSTALL)"; \ |
|---|
| 89 | ) > $@ |
|---|
| 90 | |
|---|
| 91 | install-custom: |
|---|
| 92 | if [ -f $(WORKSRC)/app/sysstat ]; then ginstall -D $(WORKSRC)/app/sysstat $(DESTDIR)$(bindir)/sysstat; fi |
|---|
| 93 | # The next line installs the binary with the correct permissions, but fails if the package |
|---|
| 94 | # is build without root-permissions. Therefore the binaries are installed with default |
|---|
| 95 | # permissions which are fixed during install with the provided prototype. |
|---|
| 96 | #ginstall -D -m 04755 -o root -g bin $(WORKSRC)/daemon/sysstatd $(DESTDIR)$(sbindir)/sysstatd |
|---|
| 97 | ginstall -D $(WORKSRC)/daemon/sysstatd $(DESTDIR)$(sbindir)/sysstatd |
|---|
| 98 | ginstall -D $(WORKSRC)/sysstat.1m $(DESTDIR)$(mandir)/man1/sysstat.1m |
|---|
| 99 | @$(MAKECOOKIE) |
|---|