summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-11-05 15:33:13 -0400
committerB. Stack <bgstack15@gmail.com>2022-11-05 15:34:09 -0400
commit3c6d0bf3fd3ebce3a248a627383737e69a700317 (patch)
tree1e595a8b1fba7ae58f7c594179063abf16601502 /src
parentinitial commit (diff)
downloadstackrpms-thinkpad-p50s-3c6d0bf3fd3ebce3a248a627383737e69a700317.tar.gz
stackrpms-thinkpad-p50s-3c6d0bf3fd3ebce3a248a627383737e69a700317.tar.bz2
stackrpms-thinkpad-p50s-3c6d0bf3fd3ebce3a248a627383737e69a700317.zip
add man pages
Diffstat (limited to 'src')
-rw-r--r--src/Makefile111
-rwxr-xr-xsrc/usr/bin/hwset-thinkpad-p50s2
-rwxr-xr-xsrc/usr/bin/netmounts-trayicon2
-rwxr-xr-xsrc/usr/bin/vpn-trayicon2
-rw-r--r--src/usr/share/man/man1/hwset-thinkpad-p50s.1.txt28
-rw-r--r--src/usr/share/man/man1/netmounts-off.1.txt22
-rw-r--r--src/usr/share/man/man1/netmounts-on.1.txt22
-rw-r--r--src/usr/share/man/man1/netmounts-trayicon.1.txt22
-rw-r--r--src/usr/share/man/man1/vpn-off.1.txt22
-rw-r--r--src/usr/share/man/man1/vpn-on.1.txt22
-rw-r--r--src/usr/share/man/man1/vpn-trayicon.1.txt22
11 files changed, 274 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..503527f
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,111 @@
+# File: Makefile for stackrpms-thinkpad-p50s
+# Location: stackrpms-thinkpad-p50s source package
+# Author: bgstack15
+# Startdate: 2022-11-04
+# Title: Makefile for stackrpms-thinkpad-p50s source package
+# Purpose: To use traditional Unix make utility
+# History:
+# 2022-11-04 forked from bgscripts Makefile
+# Usage:
+# Reference:
+# bgscripts Makefile
+# Improve:
+# Document:
+# Dependencies:
+# build-devuan: txt2man
+
+APPNAME = stackrpms-thinkpad-p50s
+APPVERSION = 0.0.1
+SRCDIR = $(CURDIR)
+prefix = /usr
+SYSCONFDIR = $(DESTDIR)/etc
+DEFAULTDIR = $(DESTDIR)/etc/sysconfig
+# for debian use DEFAULTDIR = $(DESTDIR)/etc/default
+BINDIR = $(DESTDIR)$(prefix)/bin
+LIBEXECDIR = $(DESTDIR)$(prefix)/libexec
+SBINDIR = $(DESTDIR)$(prefix)/sbin
+SHAREDIR = $(DESTDIR)$(prefix)/share
+DOCDIR = $(SHAREDIR)/doc/$(APPNAME)
+APPDIR = $(SHAREDIR)/$(APPNAME)
+APPSDIR = $(SHAREDIR)/applications
+ICONSDIR = $(SHAREDIR)/icons
+MIMEDIR = $(SHAREDIR)/mime
+MANDIR = $(SHAREDIR)/man
+XDGAUTODIR = $(SYSCONFDIR)/xdg/autostart
+SYSVDIR = $(SYSCONFDIR)/init.d
+SYSDDIR = $(DESTDIR)$(prefix)/lib/systemd/system
+
+# variables for deplist
+DEPTYPE = dep
+SEPARATOR = ,
+
+awkbin :=$(shell which awk)
+chmodbin :=$(shell which chmod)
+cpbin :=$(shell which cp)
+echobin :=$(shell which echo)
+falsebin :=$(shell which false)
+findbin :=$(shell which find)
+grepbin :=$(shell which grep)
+gzipbin :=$(shell which gzip)
+installbin :=$(shell which install)
+rmbin :=$(shell which rm)
+rmdirbin :=$(shell which rmdir)
+sedbin :=$(shell which sed)
+sortbin :=$(shell which sort)
+truebin :=$(shell which true)
+txt2manwrapper :=$(shell which txt2man-wrapper)
+uniqbin :=$(shell which uniq)
+xargsbin :=$(shell which xargs)
+
+with_man ?= YES
+
+all: build_man
+
+ifeq ($(with_man),YES)
+install: build_man install_files
+else
+install: install_files
+endif
+
+.PHONY: clean install install_files build_man uninstall list deplist deplist_opts
+
+list:
+ @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | ${awkbin} -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | ${sortbin} | ${grepbin} -E -v -e '^[^[:alnum:]]' -e '^$@$$'
+
+deplist:
+ @# deplist 2020-04-18 input must be comma separated
+ @# DEPTYPE( dep , rec , sug ) for depends, recommends, or suggests
+ @if test -z "${DISTRO}" ; then ${echobin} "Please run \`make deplist\` with DISTRO= one of: `make deplist_opts 2>&1 1>/dev/null | ${xargsbin}`. Aborted." 1>&2 ; exit 1 ; fi
+ @if ! ${echobin} "${DEPTYPE}" | grep -qE "^(dep|rec|sug)$$" ; then ${echobin} "Please run \`make deplist\` with DEPTYPE= one of: dep, rec, sug. Undefined will use \`dep\`. Aborted." 1>&2 ; exit 1; fi
+ @${grepbin} -h --exclude-dir='doc' -riIE "\<${DEPTYPE}-" ${SRCDIR} | ${awkbin} -v "domain=${DISTRO}" -v "deptype=${DEPTYPE}" 'tolower($$2) ~ deptype"-"domain {$$1="";$$2="";print}' | tr ',' '\n' | ${sortbin} | ${uniqbin} | ${sedbin} -r -e 's/^\s*//' -e "s/\s*\$$/${SEPARATOR}/" | ${xargsbin}
+
+deplist_opts:
+ @# deplist_opts 2020-04-18 find all available dependency domains
+ @${grepbin} -h -o -riIE '\<(dep|rec|sug)-[^\ :]+:' ${SRCDIR} | ${sedbin} -r -e 's/(dep|rec|sug)-//;' -e 's/:$$//;' | ${sortbin} | ${uniqbin} 1>&2
+
+install_files:
+ @ls usr/share/man/man*/*gz 1>/dev/null 2>&1 && echo "Including man pages." || :
+ @${echobin} Installing files to ${DESTDIR}
+ for td in $$( ${findbin} ${SRCDIR} -type d ! -name '.*.swp' ! -name 'Makefile' -printf '%P\n' | ${sedbin} -r -e "s:etc/sysconfig:${DEFAULTDIR}:" -e "s:${DESTDIR}/?::" ) ; do ${installbin} -m0755 -d ${DESTDIR}/$${td} ; done
+ for tf in $$( ${findbin} ${SRCDIR} ! -type d ! -name '.*.swp' ! -name 'Makefile' ! \( -path '*/man/*' -name '*.txt' \) ! -path '*/sysconfig/*' -printf '%P\n' ) ; do MODE=0644 ; echo "$${tf}" | grep -qE "(bin|libexec|deprecated)/" && MODE=0755 ; ${installbin} -m$${MODE} ${SRCDIR}/$${tf} ${DESTDIR}/$${tf} ; done
+ @# sysconfig/default dir
+ test -f "$( echo ${SRCDIR}/etc/sysconfig/* 2>/dev/null | head -n1 )" && { ${installbin} -m0644 -t ${DEFAULTDIR} ${SRCDIR}/etc/sysconfig/* ; } || :
+
+MAN_TXT:=$(wildcard usr/share/man/man*/*.txt)
+MAN_GZ:= $(subst .txt,.gz,$(MAN_TXT))
+
+build_man: $(MAN_GZ)
+
+$(MAN_GZ): %.gz: %.txt
+ ${txt2manwrapper} - < $< | ${gzipbin} > $@
+
+uninstall:
+ @${echobin} SRCDIR=${SRCDIR}
+ ${rmbin} -f $$( ${findbin} ${SRCDIR} -mindepth 1 ! -type d -printf '%p\n' | ${sedbin} -r -e "s:/etc/sysconfig:${DEFAULTDIR}:" -e "s:^${SRCDIR}:${DESTDIR}:" -e "s:${DESTDIR}${DESTDIR}:${DESTDIR}:" )
+
+ # remove all installed directories that are now blank.
+ ${rmdirbin} ${DEFAULTDIR} ${SYSVDIR} 2>/dev/null || : ; for word in $$( ${findbin} ${SRCDIR} -mindepth 1 -type d -printf '%p\n' | ${sedbin} -r -e "s:^${SRCDIR}:${DESTDIR}:" | ${awkbin} '{ print length, $$0 }' | ${sortbin} -rn | ${awkbin} '{print $$2}' ) ; do ${findbin} $${word} -mindepth 1 1>/dev/null 2>&1 | read 1>/dev/null 2>&1 || { ${rmdirbin} "$${word}" 2>/dev/null || ${truebin} ; } ; done
+
+clean:
+ -@#${echobin} "target $@ not implemented yet! Gotta say unh." && ${falsebin}
+ -${rmbin} -f usr/share/man/man*/*.gz || :
diff --git a/src/usr/bin/hwset-thinkpad-p50s b/src/usr/bin/hwset-thinkpad-p50s
index 06dae21..12e7c14 100755
--- a/src/usr/bin/hwset-thinkpad-p50s
+++ b/src/usr/bin/hwset-thinkpad-p50s
@@ -17,7 +17,7 @@
# Improve:
# Provide better 'screen 0' detection. Right now it is hard-coded to use display LVDS.
# Dependencies:
-# devuan-req: bgscripts-core
+# dep-devuan: bgscripts-core
fiversion="2017-11-10a"
hwsetversion="2022-11-03a" # for Thinkpad P50s
diff --git a/src/usr/bin/netmounts-trayicon b/src/usr/bin/netmounts-trayicon
index 932dcf1..72bf020 100755
--- a/src/usr/bin/netmounts-trayicon
+++ b/src/usr/bin/netmounts-trayicon
@@ -15,7 +15,7 @@
# Improve:
# Documentation:
# Dependencies:
-# devuan-req: mktrayicon
+# dep-devuan: mktrayicon
clean_netmounts_trayicon() {
{ test -e "${netmounts_trayicon}" && echo "q" > "${netmounts_trayicon}" ; } 1>/dev/null 2>&1 &
diff --git a/src/usr/bin/vpn-trayicon b/src/usr/bin/vpn-trayicon
index 224e5cc..ecae2de 100755
--- a/src/usr/bin/vpn-trayicon
+++ b/src/usr/bin/vpn-trayicon
@@ -16,7 +16,7 @@
# Documentation:
# for some stupid reason sudo /usr/local/bin/vpn-on doesn't work, so I just use the real commands here.
# Dependencies:
-# devuan-req: mktrayicon
+# dep-devuan: mktrayicon
clean_vpn_trayicon() {
{ test -e "${vpn_trayicon}" && echo "q" > "${vpn_trayicon}" ; } 1>/dev/null 2>&1 &
diff --git a/src/usr/share/man/man1/hwset-thinkpad-p50s.1.txt b/src/usr/share/man/man1/hwset-thinkpad-p50s.1.txt
new file mode 100644
index 0000000..78602c1
--- /dev/null
+++ b/src/usr/share/man/man1/hwset-thinkpad-p50s.1.txt
@@ -0,0 +1,28 @@
+title hwset-thinkpad-p50s
+section 1
+project stackrpms-thinkpad-p50s
+volume General Commands Manual
+date November 2022
+=====
+NAME
+ hwset-thinkpad-p50s - adjust hardware settings like audio volume and screen brightness
+SYNOPSIS
+ hwset-thinkpad-p50s [PIECE] [ACTION] [VALUE]
+PIECES
+ vol | bright
+ACTIONS
+ up | down | set | mute
+VALUES
+ vol: 0-100
+ bright: 0.0-1.0 | safe | min | max
+DESCRIPTION
+ A customized hwset.sh (from bgscripts-core) specifically for Thinkpad P50s platform. Primarily hwset is called from the stackrpms-thinkpad-p50s fluxbox keys file on the Function-F6 type key presses.
+ The included fluxbox keys file uses amixer to set volume, not hwset.
+AUTHOR
+ B. Stack <bgstack15@gmail.com>
+COPYRIGHT
+ GPL 3.0
+BUGS
+ If you catch any bugs please email the author.
+SEE ALSO
+ bgscripts-core hwset.sh
diff --git a/src/usr/share/man/man1/netmounts-off.1.txt b/src/usr/share/man/man1/netmounts-off.1.txt
new file mode 100644
index 0000000..372f693
--- /dev/null
+++ b/src/usr/share/man/man1/netmounts-off.1.txt
@@ -0,0 +1,22 @@
+title netmounts-off
+section 1
+project stackrpms-thinkpad-p50s
+volume General Commands Manual
+date November 2022
+=====
+NAME
+ netmounts-off
+SYNOPSIS
+ netmounts-off
+OPTIONS
+ none
+DESCRIPTION
+ Umount all nfs mounts.
+AUTHOR
+ B. Stack <bgstack15@gmail.com>
+COPYRIGHT
+ GPL 3.0
+BUGS
+ If you catch any bugs please email the author.
+SEE ALSO
+ `netmounts-on(1)`
diff --git a/src/usr/share/man/man1/netmounts-on.1.txt b/src/usr/share/man/man1/netmounts-on.1.txt
new file mode 100644
index 0000000..a6839d9
--- /dev/null
+++ b/src/usr/share/man/man1/netmounts-on.1.txt
@@ -0,0 +1,22 @@
+title netmounts-on
+section 1
+project stackrpms-thinkpad-p50s
+volume General Commands Manual
+date November 2022
+=====
+NAME
+ netmounts-on
+SYNOPSIS
+ netmounts-on
+OPTIONS
+ none
+DESCRIPTION
+ Mount all defined mounts of type nfs.
+AUTHOR
+ B. Stack <bgstack15@gmail.com>
+COPYRIGHT
+ GPL 3.0
+BUGS
+ If you catch any bugs please email the author.
+SEE ALSO
+ `netmounts-off(1)`
diff --git a/src/usr/share/man/man1/netmounts-trayicon.1.txt b/src/usr/share/man/man1/netmounts-trayicon.1.txt
new file mode 100644
index 0000000..0a2f98f
--- /dev/null
+++ b/src/usr/share/man/man1/netmounts-trayicon.1.txt
@@ -0,0 +1,22 @@
+title netmounts-trayicon
+section 1
+project stackrpms-thinkpad-p50s
+volume General Commands Manual
+date November 2022
+=====
+NAME
+ netmounts-trayicon
+SYNOPSIS
+ netmounts-trayicon
+OPTIONS
+ none
+DESCRIPTION
+ Display an icon in the system tray that indicates if your nfs mounts are currently mounted. The icon menu easily mounts and unmounts all nfs mounts.
+AUTHOR
+ B. Stack <bgstack15@gmail.com>
+COPYRIGHT
+ GPL 3.0
+BUGS
+ If you catch any bugs please email the author.
+SEE ALSO
+ `netmounts-on(1)`, `netmounts-off(1)`
diff --git a/src/usr/share/man/man1/vpn-off.1.txt b/src/usr/share/man/man1/vpn-off.1.txt
new file mode 100644
index 0000000..5a916bc
--- /dev/null
+++ b/src/usr/share/man/man1/vpn-off.1.txt
@@ -0,0 +1,22 @@
+title vpn-off
+section 1
+project stackrpms-thinkpad-p50s
+volume General Commands Manual
+date November 2022
+=====
+NAME
+ vpn-off
+SYNOPSIS
+ vpn-off
+OPTIONS
+ none
+DESCRIPTION
+ wg-quick down wg0
+AUTHOR
+ B. Stack <bgstack15@gmail.com>
+COPYRIGHT
+ GPL 3.0
+BUGS
+ If you catch any bugs please email the author.
+SEE ALSO
+ `vpn-on(1)`
diff --git a/src/usr/share/man/man1/vpn-on.1.txt b/src/usr/share/man/man1/vpn-on.1.txt
new file mode 100644
index 0000000..3906749
--- /dev/null
+++ b/src/usr/share/man/man1/vpn-on.1.txt
@@ -0,0 +1,22 @@
+title vpn-on
+section 1
+project stackrpms-thinkpad-p50s
+volume General Commands Manual
+date November 2022
+=====
+NAME
+ vpn-on
+SYNOPSIS
+ vpn-on
+OPTIONS
+ none
+DESCRIPTION
+ wg-quick up wg0
+AUTHOR
+ B. Stack <bgstack15@gmail.com>
+COPYRIGHT
+ GPL 3.0
+BUGS
+ If you catch any bugs please email the author.
+SEE ALSO
+ `vpn-off(1)`
diff --git a/src/usr/share/man/man1/vpn-trayicon.1.txt b/src/usr/share/man/man1/vpn-trayicon.1.txt
new file mode 100644
index 0000000..933c007
--- /dev/null
+++ b/src/usr/share/man/man1/vpn-trayicon.1.txt
@@ -0,0 +1,22 @@
+title vpn-trayicon
+section 1
+project stackrpms-thinkpad-p50s
+volume General Commands Manual
+date November 2022
+=====
+NAME
+ vpn-trayicon
+SYNOPSIS
+ vpn-trayicon
+OPTIONS
+ none
+DESCRIPTION
+ Display an icon in the system tray that indicates if your Wireguard nic is connected. The icon menu easily starts and stops the wg0 interface.
+AUTHOR
+ B. Stack <bgstack15@gmail.com>
+COPYRIGHT
+ GPL 3.0
+BUGS
+ If you catch any bugs please email the author.
+SEE ALSO
+ `vpn-on(1)`, `vpn-off(1)`
bgstack15