summaryrefslogtreecommitdiff
path: root/x11-plugins/wmacpimon/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-plugins/wmacpimon/files
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-plugins/wmacpimon/files')
-rw-r--r--x11-plugins/wmacpimon/files/Makefile.patch24
-rw-r--r--x11-plugins/wmacpimon/files/wmacpimon.c.patch20
-rw-r--r--x11-plugins/wmacpimon/files/wmacpimon.initscript15
3 files changed, 59 insertions, 0 deletions
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..b7972565d00d
--- /dev/null
+++ b/x11-plugins/wmacpimon/files/wmacpimon.initscript
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+
+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"
+}