sic

simple irc client
git clone git://git.suckless.org/sic
Log | Files | Refs | README | LICENSE

commit b3412f0a14d081f013d582f78e4d86a70ae82c27
parent 1230561e3d0ff9de0ff1556a8bddafcb38e5017e
Author: arg@wmii.de <unknown>
Date:   Tue, 26 Sep 2006 14:24:26 +0200

new stuff

Diffstat:
MMakefile | 56+++++++++++++++++++++++++++-----------------------------
Mconfig.mk | 21++++++++++++---------
Msic.1 | 38++++++++++++++++----------------------
3 files changed, 55 insertions(+), 60 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,59 +1,57 @@ -# ii - irc it - simple but flexible IRC client -# (C)opyright MMV Anselm R. Garbe, Nico Golde +# sic - simple irc client +# (C)opyright MMVI Anselm R. Garbe include config.mk SRC = sic.c OBJ = ${SRC:.c=.o} -MAN1 = sic.1 -BIN = sic all: options sic - @echo built sic options: - @echo ii build options: - @echo "LIBS = ${LIBS}" + @echo sic build options: @echo "CFLAGS = ${CFLAGS}" @echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" + @echo "LD = ${LD}" .c.o: @echo CC $< @${CC} -c ${CFLAGS} $< +${OBJ}: config.mk + +sic: ${OBJ} + @echo LD $@ + @${LD} -o $@ ${OBJ} ${LDFLAGS} + @strip $@ + clean: - rm -f sic *.o core sic-${VERSION}.tar.gz + @echo cleaning + @rm -f sic ${OBJ} sic-${VERSION}.tar.gz dist: clean + @echo creating dist tarball @mkdir -p sic-${VERSION} - @cp -R Makefile README LICENSE config.mk sic.c sic.1 sic-${VERSION} + @cp -R LICENSE Makefile README config.mk sic.1 ${SRC} sic-${VERSION} @tar -cf sic-${VERSION}.tar sic-${VERSION} @gzip sic-${VERSION}.tar @rm -rf sic-${VERSION} -sic: ${OBJ} - @echo LD $@ - @${CC} -o $@ ${OBJ} ${LDFLAGS} - install: all + @echo installing executable file to ${DESTDIR}${PREFIX}/bin @mkdir -p ${DESTDIR}${PREFIX}/bin - @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin - @for i in ${BIN}; do \ - chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \ - done - @echo installed executable files to ${DESTDIR}${PREFIX}/bin + @cp -f sic ${DESTDIR}${PREFIX}/bin + @chmod 755 ${DESTDIR}${PREFIX}/bin/sic + @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 @mkdir -p ${DESTDIR}${MANPREFIX}/man1 - @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1 - @for i in ${MAN1}; do \ - chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \ - done - @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1 + @sed 's/VERSION/${VERSION}/g' < sic.1 > ${DESTDIR}${MANPREFIX}/man1/sic.1 + @chmod 644 ${DESTDIR}${MANPREFIX}/man1/sic.1 uninstall: - for i in ${BIN}; do \ - rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \ - done - for i in ${MAN1}; do \ - rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \ - done + @echo removing executable file from ${DESTDIR}${PREFIX}/bin + @rm -f ${DESTDIR}${PREFIX}/bin/sic + @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 + @rm -f ${DESTDIR}${MANPREFIX}/man1/sic.1 + +.PHONY: all options clean dist install uninstall diff --git a/config.mk b/config.mk @@ -1,19 +1,22 @@ # sic version VERSION = 0.3 -# Customize to fit your system +# Customize below to fit your system # paths PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man # includes and libs -LIBS = -L${PREFIX}/lib -L/usr/lib -lc +INCS = -I. -I/usr/include +LIBS = -L/usr/lib -lc -# compiler -CFLAGS = -O3 -I${PREFIX}/include -I/usr/include \ - -DVERSION=\"${VERSION}\" -LDFLAGS = ${LIBS} -#CFLAGS = -g -Wall -O2 -I${PREFIX}/include -I/usr/include \ -# -DVERSION=\"${VERSION}\" -#LDFLAGS = -g ${LIBS} +# flags +CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" +LDFLAGS = ${LIBS} +#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" +#LDFLAGS = -g ${LIBS} + +# compiler and linker +CC = cc +LD = ${CC} diff --git a/sic.1 b/sic.1 @@ -1,19 +1,13 @@ -.TH SIC 1 sic-0.2 +.TH SIC 1 sic-VERSION .SH NAME sic \- simple irc client .SH SYNOPSIS .B sic -.RB [ \-s -.IR server ] -.RB [ \-p -.IR port ] -.RB [ \-n -.IR nick ] -.RB [ \-k -.IR keyword ] -.RB [ \-f -.IR fullname ] -.RB \-v +.RB [ \-s <server> ] +.RB [ \-p <port> ] +.RB [ \-n <nick> ] +.RB [ \-k <keyword> ] +.RB [ \-f <fullname> ] .RB [ \-v ] .SH DESCRIPTION .B sic @@ -23,38 +17,38 @@ also all channel traffic into one output, that you don't have to switch different channel buffers, that's actually a feature. .SH OPTIONS .TP -.BI \-s " server" +.B \-s <server> Overrides the default server (irc.oftc.net) .TP -.BI \-p " port" +.B \-p <port> Overrides the default port (6667) .TP -.BI \-n " nickname" +.B \-n <nickname> Override the default nick ($USER) .TP -.BI \-k " keyword" +.B \-k <keyword> Specifies the keyword to authenticate your nick on the server .TP -.BI \-f " fullname" +.B \-f <fullname> Specify the real name (default is $USER) .TP .BI \-v Prints version information to standard output, then exits. .SH COMMANDS .TP -.BI /j " #channel " +.B /j #channel Join a channel .TP -.BI /l " #channel " +.B /l #channel Leave a channel .TP -.BI /m " #channel/user msg " +.B /m #channel/user msg Write a message to #channel/user .TP -.BI /s " #channel/user " +.B /s #channel/user Set default channel/user .TP -.BI /t " topic" +.B /t topic Set the channel topic .TP Everything which is not a command will simply be posted into the channel or to