1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

root/csw/mgar/pkg/sysstat/trunk/Makefile

Revision 16916, 3.7 KB (checked in by dmichelsen, 4 months ago)

WHOLE TREE: Explicitly set GARTYPE to current default 'v2'

Line 
1NAME = sysstat
2VERSION = 20111025
3CATEGORIES = utils
4GARTYPE = v2
5
6DESCRIPTION = Key system statistics at a glance
7define 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.
18endef
19
20MASTER_SITES = http://www.maier-komor.de/$(NAME)/
21DISTFILES = $(NAME)-$(VERSION).tgz
22
23RUNTIME_DEP_PKGS_CSWsysstat += CSWlibncurses5
24
25VENDOR_URL = http://www.maier-komor.de/sysstat.html
26
27LICENSE = LICENSE
28
29PATCHFILES = patch-onlyisaexec-sysstatd.diff
30
31CONFIGURE_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
35BUILD64 = 1
36
37# There are no optimized libraries
38NOISALIST = 1
39
40MKRULES_MODULES_32 = daemon/sysstatd app/sysstat
41MKRULES_MODULES_64 = daemon/sysstatd
42MKRULES_MODULES = $(MKRULES_MODULES_$(MEMORYMODEL))
43
44MKRULES_INSTALL_32 = install_sysstatd install_sysstat
45MKRULES_INSTALL_64 = install_sysstatd
46MKRULES_INSTALL = $(MKRULES_INSTALL_$(MEMORYMODEL))
47
48# The package doesn't have a test script
49TEST_TARGET =
50
51INSTALL_SCRIPTS = custom
52
53# The main sysstat binary is 32 bit only, kernel access is
54# only done via sysstatd which uses isaexec.
55ISAEXEC_FILES = $(sbindir)/sysstatd
56
57PROTOTYPE_MODIFIERS = makesuid
58PROTOTYPE_FILES_makesuid = .*/sysstatd
59PROTOTYPE_PERMS_makesuid = 4755
60
61include 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.
67configure-custom: $(WORKSRC)/mkrules
68        @cat $<
69        @$(MAKECOOKIE)
70
71QUOTED_LDFLAGS = $(shell echo '$(LDFLAGS)')
72SOLARIS = $(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
91install-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)
Note: See TracBrowser for help on using the browser.