From ffffcb92410663c8068644fd0662b3c0446eb255 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Mon, 18 Aug 2014 17:56:32 -0500 Subject: [PATCH] wmacpi: Rename acpi to wmacpi-cli. To avoid conflict with acpiclient (http://sourceforge.net/projects/acpiclient/), which also provides an executable binary named acpi, the acpi binary included with wmacpi is being renamed to wmacpi-cli. Based on the patch from Debian: http://sources.debian.net/src/wmacpi/2.2~rc5%2Bds-1/debian/patches/rename_acpi_to_wmacpi-cli.patch/ --- wmacpi/Makefile | 8 ++++---- wmacpi/{acpi.1 => wmacpi-cli.1} | 0 wmacpi/{acpi.c => wmacpi-cli.c} | 2 +- wmacpi/wmacpi.1 | 11 +++++------ 4 files changed, 10 insertions(+), 11 deletions(-) rename wmacpi/{acpi.1 => wmacpi-cli.1} (100%) rename wmacpi/{acpi.c => wmacpi-cli.c} (98%) diff --git a/wmacpi/Makefile b/wmacpi/Makefile index 7afeac8..acfde2d 100644 --- a/wmacpi/Makefile +++ b/wmacpi/Makefile @@ -22,8 +22,8 @@ targets := wmacpi doc_targets := wmacpi.1 ifdef BUILD_CLI -targets += acpi -doc_targets += acpi.1 +targets += wmacpi-cli +doc_targets += wmacpi-cli.1 endif PREFIX := /usr/local @@ -42,11 +42,11 @@ wmacpi: $(WMOBJ) # for the Debian package, we want to make building the command line tools # optional. So, we hide all the necessary stuff here . . . ifdef BUILD_CLI -CLSRC := acpi.c libacpi.c +CLSRC := wmacpi-cli.c libacpi.c CLOBJ := $(patsubst %.c,%.o,$(filter %.c,$(CLSRC))) -include $(CLOBJ:.o=.d) -acpi: $(CLOBJ) +wmacpi-cli: $(CLOBJ) $(CC) $(LDFLAGS) -o $@ $^ endif diff --git a/wmacpi/acpi.1 b/wmacpi/wmacpi-cli.1 similarity index 100% rename from wmacpi/acpi.1 rename to wmacpi/wmacpi-cli.1 diff --git a/wmacpi/acpi.c b/wmacpi/wmacpi-cli.c similarity index 98% rename from wmacpi/acpi.c rename to wmacpi/wmacpi-cli.c index 4ecb1c0..3fa6fa2 100644 --- a/wmacpi/acpi.c +++ b/wmacpi/wmacpi-cli.c @@ -45,7 +45,7 @@ void usage(char *name) void print_version(void) { - printf("acpi version %s\n", ACPI_VER); + printf("wmacpi-cli version %s\n", ACPI_VER); printf(" Using libacpi version %s\n", LIBACPI_VER); } diff --git a/wmacpi/wmacpi.1 b/wmacpi/wmacpi.1 index 93cf646..26c18ed 100644 --- a/wmacpi/wmacpi.1 +++ b/wmacpi/wmacpi.1 @@ -2,7 +2,7 @@ .SH NAME wmacpi \- Battery status monitor for systems supporting ACPI .SH NAME -acpi \- Query battery status for systems supporting ACPI +wmacpi-cli \- Query battery status for systems supporting ACPI .SH SYNOPSIS .B wmacpi [ @@ -39,7 +39,7 @@ samples ] .RI -h ] .PP -.B acpi +.B wmacpi-cli [ .RI -a samples ] @@ -77,7 +77,7 @@ and a scrolling message with some hopefully useful information. Clicking on the window cycles through the batteries that the ACPI system knows about. .PP -.B acpi +.B wmacpi-cli queries the battery status from the command line. It prints the power status, the percentage remaining for each battery found, and the time remaining if the system is on battery, or the time remaining for each @@ -115,8 +115,7 @@ rate. .TP .B \-x, --cmdline Run wmacpi in command line mode - this operates identically to -.B acpi -.. +.B wmacpi-cli\&. .TP .B \-a, --samples=samples Average the time remaining over num samples. This greatly improves the @@ -136,7 +135,7 @@ Disable scrolling message. .B \-h, --help Display help. .TP -.B acpi +.B wmacpi-cli .TP .B \-a num Average the time remaining over num samples. This greatly improves the