diff options
author | June McEnroe <june@causal.agency> | 2022-04-03 17:59:45 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-04-03 20:56:08 -0400 |
commit | c79620a820db6b8684082345b2230b12e88a9f6c (patch) | |
tree | f6cdc41754d367ae8e645b35c1efe5c36c44368f /extra/edit | |
parent | Allow quitting pounce from clients (diff) | |
download | pounce-c79620a820db6b8684082345b2230b12e88a9f6c.tar.gz pounce-c79620a820db6b8684082345b2230b12e88a9f6c.zip |
edit: Add prospective pounce-edit(1) manual
Diffstat (limited to '')
-rw-r--r-- | extra/edit/Makefile | 28 | ||||
-rwxr-xr-x | extra/edit/configure | 44 | ||||
-rw-r--r-- | extra/edit/pounce-edit.1 | 123 |
3 files changed, 195 insertions, 0 deletions
diff --git a/extra/edit/Makefile b/extra/edit/Makefile new file mode 100644 index 0000000..8bac3a6 --- /dev/null +++ b/extra/edit/Makefile @@ -0,0 +1,28 @@ +PREFIX ?= /usr/local +BINDIR ?= ${PREFIX}/bin +MANDIR ?= ${PREFIX}/man + +CFLAGS += -std=c11 -Wall -Wextra -Wpedantic +LDADD.libtls = -ltls + +-include config.mk + +LDLIBS = ${LDADD.libtls} +OBJS = edit.o xdg.o + +all: pounce-edit + +pounce-edit: ${OBJS} + ${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@ + +clean: + rm -f ${OBJS} pounce-edit + +install: pounce-edit pounce-edit.1 + install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1 + install pounce-edit ${DESTDIR}${BINDIR} + install -m 644 pounce-edit.1 ${DESTDIR}${MANDIR}/man1 + +uninstall: + rm -f ${DESTDIR}${BINDIR}/pounce-edit + rm -f ${DESTDIR}${MANDIR}/man1/pounce-edit.1 diff --git a/extra/edit/configure b/extra/edit/configure new file mode 100755 index 0000000..e180aa5 --- /dev/null +++ b/extra/edit/configure @@ -0,0 +1,44 @@ +#!/bin/sh +set -eu + +cflags() { + echo "CFLAGS += $*" +} +defstr() { + cflags "-D'$1=\"$2\"'" +} +defvar() { + defstr "$1" "$(pkg-config --variable=$3 $2)${4:-}" +} +ldadd() { + lib=$1; shift + echo "LDADD.${lib} = $*" +} +config() { + pkg-config --print-errors "$@" + cflags $(pkg-config --cflags "$@") + for lib; do ldadd $lib $(pkg-config --libs $lib); done +} + +exec >config.mk + +for opt; do + case "${opt}" in + (--prefix=*) echo "PREFIX = ${opt#*=}" ;; + (--bindir=*) echo "BINDIR = ${opt#*=}" ;; + (--mandir=*) echo "MANDIR = ${opt#*=}" ;; + (*) echo "warning: unsupported option ${opt}" >&2 ;; + esac +done + +case "$(uname)" in + (OpenBSD) + ;; + (Linux) + cflags -D_GNU_SOURCE + config libtls + ;; + (*) + config libtls + ;; +esac diff --git a/extra/edit/pounce-edit.1 b/extra/edit/pounce-edit.1 new file mode 100644 index 0000000..eb66a95 --- /dev/null +++ b/extra/edit/pounce-edit.1 @@ -0,0 +1,123 @@ +.Dd April 3, 2022 +.Dt POUNCE-EDIT 7 +.Os +. +.Sh NAME +.Nm pounce-edit +.Nd pounce configuration over IRC +. +.Sh SYNOPSIS +.Nm +.Op Fl v +.Op Fl c Ar cert +.Op Fl h Ar host +.Op Fl k Ar priv +.Op Fl p Ar port +.Op Fl t Ar trust +.Op Fl u Ar user +.Op Fl w Ar pass +.Ar config ... +. +.Sh DESCRIPTION +The +.Nm +client provides +.Xr pounce 1 +configuration editing +over IRC. +It accepts commands +sent to the user's own nick. +It writes its changes +to the last configuration file +listed on the command line. +Configuration files +are searched for +in the same manner as +.Xr pounce 1 . +. +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl c Ar cert +Load the TLS client certificate from +.Ar cert . +If the private key +is in a separate file, +it is loaded with +.Fl k . +. +.It Fl h Ar host +Connect to +.Ar host . +The default is the value of +.Cm local-host +from the configuration files. +. +.It Fl p Ar port +Connect to +.Ar port . +The default is the value of +.Cm local-port +from the configuration files, +or 6697. +. +.It Fl t Ar trust +Trust the self-signed certificate loaded from +.Ar path +and disable server name verification. +. +.It Fl u Ar user +Set the username to +.Ar user . +The default username is +.Dq pounce-edit . +. +.It Fl v +Log IRC protocol to standard error. +. +.It Fl w Ar pass +Log in with the server password +.Ar pass . +.El +. +.Sh COMMANDS +Commands are sent as private messages +to the user's own nick. +Replies are sent as notices. +.Bl -tag -width Ds +.It Ic get Op Ar option +Show the value of an option, +or list all set options. +.It Ic restart +Restart +.Xr pounce 1 . +.It Ic set Ar option Op Ar value +Set an option. +.It Ic unset Ar option +Unset an option. +.El +. +.Sh FILES +See +.Xr pounce 1 . +. +.Sh EXAMPLES +Inherit options from +.Pa tilde.conf , +write changes to +.Pa tilde.edit : +.Bd -literal -offset indent +$ pounce tilde.conf tilde.edit +$ pounce-edit -c local.pem tilde.conf tilde.edit +.Ed +. +.Sh AUTHORS +.An June McEnroe Aq Mt june@causal.agency +. +.Sh BUGS +Send mail to +.Aq Mt list+pounce@causal.agency +or join +.Li #ascii.town +on +.Li irc.tilde.chat . |