Commit 319b208d authored by stettberger's avatar stettberger

Added Manpage and new "build system"

parent 5563bfc9
......@@ -2,20 +2,49 @@ CC=gcc
prefix=/usr/local
DESTDIR=
TARGET=si
SILCINCLUDE=/usr/include/silc-toolkit
SILCLIB=/usr/lib/silc-toolkit
FILES=si.c mit.c mm.c buddylist.c
CFLAGS=`pkg-config --cflags silc silcclient` -Wall -ggdb -DSILC_DIST_SKR -DSILC_DIST_TMA
LDFLAGS=`pkg-config --libs silc silcclient` -lpthread -ldl
all: ${TARGET}
include config.mk
all: options si
${TARGET}: ${TARGET}.o
options:
@echo si build options:
@echo "LIBS = ${LIBS}"
@echo "INCLUDES = ${INCLUDES}"
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
si: si.o
${CC} si.o -o si ${LDFLAGS}
${TARGET}.o: ${FILES}
si.o: ${FILES}
${CC} -c ${CFLAGS} ${TARGET}.c
clean:
rm -f ${TARGET} *~ *.o *core
mit: mit.c
install:
install ${TARGET} ${DESTDIR}/${prefix}/bin
@mkdir -p ${DESTDIR}${DOCDIR}
@mkdir -p ${DESTDIR}${BINDIR}
@mkdir -p ${DESTDIR}${MAN1DIR}
@install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MAN1DIR}
@install -m 644 COPYING README ${DESTDIR}${DOCDIR}
@install -m 775 si ${DESTDIR}${BINDIR}
@install -m 444 si.1 ${DESTDIR}${MAN1DIR}
@echo "installed si"
uninstall:
@rm -f ${DESTDIR}${MAN1DIR}/si.1
@rm -rf ${DESTDIR}${DOCDIR}
@rm -f ${DESTDIR}${BINDIR}/si
@echo "uninstalled si"
dist: clean
@mkdir -p si-${VERSION}
@cp -R Makefile README COPYING config.mk si.c si.1 buddylist.c mit.c mm.c si-${VERSION}
@tar -cf si-${VERSION}.tar si-${VERSION}
@gzip si-${VERSION}.tar
@rm -rf si-${VERSION}
@echo created distribution si-${VERSION}.tar.gz
# customize to fit your system
# paths
PREFIX = /usr/local
BINDIR = ${PREFIX}/bin
MANDIR = ${PREFIX}/share/man
MAN1DIR = ${MANDIR}/man1
DOCDIR = ${PREFIX}/share/doc/si
# # includes and libs
INCLUDES = `pkg-config --cflags silc silcclient`
LIBS = `pkg-config --libs silc silcclient`
VERSION=0.3
## change DESTDIR to install to a different root
DESTDIR =
# # compiler
CC = gcc
CFLAGS = -ggdb -O0 -W ${INCLUDES} -DVERSION=\"${VERSION}\" -DSILC_DIST_SKR -DSILC_DIST_TMA
LDFLAGS = ${LIBS}
.TH SI 1 "May 26, 2007"
.SH NAME
si \- silc improved
.SH SYNOPSIS
.B si
.RB [ \-s
.IR servername ]
.RB [ \-p
.IR port ]
.RB [ \-k
.IR password ]
.RB [ \-i
.IR prefix ]
.RB [ \-n
.IR nickname ]
.RB [ \-x
.IR filename ]
.RB [ \-v ]
.RB [ \-F ]
.RB [ \-d ]
.SH DESCRIPTION
.B si
is a minimalistic FIFO and filesystem based SILC client.
It creates an irc directory tree with server, channel and
nick name directories.
In every directory a FIFO file (in) and and normal file (out)
is placed. This will be for example ~/irc/sauna.silcnet.org/.
The in file is used to communicate with the servers and the out
files includes the server messages. For every channel and every nick
name there will be new in and out files.
The basic idea of this is to be able to communicate with an IRC
server with basic command line tools.
For example if you will join a channel just do echo "/join #channel" > in
and si creates a new channel directory with in and out file.
.SH OPTIONS
.TP
.BI \-s " servername"
lets you override the default servername (sauna.silcnet.org)
.TP
.BI \-p " port"
lets you override the default port (706)
.TP
.BI \-i " prefix"
lets you override the default irc path (~/irc)
.TP
.BI \-n " nickname"
lets you override the default nick ($USER)
.TP
.BI \-x " file"
lets you provide a init script, which is executed upon successful connection.
Use a plain file listing one silc command, including the slash, per line.
.TP
.BI \-v
display version number and exit.
.TP
.BI \-F
fork to background and exit.
.TP
.BI \-d
enable debugging output.
.SH DIRECTORIES
.TP
.FN ~/irc
In this directory the silc tree will be created. In this directory you
will find a directory for your server (default: sauna.silcnet.org) in
which the FIFO and the output file will be stored.
If you join a channel a new directory with the name of the channel
will be created in the ~/irc/$servername/ directory.
.SH COMMANDS
.TP
.FN /join " channel"
join a channel
.TP
.FN /query " nickname"
start a private conversation with the user
.FN /leave " channel"
leave a channel
.TP
Everything which is not a command, i.e. not starting with a slash, will simply be posted into the channel or to the server.
.TP
.FH out file usage
Write wrappers, pagers or use your tools of choice to display the out file contents (loco, multitail, etc.).
.SH AUTHORS
si was written by Christian Dietrich <stettberger@brokenpipe.de>.
.SH SEE ALSO
.BR echo (1),
.BR tail (1),
......@@ -38,7 +38,6 @@
/* {{{ Structs, Globals Declarations */
#define VERSION "0.2"
#define NULL_TEST(a) if(!(a)){perror("si: Couldn't allocate memory"); return;}
#define NULL_TEST_ARG(a,b) if(!(a)){perror("si: Couldn't allocate memory"); return (b);}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment