diff options
author | cube <cube@pkgsrc.org> | 2004-02-24 22:11:28 +0000 |
---|---|---|
committer | cube <cube@pkgsrc.org> | 2004-02-24 22:11:28 +0000 |
commit | 0d50d58c8bf31e2f8f2a44e5974591e3527e73bd (patch) | |
tree | 63919ba1ebcb1510c57915c32482d6f2e0edb61c | |
parent | 226f9504570fc7124badbf037eb64baa4e63df8b (diff) | |
download | pkgsrc-0d50d58c8bf31e2f8f2a44e5974591e3527e73bd.tar.gz |
Initial import of gkrellm, version 2.1.25, into the NetBSD Package
Collection. This is the GTK+2 port of old gkrellm1.
Package imported from pkgsrc-wip.
With a single process, GKrellM manages multiple stacked monitors and supports
applying themes to match the monitors appearance to your window manager,
Gtk, or any other theme.
* SMP CPU, Disk, Proc, and active net interface monitors with LEDs.
* Internet monitor that displays current and charts historical port hits
* Memory and swap space usage meters and a system uptime monitor.
* File system meters show capacity/free space and can mount/umount.
* A mailbox monitor which can launch mail reader, remote mail fetch.
* Clock/calendar and hostname display.
* APM laptop battery monitor.
* CPU/motherboard temperature display if lm_sensors modules installed.
* Multiple monitors managed by a single process to reduce system load.
* A timer button that can execute PPP or ISDN logon/logoff scripts.
* Charts are autoscaling with configurable grid line resolution, or
can be set to a fixed scale mode.
* Separate colors for "in" and "out" data. The in color is used for
CPU user time, disk read, forks, and net receive data. The out color
is used for CPU sys time, disk write, load, and net transmit data.
* Commands can be configured to run when monitor labels are clicked.
* GKrellM is plugin capable so special interest monitors can be created.
* A different theme can be created with the GIMP.
While GKrellM monitors the host it is running on, it can poll a server
over the network. The server package is named gkrellm-server.
-rw-r--r-- | sysutils/gkrellm/DESCR | 3 | ||||
-rw-r--r-- | sysutils/gkrellm/Makefile.common | 32 | ||||
-rw-r--r-- | sysutils/gkrellm/buildlink3.mk | 20 | ||||
-rw-r--r-- | sysutils/gkrellm/files/gkrellmd.sh | 17 | ||||
-rw-r--r-- | sysutils/gkrellm/files/po.Makefile | 36 | ||||
-rw-r--r-- | sysutils/gkrellm/files/server.Makefile | 85 | ||||
-rw-r--r-- | sysutils/gkrellm/files/src.Makefile | 181 | ||||
-rw-r--r-- | sysutils/gkrellm/files/top.Makefile | 45 | ||||
-rw-r--r-- | sysutils/gkrellm/files/top.Makefile.inc | 150 | ||||
-rw-r--r-- | sysutils/gkrellm/patches/patch-af | 13 |
10 files changed, 582 insertions, 0 deletions
diff --git a/sysutils/gkrellm/DESCR b/sysutils/gkrellm/DESCR index da90c4a04d6..99d84eb0e66 100644 --- a/sysutils/gkrellm/DESCR +++ b/sysutils/gkrellm/DESCR @@ -22,3 +22,6 @@ Gtk, or any other theme. * Commands can be configured to run when monitor labels are clicked. * GKrellM is plugin capable so special interest monitors can be created. * A different theme can be created with the GIMP. + +While GKrellM monitors the host it is running on, it can poll a server +over the network. The server package is named gkrellm2-server. diff --git a/sysutils/gkrellm/Makefile.common b/sysutils/gkrellm/Makefile.common new file mode 100644 index 00000000000..3cef23b4cd3 --- /dev/null +++ b/sysutils/gkrellm/Makefile.common @@ -0,0 +1,32 @@ +# $NetBSD: Makefile.common,v 1.1.1.1 2004/02/24 22:11:28 cube Exp $ + +DISTNAME= ${GKRELLM_DISTBASE} +PKGNAME= ${GKRELLM_PKGBASE}-${GKRELLM_VERSION} +CATEGORIES= sysutils +MASTER_SITES= http://web.wt.net/~billw/gkrellm/ +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= cube@NetBSD.org +HOMEPAGE= http://gkrellm.net/ + +CONFLICTS+= gkrellm-1* + +USE_GNU_TOOLS+= make +USE_PKGLOCALEDIR= YES + +MAKE_ENV+= LOCALEDIR=${PREFIX}/${PKGLOCALEDIR}/locale + +GKRELLM_VERSION= 2.1.25 +GKRELLM_DISTBASE= gkrellm-${GKRELLM_VERSION} +GKRELLM_SRCDIR= ${WRKDIR}/${GKRELLM_DISTBASE} + +FILESDIR= ${.CURDIR}/../../sysutils/gkrellm/files +PATCHDIR= ${.CURDIR}/../../sysutils/gkrellm/patches +DISTINFO_FILE= ${.CURDIR}/../../sysutils/gkrellm/distinfo + +post-extract: + ${CP} ${FILESDIR}/top.Makefile ${WRKSRC}/Makefile + ${CP} ${FILESDIR}/top.Makefile.inc ${WRKSRC}/Makefile.inc + ${CP} ${FILESDIR}/po.Makefile ${WRKSRC}/po/Makefile + ${CP} ${FILESDIR}/server.Makefile ${WRKSRC}/server/Makefile + ${CP} ${FILESDIR}/src.Makefile ${WRKSRC}/src/Makefile diff --git a/sysutils/gkrellm/buildlink3.mk b/sysutils/gkrellm/buildlink3.mk new file mode 100644 index 00000000000..7d401a55463 --- /dev/null +++ b/sysutils/gkrellm/buildlink3.mk @@ -0,0 +1,20 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2004/02/24 22:11:28 cube Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +GKRELLM_BUILDLINK3_MK:= ${GKRELLM_BUILDLINK3_MK}+ + +.if !empty(BUILDLINK_DEPTH:M+) +BUILDLINK_DEPENDS+= gkrellm +.endif + +.if !empty(GKRELLM_BUILDLINK3_MK:M+) +BUILDLINK_PACKAGES+= gkrellm +BUILDLINK_DEPENDS.gkrellm+= gkrellm>=2.1.22 +BUILDLINK_PKGSRCDIR.gkrellm?= ../../sysutils/gkrellm +.include "../../x11/gtk2/buildlink3.mk" +.include "../../devel/glib2/buildlink3.mk" +.include "../../security/openssl/buildlink3.mk" + +.endif # GKRELLM_BUILDLINK3_MK + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/sysutils/gkrellm/files/gkrellmd.sh b/sysutils/gkrellm/files/gkrellmd.sh new file mode 100644 index 00000000000..0803909aca5 --- /dev/null +++ b/sysutils/gkrellm/files/gkrellmd.sh @@ -0,0 +1,17 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: gkrellmd.sh,v 1.1.1.1 2004/02/24 22:11:28 cube Exp $ +# + +# PROVIDE: gkrellmd +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="gkrellmd" +rcvar=$name +command="@PREFIX@/bin/gkrellmd" +gkrellmd_flags="-d" + +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/gkrellm/files/po.Makefile b/sysutils/gkrellm/files/po.Makefile new file mode 100644 index 00000000000..90c303604b2 --- /dev/null +++ b/sysutils/gkrellm/files/po.Makefile @@ -0,0 +1,36 @@ +include ../Makefile.inc + +PACKAGE?= gkrellm + +ifeq ($(ENABLE_NLS),yes) +FILES_PO:= $(wildcard *.po) +FILES_MO:= $(FILES_PO:.po=.mo) +else +FILES_MO= +endif + +all: build + +build: $(FILES_MO) + +install: $(FILES_MO) + for f in $(FILES_MO); do \ + $(INSTALL_DIR) $(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES; \ + $(INSTALL_DATA) $$f $(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo; \ + done + +uninstall: +ifneq ($(FILES_MO),) + for f in $(FILES_MO) ; do \ + rm -f $(INSTALL_PREFIX)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo ; done +endif + +clean: +ifneq ($(FILES_MO),) + $(RM) $(FILES_MO) +endif + +%.mo: %.po + $(MSGFMT) $(MSGFMT_OPT) -o $@ $< + +.PHONY: all build install clean uninstall diff --git a/sysutils/gkrellm/files/server.Makefile b/sysutils/gkrellm/files/server.Makefile new file mode 100644 index 00000000000..262a7f589ab --- /dev/null +++ b/sysutils/gkrellm/files/server.Makefile @@ -0,0 +1,85 @@ +include ../Makefile.inc + +PACKAGE_D ?= gkrellmd + +PKG_INCLUDE = `$(PKG_CONFIG) --cflags glib-2.0 gthread-2.0` +PKG_LIB = `$(PKG_CONFIG) --libs glib-2.0 gthread-2.0` + +GLIB12_INCLUDE = `glib-config --cflags gthread` +GLIB12_LIB = `glib-config --libs gthread` + +USE_GLIB12?= no +ifeq ($(glib12),1) +USE_GLIB12= yes +endif +ifeq ($(glib12),yes) +USE_GLIB12= yes +endif + +CFLAGS?= -O2 +FLAGS = -I.. $(PKG_INCLUDE) $(GTOP_INCLUDE) +ifeq ($(USE_GLIB12),yes) +FLAGS = -I.. $(GLIB12_INCLUDE) $(GTOP_INCLUDE) +endif + +FLAGS+= $(PTHREAD_INC) + +LIBS = $(PKG_LIB) $(GTOP_LIBS_D) $(SYS_LIBS) +ifeq ($(USE_GLIB12),yes) +LIBS = $(GLIB12_LIB) $(GTOP_LIBS_D) $(SYS_LIBS) +endif + +ifeq ($(DEBUG),yes) + FLAGS += -g +endif + +ifeq ($(PROFILE),yes) + FLAGS += -g -pg +endif + +ifeq ($(ENABLE_NLS),1) + FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\" +endif +ifneq ($(PACKAGE_D),gkrellmd) + FLAGS += -DPACKAGE_D=\"$(PACKAGE_D)\" +endif + +ifeq ($(HAVE_GETADDRINFO),1) + FLAGS += -DHAVE_GETADDRINFO +endif + + +override CFLAGS += -Wall $(FLAGS) + +OBJS = main.o monitor.o mail.o glib.o sysdeps-unix.o + +all: build + +build: gkrellmd + +gkrellmd static: $(OBJS) + $(CC) $(OBJS) -o gkrellmd$(if $(findstring static,$@),.static -static) $(LIBS) $(LINK_FLAGS) + +install: + $(INSTALL_DIR) $(SINSTALLDIR) + $(INSTALL_DIR) $(SMANDIR) + $(INSTALL_BIN) $(STRIP) gkrellmd $(SINSTALLDIR)/$(PACKAGE_D) + $(INSTALL_DATA) ../gkrellmd.1 $(SMANDIR)/$(PACKAGE_D).1 + +uninstall: + rm -f $(SINSTALLDIR)/$(PACKAGE_D) + rm -f $(SMANDIR)/$(PACKAGE_D).1 + +clean: + rm -f *.o *~ *.bak gkrellmd core + +SYSDEPS = ../src/sysdeps/bsd-common.c ../src/sysdeps/bsd-net-open.c \ + ../src/sysdeps/freebsd.c ../src/sysdeps/gtop.c \ + ../src/sysdeps/linux.c ../src/sysdeps/netbsd.c \ + ../src/sysdeps/openbsd.c ../src/sysdeps/solaris.c ../src/sysdeps/darwin.c + +main.o: main.c gkrellmd.h +monitor.o: monitor.c gkrellmd.h +mail.o: mail.c gkrellmd.h +glib.o: glib.c gkrellmd.h +sysdeps-unix.o: sysdeps-unix.c gkrellmd.h ../src/gkrellm-sysdeps.h $(SYSDEPS) diff --git a/sysutils/gkrellm/files/src.Makefile b/sysutils/gkrellm/files/src.Makefile new file mode 100644 index 00000000000..43c754af5f5 --- /dev/null +++ b/sysutils/gkrellm/files/src.Makefile @@ -0,0 +1,181 @@ +include ../Makefile.inc + +PACKAGE ?= gkrellm + +SMC_LIBS ?= -L$(X11BASE)/lib -Wl,-R$(X11BASE)/lib -lSM -lICE + +GKRELLM_INCLUDES = gkrellm.h gkrellm-public-proto.h + +PKG_INCLUDE = `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0` +PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0` + +CFLAGS?= -O2 +FLAGS = -I.. $(PKG_INCLUDE) $(GTOP_INCLUDE) +FLAGS+= $(PTHREAD_INC) + +ifeq ($(debug),yes) + FLAGS += -g +endif + +ifeq ($(ENABLE_NLS),yes) + FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\" +endif +ifneq ($(PACKAGE),gkrellm) + FLAGS += -DPACKAGE=\"$(PACKAGE)\" +endif + +ifeq ($(HAVE_GETADDRINFO),1) + FLAGS += -DHAVE_GETADDRINFO +endif + +WITHOUT_SSL?= no +ifeq ($(without-ssl),1) +WITHOUT_SSL= yes +endif +ifeq ($(without-ssl),yes) +WITHOUT_SSL= yes +endif +ifeq ($(WITHOUT_SSL),yes) +CONFIGURE_ARGS+= --without-ssl +endif +GREP?= grep + +DUMMY_VAR:= $(shell ./configure $(CONFIGURE_ARGS)) +HAVE_SSL= $(shell $(GREP) -c HAVE_SSL configure.h) + +ifeq ($(HAVE_SSL),1) +SSL_LIBS?= -lssl -lcrypto +NEED_MD5= no +MD5_LIBS= +endif + +LIBS = $(PKG_LIB) $(GTOP_LIBS) $(SMC_LIBS) $(SYS_LIBS) $(MD5_LIBS) $(SSL_LIBS) + +override CFLAGS += -Wall $(FLAGS) + +OBJS = main.o alerts.o battery.o base64.o clock.o cpu.o disk.o fs.o \ + hostname.o inet.o mail.o mem.o net.o proc.o sensors.o uptime.o \ + chart.o panel.o config.o gui.o krell.o plugins.o pixops.o \ + smbdes.o smbencrypt.o smbmd4.o smbutil.o \ + client.o utils.o winops-x11.o sysdeps-unix.o deprecated.o + +ifeq ($(NEED_MD5),yes) +OBJS+= md5c.c +endif + +all: build + +build: gkrellm + +gkrellm static: $(OBJS) + $(CC) $(OBJS) -o gkrellm$(if $(findstring static,$@),.static -static) $(LIBS) $(LINK_FLAGS) + +install: gkrellm + $(INSTALL_DIR) $(INSTALLDIR) + $(INSTALL_DIR) $(INCLUDEDIR)/gkrellm2 + $(INSTALL_DIR) $(MANDIR) + $(INSTALL_BIN) gkrellm $(INSTALLDIR)/$(PACKAGE) + $(INSTALL_DATA) $(GKRELLM_INCLUDES) $(INCLUDEDIR)/gkrellm2 + $(INSTALL_DATA) ../gkrellm.1 $(MANDIR)/$(PACKAGE).1 + +uninstall: + rm -f $(INSTALLDIR)/$(PACKAGE) + rm -rf $(INCLUDEDIR)/gkrellm2 + rm -f $(MANDIR)/$(PACKAGE).1 + +clean: + rm -f *.o *~ *.bak configure.h configure.log gkrellm core + +IMAGES = \ + ../pixmaps/frame_top.xpm \ + ../pixmaps/frame_bottom.xpm \ + ../pixmaps/frame_left.xpm \ + ../pixmaps/frame_right.xpm \ + \ + ../pixmaps/button_panel_out.xpm \ + ../pixmaps/button_panel_in.xpm \ + ../pixmaps/button_meter_out.xpm \ + ../pixmaps/button_meter_in.xpm \ + \ + ../pixmaps/bg_chart.xpm \ + ../pixmaps/bg_grid.xpm \ + ../pixmaps/bg_panel.xpm \ + ../pixmaps/bg_meter.xpm \ + \ + ../pixmaps/data_in.xpm \ + ../pixmaps/data_in_grid.xpm \ + ../pixmaps/data_out.xpm \ + ../pixmaps/data_out_grid.xpm \ + \ + ../pixmaps/net/decal_net_leds.xpm \ + ../pixmaps/decal_misc.xpm \ + ../pixmaps/decal_alarm.xpm \ + ../pixmaps/decal_warn.xpm \ + \ + ../pixmaps/krell_panel.xpm \ + ../pixmaps/krell_meter.xpm \ + ../pixmaps/krell_slider.xpm \ + ../pixmaps/krell_mini.xpm \ + ../pixmaps/fs/bg_panel.xpm \ + ../pixmaps/host/bg_panel.xpm \ + ../pixmaps/mail/decal_mail.xpm \ + ../pixmaps/mail/krell_mail.xpm \ + ../pixmaps/mail/krell_mail_daemon.xpm \ + ../pixmaps/timer/bg_panel.xpm \ + ../pixmaps/timer/bg_timer.xpm \ + ../pixmaps/timer/decal_timer_button.xpm \ + ../pixmaps/uptime/bg_panel.xpm \ + \ + ../pixmaps/gkrellmms/bg_panel.xpm \ + ../pixmaps/gkrellmms/spacer_top.xpm \ + ../pixmaps/gkrellmms/spacer_bottom.xpm \ + ../pixmaps/gkrellmms/bg_scroll.xpm \ + ../pixmaps/pmu/bg_panel.xpm \ + ../pixmaps/pmu/spacer_top.xpm \ + ../pixmaps/pmu/spacer_bottom.xpm \ + ../pixmaps/volume/bg_panel.xpm \ + ../pixmaps/volume/spacer_top.xpm \ + ../pixmaps/volume/spacer_bottom.xpm \ + ../pixmaps/bg_separator.xpm + +SYSDEPS_SRC = sysdeps/bsd-common.c sysdeps/bsd-net-open.c sysdeps/freebsd.c \ + sysdeps/gtop.c sysdeps/linux.c sysdeps/netbsd.c sysdeps/openbsd.c \ + sysdeps/solaris.c sysdeps/darwin.c + +GKRELLM_H = gkrellm.h gkrellm-private.h +GKRELLM_H_SYS = gkrellm.h gkrellm-public-proto.h gkrellm-private.h \ + gkrellm-sysdeps.h + +main.o: main.c $(GKRELLM_H) +alerts.o: alerts.c $(GKRELLM_H) +battery.o: battery.c $(GKRELLM_H_SYS) +base64.o: base64.c +clock.o: clock.c $(GKRELLM_H_SYS) +cpu.o: cpu.c $(GKRELLM_H_SYS) +disk.o: disk.c $(GKRELLM_H_SYS) +fs.o: fs.c $(GKRELLM_H_SYS) +hostname.o: hostname.c $(GKRELLM_H_SYS) +inet.o: inet.c $(GKRELLM_H_SYS) +mail.o: mail.c md5.h md5global.h ntlm.h $(GKRELLM_H_SYS) +md5c.o: md5.h md5global.h +smbdes.o: smbdes.h +smbencrypt.o: smbbyteorder.h smbdes.h smbmd4.h +smbmd4.o: smbmd4.h +smbutil.o: ntlm.h smbencrypt.h smbbyteorder.h +mem.o: mem.c $(GKRELLM_H_SYS) +net.o: net.c $(GKRELLM_H_SYS) +proc.o: proc.c $(GKRELLM_H_SYS) +sensors.o: sensors.c $(GKRELLM_H_SYS) ../pixmaps/sensors/bg_volt.xpm +uptime.o: uptime.c $(GKRELLM_H_SYS) +chart.o: chart.c $(GKRELLM_H) +panel.o: panel.c $(GKRELLM_H) +config.o: config.c $(GKRELLM_H) $(IMAGES) +krell.o: krell.c $(GKRELLM_H) +gui.o: gui.c $(GKRELLM_H) +plugins.o: plugins.c $(GKRELLM_H) +pixops.o: pixops.c $(GKRELLM_H) +client.o: client.c $(GKRELLM_H) +utils.o: utils.c $(GKRELLM_H) +sysdeps-unix.o: sysdeps-unix.c $(GKRELLM_H_SYS) $(SYSDEPS_SRC) +winops-x11.o: winops-x11.c $(GKRELLM_H) +deprecated.o: deprecated.c $(GKRELLM_H) diff --git a/sysutils/gkrellm/files/top.Makefile b/sysutils/gkrellm/files/top.Makefile new file mode 100644 index 00000000000..271c4eee287 --- /dev/null +++ b/sysutils/gkrellm/files/top.Makefile @@ -0,0 +1,45 @@ +include Makefile.inc + +MODULES?= po src server + +all: gkrellm.pc build + +gkrellm.pc: +ifneq ($(findstring src,$(MODULES)),) + echo "prefix=$(INSTALLROOT)" > gkrellm.pc + echo "Name: GKrellM" >> gkrellm.pc + echo "Description: Extensible GTK system monitoring application" >> gkrellm.pc + echo "Version: $(VERSION)" >> gkrellm.pc + echo "Requires: gtk+-2.0 >= 2.0.0" >> gkrellm.pc + echo "Cflags: -I$(INCLUDEDIR)" >> gkrellm.pc +endif + +install: install-rec install_gkrellm.pc + +build: build-rec +clean: clean-rec + +build-rec install-rec clean-rec uninstall-rec: + for subdir in $(MODULES); do \ + cd $$subdir && \ + $(MAKE) $(patsubst %-rec,%,$@) MODULE=$$subdir GTOP=$(GTOP) || exit 1; \ + cd ..; \ + done + +install_gkrellm.pc: +ifneq ($(findstring src,$(MODULES)),) + $(INSTALL_DIR) $(PKGCONFIGDIR) + $(INSTALL_DATA) gkrellm.pc $(PKGCONFIGDIR) +endif + +uninstall: uninstall-req +ifneq ($(findstring src,$(MODULES)),) + rm -f $(PKGCONFIGDIR)/gkrellm.pc +endif + +gtop gnome-gtop gtop-1.0: + $(MAKE) build MODULES="$(MODULES)" GTOP=$@ + +.PHONY: all build intall install_mod install_gkrellm.pc clean \ + install-rec build-rec clean-rec uninstall uninstall-rec \ + gtop gnome-gtop gtop-1.0 diff --git a/sysutils/gkrellm/files/top.Makefile.inc b/sysutils/gkrellm/files/top.Makefile.inc new file mode 100644 index 00000000000..d8661b93ab8 --- /dev/null +++ b/sysutils/gkrellm/files/top.Makefile.inc @@ -0,0 +1,150 @@ +VERSION= 2.1.25 + +# Path options +PREFIX?= /usr/local +X11BASE?= /nonexistent +INSTALLROOT?= $(DESTDIR)$(PREFIX) +INSTALLDIR?= $(INSTALLROOT)/bin +INCLUDEDIR?= $(INSTALLROOT)/include +LOCALEDIR?= $(INSTALLROOT)/share/locale +PKGCONFIGDIR?= $(INSTALLROOT)/lib/pkgconfig +MANDIR?= $(INSTALLROOT)/man/man1 +SMANDIR?= $(INSTALLROOT)/man/man1 +SINSTALLDIR?= $(INSTALLROOT)/bin + +# Ownership and mode options +DATAMODE?= 0644 +BINMODE?= 0755 +BINOWNER?= root +BINGROUP?= root + +# Tools paths +MSGFMT?= msgfmt +MSGFMT_OPT?= -f -v +INSTALL?= install +PKG_CONFIG?= pkg-config +STRIP?= -s + +# Helpers +INSTALL_DIR= $(INSTALL) -d +INSTALL_DATA= $(INSTALL) -c -m $(DATAMODE) +INSTALL_BIN= $(INSTALL) -c -m $(BINMODE) -o $(BINOWNER) -g $(BINGROUP) + +# Compilation options +ENABLE_NLS?= yes +DEBUG?= no +PROFILE?= no +NEED_MD5?= yes +MD5_LIBS?= +GKRELLM_CFLAGS?= +GTOP?= + +# Vanilla GKrellM compatibility +ifeq ($(enable_nls),1) +ENABLE_NLS= yes +endif +ifeq ($(enable_nls),yes) +ENABLE_NLS= yes +endif +ifeq ($(debug),1) +DEBUG= yes +endif +ifeq ($(debug),yes) +DEBUG= yes +endif +ifeq ($(profile),1) +PROFILE= yes +endif +ifeq ($(profile),yes) +PROFILE= yes +endif + +ifeq ($(GTOP),) +# OS-specific overrides +SUPPORTED_OSES= Linux NetBSD FreeBSD OpenBSD Darwin Solaris + +REALOPSYS= $(shell uname -s) +OPSYS= $(if $(findstring $(REALOPSYS),$(SUPPORTED_OSES)),$(REALOPSYS),Linux) +OSREV= $(shell uname -r) + +# Isn't this ugly? + +ifeq ($(OPSYS),NetBSD) +SYS_LIBS= -lkvm +BINGROUP= kmem +NEED_MD5= no +MD5_LIBS= +else + ifeq ($(OPSYS),OpenBSD) +SYS_LIBS= -lkvm -pthread +BINGROUP= kmem + else + ifeq ($(OPSYS),FreeBSD) +BINGROUP= kmem +NEED_MD5= no +MD5_LIBS= -lmd + ifeq ($(filter 2.%,$(OSREV)),) +SYS_LIBS= -lkvm -ldevstat + else +SYS_LIBS= -lkvm + endif + else + ifeq ($(OPSYS),Darwin) +SYS_LIBS= -lkvm -framework IOKit +LINK_FLAGS+= -prebind -Wl,-bind_at_load -framework CoreFoundation -lX11 +GTK_CONFIG= gtk-config +STRIP= +NEED_MD5= no +MD5_LIBS= -lmd5 + ifeq ($(MODULE),src) +LINK_FLAGS+= -lX11 + endif + else + ifeq ($(OPSYS),Solaris) +MSGFMT_OPT= -v +CC?= gcc +GKRELLM_CFLAGS= -Wno-implicit-int +SYS_LIBS= -lkstat -lkvm -ldevinfo + ifeq ($(OSREV),5.8) +LINK_FLAGS= +SYS_LIBS+= -lsocket -lintl + ifeq ($(MODULE),src) +SYS_LIBS+= -lresolv -lX11 + else # Well, we don't really care about po +SYS_LIBS+= -lnsl +GKRELLM_CFLAGS= -DSOLARIS_8 + endif + else + ifeq ($(MODULE),src) +SYS_LIBS+= -lresolv + else +SYS_LIBS+= -lsocket -lnsl + endif + endif + endif + endif + endif + endif +endif +else # GTOP +LINK_FLAGS= +MD5_LIBS= + ifeq ($(GTOP), gnome-gtop) +SYS_LIBS= `gnome-config --libs libgtop` +GKRELLM_CFLAGS= `gnome-config --cflags libgtop` + else + ifeq ($(GTOP), gtop) +SYS_LIBS= `libgtop-config --libs` +GKRELLM_CFLAGS= `libgtop-config --cflags` + else # gtop1.0 by default +GTOP_PREFIX?= /usr +GKRELLM_CFLAGS= -I$(GTOP_PREFIX)/include +SYS_LIBS= -L$(GTOP_PREFIX)/lib -lgtop -lgtop_common -lgtop_sysdeps + ifeq ($(MODULE),src) +SYS_LIBS+= -lXau + endif + endif + endif +endif + +CFLAGS+= $(GKRELLM_CFLAGS) diff --git a/sysutils/gkrellm/patches/patch-af b/sysutils/gkrellm/patches/patch-af new file mode 100644 index 00000000000..0db2e3fb6a4 --- /dev/null +++ b/sysutils/gkrellm/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1.1.1 2004/02/24 22:11:28 cube Exp $ + +--- server/gkrellmd.h.orig 2003-03-29 03:34:13.000000000 +0100 ++++ server/gkrellmd.h +@@ -143,7 +143,7 @@ extern int errno; + #define GKRELLMD_CONFIG "gkrellmd.conf" + + #if !defined(WIN32) +-#define GKRELLMD_SYS_ETC "/etc" ++#define GKRELLMD_SYS_ETC "@@PREFIX@@/etc" + #define GKRELLMD_LOCAL_ETC "/usr/local/etc" + #endif + |