1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 01:23:03 +01:00

Add manpage

This commit is contained in:
Ansa89 2014-06-26 14:06:22 +02:00
parent b9af1b3293
commit 353be3a7a2
2 changed files with 76 additions and 8 deletions

View File

@ -5,21 +5,24 @@ VERSION = $(TOXIC_VERSION)_r$(REV)
CFG_DIR = ../cfg CFG_DIR = ../cfg
SRC_DIR = ../src SRC_DIR = ../src
MISC_DIR = ../misc MISC_DIR = ../misc
DOC_DIR = ../doc
PREFIX = /usr/local PREFIX = /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
DATADIR = $(PREFIX)/share/toxic DATADIR = $(PREFIX)/share/toxic
DATAFILES = $(MISC_DIR)/DHTnodes $(MISC_DIR)/toxic.conf MANDIR = $(PREFIX)/man/man1
DATAFILES = DHTnodes toxic.conf
MANFILES = toxic.1
LIBS = libtoxcore ncursesw LIBS = libtoxcore ncursesw
CFLAGS = -std=gnu99 -pthread -Wimplicit-function-declaration -Wreturn-type -Werror CFLAGS = -std=gnu99 -pthread -Wimplicit-function-declaration -Wreturn-type -Werror
CFLAGS += -DTOXICVER="\"$(VERSION)\"" -DHAVE_WIDECHAR -D_XOPEN_SOURCE_EXTENDED CFLAGS += -DTOXICVER="\"$(VERSION)\"" -DHAVE_WIDECHAR -D_XOPEN_SOURCE_EXTENDED
CFLAGS += -DPACKAGE_DATADIR="\"$(DATADIR)\"" CFLAGS += -DPACKAGE_DATADIR="\"$(abspath $(DATADIR))\""
CFLAGS += $(USER_CFLAGS) CFLAGS += $(USER_CFLAGS)
LDFLAGS = $(USER_LDFLAGS) LDFLAGS = $(USER_LDFLAGS)
OBJ = chat.o chat_commands.o configdir.o dns.o execute.o OBJ = chat.o chat_commands.o configdir.o dns.o execute.o file_senders.o
OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o input.o OBJ += friendlist.o global_commands.o groupchat.o line_info.o input.o
OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o OBJ += log.o misc_tools.o prompt.o settings.o toxic.o toxic_strings.o windows.o
# Variables for audio support # Variables for audio support
@ -88,10 +91,23 @@ toxic: $(OBJ)
$(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS) $(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS)
install: toxic install: toxic
@mkdir -p $(DESTDIR)/$(BINDIR) mkdir -p $(abspath $(DESTDIR)/$(BINDIR))
@mkdir -p $(DESTDIR)/$(DATADIR) mkdir -p $(abspath $(DESTDIR)/$(DATADIR))
install -m 0755 toxic $(DESTDIR)/$(BINDIR) mkdir -p $(abspath $(DESTDIR)/$(MANDIR))
install -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR) @echo "Installing toxic executable"
@install -m 0755 toxic $(abspath $(DESTDIR)/$(BINDIR))
@echo "Installing data files"
@for f in $(DATAFILES) ; do \
install -m 0644 $(MISC_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)) ;\
done
@echo "Installing man pages"
@for f in $(MANFILES) ; do \
file=$(abspath $(DESTDIR)/$(MANDIR))/$$f ;\
install -m 0644 $(DOC_DIR)/$$f $(abspath $(DESTDIR)/$(MANDIR)) ;\
sed -i'' -e 's:__VERSION__:'$(VERSION)':' $$file ;\
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
gzip -f -9 $$file ;\
done
%.o: $(SRC_DIR)/%.c %.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c $(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c

52
doc/toxic.1 Normal file
View File

@ -0,0 +1,52 @@
.TH TOXIC 1 "June 2014" "Toxic v__VERSION__" "User Manual"
.SH NAME
Toxic \- CLI for Tox
.SH SYNOPSYS
.B toxic [\-f
.I data\-file
.B ] [\-x] [\-4] [\-c
.I config\-file
.B ] [\-n
.I nodes\-file
.B ] [\-h]
.SH DESCRIPTION
Toxic is an ncurses-based instant messaging client for Tox which formerly
resided in the Tox core repository, and is now available as a standalone
application.
.SH OPTIONS
.IP "\-f, \-\-file data\-file"
Use specified
.I data\-file
instead of
.IR ~/.config/tox/data
.IP "\-x, \-\-nodata"
Ignore data file
.IP "\-4, \-\-ipv4"
Force IPv4 connection
.IP "\-c, \-\-config config\-file"
Use specified
.I config\-file
instead of
.IR __DATADIR__/toxic.conf
.IP "\-n, \-\-nodes nodes\-file"
Use specified
.I nodes\-file
for DHT bootstrap nodes, instead of
.IR __DATADIR__/DHTnodes
.IP "\-h, \-\-help"
Show help message
.SH BUGS
Expect bugs and other bad things: this software is in pre\-alpha stage.
.SH AUTHORS
JFreegman (JFreegman@gmail.com)
.SH SEE ALSO
Project page on github: https://github.com/Tox/toxic
.br
IRC channel on Freenode: chat.freenode.net#tox