diff options
Diffstat (limited to 'x11-plugins/wmacpimon')
-rw-r--r-- | x11-plugins/wmacpimon/Manifest | 1 | ||||
-rw-r--r-- | x11-plugins/wmacpimon/files/Makefile.patch | 24 | ||||
-rw-r--r-- | x11-plugins/wmacpimon/files/wmacpimon.c.patch | 20 | ||||
-rw-r--r-- | x11-plugins/wmacpimon/files/wmacpimon.initscript | 15 | ||||
-rw-r--r-- | x11-plugins/wmacpimon/metadata.xml | 14 | ||||
-rw-r--r-- | x11-plugins/wmacpimon/wmacpimon-0.2.1.ebuild | 44 |
6 files changed, 118 insertions, 0 deletions
diff --git a/x11-plugins/wmacpimon/Manifest b/x11-plugins/wmacpimon/Manifest new file mode 100644 index 000000000000..09e4d5b5619c --- /dev/null +++ b/x11-plugins/wmacpimon/Manifest @@ -0,0 +1 @@ +DIST wmacpimon-0.2.1.tar.gz 26498 SHA256 73754555bb313a06ff1956d721aad5efa34ead013cfe10f58cddad3f04d5ed3f diff --git a/x11-plugins/wmacpimon/files/Makefile.patch b/x11-plugins/wmacpimon/files/Makefile.patch new file mode 100644 index 000000000000..aab28fc89392 --- /dev/null +++ b/x11-plugins/wmacpimon/files/Makefile.patch @@ -0,0 +1,24 @@ +--- Makefile 2010-09-06 11:33:16.000000000 +0200 ++++ Makefile.new 2010-09-06 11:36:28.000000000 +0200 +@@ -1,8 +1,5 @@ +-OPT = -O3 -DACPI +- +-CC = gcc +-CFLAGS = $(OPT) -Wall -I/usr/X11R6/include +-LDFLAGS = $(OPT) -L/usr/X11R6/lib -lX11 -lXpm -lXext ++CFLAGS += -DACPI -Wall -I/usr/X11R6/include ++LIBS = -DACPI -L/usr/X11R6/lib -lX11 -lXpm -lXext + + SRCS = wmacpimon.c libacpi.c + OBJS = wmacpimon.o libacpi.o +@@ -11,8 +8,10 @@ + all: wmacpimon wmacpimond + + wmacpimon: $(OBJS) ++ $(CC) $(LDFLAGS) -o wmacpimon $^ $(LIBS) + + wmacpimond: $(OBJZ) ++ $(CC) $(LDFLAGS) -o wmacpimond $^ $(LIBS) + + clean: + rm -f *.o *~ wmacpimon wmacpimond trace *.out *.bb *.bbg diff --git a/x11-plugins/wmacpimon/files/wmacpimon.c.patch b/x11-plugins/wmacpimon/files/wmacpimon.c.patch new file mode 100644 index 000000000000..001c1d8c96be --- /dev/null +++ b/x11-plugins/wmacpimon/files/wmacpimon.c.patch @@ -0,0 +1,20 @@ +--- wmacpimon.c 2004-07-08 14:16:22.184359328 +0200 ++++ wmacpimon.c 2004-07-08 14:15:59.677780848 +0200 +@@ -314,7 +314,7 @@ + acpinfo = calloc(1, sizeof(ACPInfo)); + dockapp->blink = OFF; + init_acpinfo(); +- strcpy(prcfile, ".wmacpimon.prc"); ++ strcpy(prcfile, "/var/tmp/wmacpimon.prc"); + + /* parse command-line options */ + while ((ch = getopt(argc, argv, "pd:b:c:s:h")) != EOF) { +@@ -345,7 +345,7 @@ + printf("wmacpimon v%s (c) 2002 Costantino Pistagna (valvoline@vrlteam.org)\n" + "usage: wmacpimon [-d] [-b] [-p] [-c] [-s]\n\n" + "-d display\tdisplay on remote display <display>\n" +- "-b value\tprcfile for wmacpimond comunication (default: ~/.wmacpimon.prc)\n" ++ "-b value\tprcfile for wmacpimond comunication (default: /var/tmp/wmacpimon.prc)\n" + "-p\t\tset powersave mode\n" + "-c value\tset critical level (default to 10)\n" + "-s value\tshutdown pc when battery value (percent) has reached\n" diff --git a/x11-plugins/wmacpimon/files/wmacpimon.initscript b/x11-plugins/wmacpimon/files/wmacpimon.initscript new file mode 100644 index 000000000000..049cac53fb34 --- /dev/null +++ b/x11-plugins/wmacpimon/files/wmacpimon.initscript @@ -0,0 +1,15 @@ +#!/sbin/runscript + +start() { + ebegin "Starting up wmacpimond daemon" + touch /var/tmp/wmacpimon.prc + start-stop-daemon --start --quiet --exec /usr/bin/wmacpimond -- /var/tmp/wmacpimon.prc >/dev/null + eend $? "Failed to start wmacpimond" +} + +stop() { + ebegin "Shutting down wmacpimond daemon" + killall wmacpimonmd &>/dev/null + rm /var/tmp/wmacpimon.prc &>/dev/null + eend $? "Failed to stop wmacpimond" +} diff --git a/x11-plugins/wmacpimon/metadata.xml b/x11-plugins/wmacpimon/metadata.xml new file mode 100644 index 000000000000..6f83e0e14cf7 --- /dev/null +++ b/x11-plugins/wmacpimon/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>desktop-dock</herd> + <longdescription> +wmacpimon is a Windowmaker dockapp that monitors +the temperature and Speedstep features in new ACPI-based systems. +It supports batteries, automatic shutdown when the power is low, +and multiple screens. +</longdescription> + <upstream> + <remote-id type="sourceforge">wmacpimon</remote-id> + </upstream> +</pkgmetadata> diff --git a/x11-plugins/wmacpimon/wmacpimon-0.2.1.ebuild b/x11-plugins/wmacpimon/wmacpimon-0.2.1.ebuild new file mode 100644 index 000000000000..999ef11e2ee1 --- /dev/null +++ b/x11-plugins/wmacpimon/wmacpimon-0.2.1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 +inherit eutils + +DESCRIPTION="WMaker DockApp that monitors the temperature and Speedstep features in new ACPI-based systems" +HOMEPAGE="http://www.vrlteam.org/wmacpimon/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86" +IUSE="" + +RDEPEND="x11-libs/libX11 + x11-libs/libXext + x11-libs/libXpm" +DEPEND="${RDEPEND} + x11-proto/xproto + x11-proto/xextproto" + +src_prepare() { + # patch wmacpimon.c file to set default path for + # wmacpimon.prc to /var/tmp/ + epatch "${FILESDIR}"/wmacpimon.c.patch + + # fix LDFLAGS ordering. See bug #248618. + # fix LDFLAGS ordering again and other stuff. See bug #336091. + epatch "${FILESDIR}"/Makefile.patch +} + +src_install() { + dobin wmacpimond wmacpimon || die "dobin failed." + dodoc AUTHORS ChangeLog README + newinitd "${FILESDIR}"/wmacpimon.initscript wmacpimon +} + +pkg_postinst() { + elog "Remember to start the wmacpimond daemon" + elog "(by issuing the \"/etc/init.d/wmacpimon start\" command)" + elog "before you attempt to run wmacpimon..." +} |