[Pkg-wmaker-commits] [wmacpi] 87/105: debian/patches: Remove patches; applied upstream.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Tue Aug 18 01:13:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmacpi.
commit db1e1aaa6cf3213f5991ea71fe363a7beb37e02f
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Fri Aug 22 17:28:12 2014 -0500
debian/patches: Remove patches; applied upstream.
---
debian/patches/fix_compiler_flags.patch | 36 ---
debian/patches/install_manpages_to_usr_share.patch | 20 --
debian/patches/rename_acpi_to_wmacpi-cli.patch | 349 ---------------------
debian/patches/series | 3 -
4 files changed, 408 deletions(-)
diff --git a/debian/patches/fix_compiler_flags.patch b/debian/patches/fix_compiler_flags.patch
deleted file mode 100644
index f855cd7..0000000
--- a/debian/patches/fix_compiler_flags.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Description: Fix compiler flags
- Fix Makefile so that CFLAGS and LDFLAGS are not overwritten. Compile
- with CFLAGS and CPPFLAGS.
-
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
---- a/Makefile
-+++ b/Makefile
-@@ -13,8 +13,8 @@
- #OPT = -pg -g
-
- CC := gcc
--CFLAGS := $(OPT) -Wall -W -g -ansi -I/usr/X11R6/include
--LDFLAGS := $(OPT) -lX11 -ldockapp
-+CFLAGS += $(OPT) -Wall -W -g -ansi -I/usr/X11R6/include
-+LDFLAGS += $(OPT) -lX11 -ldockapp
-
- WMSRC := wmacpi.c libacpi.c
- HEADERS := libacpi.h wmacpi.h
-@@ -37,7 +37,7 @@
- -include $(WMOBJ:.o=.d)
-
- wmacpi: $(WMOBJ)
-- $(CC) -o $@ $^ $(LDFLAGS)
-+ $(CC) -o $@ $^ $(LDFLAGS) $(CFLAGS) $(CPPFLAGS)
-
- # for the Debian package, we want to make building the command line tools
- # optional. So, we hide all the necessary stuff here . . .
-@@ -47,7 +47,7 @@
- -include $(CLOBJ:.o=.d)
-
- acpi: $(CLOBJ)
-- $(CC) $(LDFLAGS) -o $@ $^
-+ $(CC) $(LDFLAGS) -o $@ $^ $(CFLAGS) $(CPPFLAGS)
- endif
-
- # build per-file dependencies - note that -MM may not be supported
diff --git a/debian/patches/install_manpages_to_usr_share.patch b/debian/patches/install_manpages_to_usr_share.patch
deleted file mode 100644
index 0f30b05..0000000
--- a/debian/patches/install_manpages_to_usr_share.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: Install manpages to /usr/share/man/man1.
- By default, the manpages are installed in /usr/man/man1, which does not
- conform to the Filesystem Hierarchy Standard. This patch installs them
- correctly to /usr/share/man/man1.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: <2014-07-21>
-
---- wmacpi-2.2~rc5.orig/Makefile
-+++ wmacpi-2.2~rc5/Makefile
-@@ -64,8 +64,8 @@ clean-all: clean
- install: $(targets)
- install -d $(PREFIX)/bin/
- install -pc $(targets) $(PREFIX)/bin/
-- install -d $(PREFIX)/man/man1/
-- install -pc $(doc_targets) $(PREFIX)/man/man1/
-+ install -d $(PREFIX)/share/man/man1/
-+ install -pc $(doc_targets) $(PREFIX)/share/man/man1/
-
- tags:
- etags $(WMSRC) $(CLSRC) $(HEADERS)
diff --git a/debian/patches/rename_acpi_to_wmacpi-cli.patch b/debian/patches/rename_acpi_to_wmacpi-cli.patch
deleted file mode 100644
index 41a409d..0000000
--- a/debian/patches/rename_acpi_to_wmacpi-cli.patch
+++ /dev/null
@@ -1,349 +0,0 @@
-Description: Rename acpi to wmacpi-cli.
- To avoid conflict with the acpi package, which also provides /usr/bin/acpi,
- the acpi binary file provided with this package is being renamed to wmacpi-cli.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: <2014-07-28>
-
---- a/acpi.c
-+++ /dev/null
-@@ -1,129 +0,0 @@
--/*
-- * acpi-ng: command line acpi battery status tool.
-- *
-- * Written by Simon Fowler <simon at dreamcraft.com.au>, 2003-06-20.
-- * Copyright 2003-06-20 Dreamcraft Pty Ltd.
-- *
-- * This file is distributed under the GNU General Public License,
-- * version 2. Please see the COPYING file for details.
-- */
--
--/*
-- * 2003-06-20.
-- * I'm getting sick of not having a convenient way to query battery
-- * status on the command line, so I'm hacking up this - a quick little
-- * command line tool to display current battery status, using the same
-- * libacpi code as wmacpi-ng.
-- */
--
--#define _GNU_SOURCE
--
--#include <stdio.h>
--#include <stdlib.h>
--#include <string.h>
--#include <getopt.h>
--#include <unistd.h>
--
--#include "libacpi.h"
--
--#define ACPI_VER "2.2rc5"
--
--global_t *globals;
--
--void usage(char *name)
--{
-- printf("%s: query battery status on ACPI enabled systems.\n"
-- "Usage:\n"
-- "%s [-h] [-a samples]\n"
-- " h - display this help information\n"
-- " a - average remaining time over some number of samples\n"
-- " much more accurate than using a single sample\n"
-- " V - increase verbosity\n"
-- " v - print version information\n",
-- name, name);
--}
--
--void print_version(void)
--{
-- printf("acpi version %s\n", ACPI_VER);
-- printf(" Using libacpi version %s\n", LIBACPI_VER);
--}
--
--int main(int argc, char *argv[])
--{
-- int i, j, ch;
-- int sleep_time = 0;
-- int samples = 1;
-- battery_t *binfo;
-- adapter_t *ap;
--
-- while((ch = getopt(argc, argv, "hvVa:")) != EOF) {
-- switch(ch) {
-- case 'h':
-- usage(argv[0]);
-- return 0;
-- case 'V':
-- verbosity++;
-- break;
-- case 'v':
-- print_version();
-- return 0;
-- case 'a':
-- if(optarg != NULL) {
-- samples = atoi(optarg);
-- if(samples > 1000 || samples <= 0) {
-- fprintf(stderr, "Please specify a reasonable number of samples\n");
-- exit(1);
-- }
-- }
-- pinfo("samples: %d\n", samples);
-- sleep_time = 1000000/samples;
-- break;
-- default:
-- usage(argv[0]);
-- return 1;
-- }
-- }
--
-- globals = (global_t *) malloc(sizeof(global_t));
--
-- power_init(globals);
-- /* we want to acquire samples over some period of time, so . . . */
-- for(i = 0; i < samples + 2; i++) {
-- for(j = 0; j < globals->battery_count; j++)
-- acquire_batt_info(globals, j);
-- acquire_global_info(globals);
-- usleep(sleep_time);
-- }
--
-- ap = &globals->adapter;
-- if(ap->power == AC) {
-- printf("On AC Power");
-- for(i = 0; i < globals->battery_count; i++) {
-- binfo = &batteries[i];
-- if(binfo->present && (binfo->charge_state == CHARGE)) {
-- printf("; Battery %s charging", binfo->name);
-- printf(", currently at %2d%%", binfo->percentage);
-- if(binfo->charge_time >= 0)
-- printf(", %2d:%02d remaining",
-- binfo->charge_time/60,
-- binfo->charge_time%60);
-- }
-- }
-- printf("\n");
-- } else if(ap->power == BATT) {
-- printf("On Battery");
-- for(i = 0; i < globals->battery_count; i++) {
-- binfo = &batteries[i];
-- if(binfo->present && (binfo->percentage >= 0))
-- printf(", Battery %s at %d%%", binfo->name,
-- binfo->percentage);
-- }
-- if(globals->rtime >= 0)
-- printf("; %d:%02d remaining", globals->rtime/60,
-- globals->rtime%60);
-- printf("\n");
-- }
-- return 0;
--}
--
---- a/wmacpi.1
-+++ b/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 @@
- .RI -h
- ]
- .PP
--.B acpi
-+.B wmacpi-cli
- [
- .RI -a
- samples ]
-@@ -77,7 +77,7 @@
- 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 @@
- .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 @@
- .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
---- a/Makefile
-+++ b/Makefile
-@@ -22,8 +22,8 @@
- 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 @@
- # 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 $@ $^ $(CFLAGS) $(CPPFLAGS)
- endif
-
---- /dev/null
-+++ b/wmacpi-cli.1
-@@ -0,0 +1 @@
-+.so man1/wmacpi.1
---- /dev/null
-+++ b/wmacpi-cli.c
-@@ -0,0 +1,129 @@
-+/*
-+ * acpi-ng: command line acpi battery status tool.
-+ *
-+ * Written by Simon Fowler <simon at dreamcraft.com.au>, 2003-06-20.
-+ * Copyright 2003-06-20 Dreamcraft Pty Ltd.
-+ *
-+ * This file is distributed under the GNU General Public License,
-+ * version 2. Please see the COPYING file for details.
-+ */
-+
-+/*
-+ * 2003-06-20.
-+ * I'm getting sick of not having a convenient way to query battery
-+ * status on the command line, so I'm hacking up this - a quick little
-+ * command line tool to display current battery status, using the same
-+ * libacpi code as wmacpi-ng.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <getopt.h>
-+#include <unistd.h>
-+
-+#include "libacpi.h"
-+
-+#define ACPI_VER "2.2rc5"
-+
-+global_t *globals;
-+
-+void usage(char *name)
-+{
-+ printf("%s: query battery status on ACPI enabled systems.\n"
-+ "Usage:\n"
-+ "%s [-h] [-a samples]\n"
-+ " h - display this help information\n"
-+ " a - average remaining time over some number of samples\n"
-+ " much more accurate than using a single sample\n"
-+ " V - increase verbosity\n"
-+ " v - print version information\n",
-+ name, name);
-+}
-+
-+void print_version(void)
-+{
-+ printf("wmacpi-cli version %s\n", ACPI_VER);
-+ printf(" Using libacpi version %s\n", LIBACPI_VER);
-+}
-+
-+int main(int argc, char *argv[])
-+{
-+ int i, j, ch;
-+ int sleep_time = 0;
-+ int samples = 1;
-+ battery_t *binfo;
-+ adapter_t *ap;
-+
-+ while((ch = getopt(argc, argv, "hvVa:")) != EOF) {
-+ switch(ch) {
-+ case 'h':
-+ usage(argv[0]);
-+ return 0;
-+ case 'V':
-+ verbosity++;
-+ break;
-+ case 'v':
-+ print_version();
-+ return 0;
-+ case 'a':
-+ if(optarg != NULL) {
-+ samples = atoi(optarg);
-+ if(samples > 1000 || samples <= 0) {
-+ fprintf(stderr, "Please specify a reasonable number of samples\n");
-+ exit(1);
-+ }
-+ }
-+ pinfo("samples: %d\n", samples);
-+ sleep_time = 1000000/samples;
-+ break;
-+ default:
-+ usage(argv[0]);
-+ return 1;
-+ }
-+ }
-+
-+ globals = (global_t *) malloc(sizeof(global_t));
-+
-+ power_init(globals);
-+ /* we want to acquire samples over some period of time, so . . . */
-+ for(i = 0; i < samples + 2; i++) {
-+ for(j = 0; j < globals->battery_count; j++)
-+ acquire_batt_info(globals, j);
-+ acquire_global_info(globals);
-+ usleep(sleep_time);
-+ }
-+
-+ ap = &globals->adapter;
-+ if(ap->power == AC) {
-+ printf("On AC Power");
-+ for(i = 0; i < globals->battery_count; i++) {
-+ binfo = &batteries[i];
-+ if(binfo->present && (binfo->charge_state == CHARGE)) {
-+ printf("; Battery %s charging", binfo->name);
-+ printf(", currently at %2d%%", binfo->percentage);
-+ if(binfo->charge_time >= 0)
-+ printf(", %2d:%02d remaining",
-+ binfo->charge_time/60,
-+ binfo->charge_time%60);
-+ }
-+ }
-+ printf("\n");
-+ } else if(ap->power == BATT) {
-+ printf("On Battery");
-+ for(i = 0; i < globals->battery_count; i++) {
-+ binfo = &batteries[i];
-+ if(binfo->present && (binfo->percentage >= 0))
-+ printf(", Battery %s at %d%%", binfo->name,
-+ binfo->percentage);
-+ }
-+ if(globals->rtime >= 0)
-+ printf("; %d:%02d remaining", globals->rtime/60,
-+ globals->rtime%60);
-+ printf("\n");
-+ }
-+ return 0;
-+}
-+
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 7df00e8..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-fix_compiler_flags.patch
-rename_acpi_to_wmacpi-cli.patch
-install_manpages_to_usr_share.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmacpi.git
More information about the Pkg-wmaker-commits
mailing list