new stuff

This commit is contained in:
arg@wmii.de 2006-09-26 14:24:26 +02:00
parent 1230561e3d
commit b3412f0a14
3 changed files with 55 additions and 60 deletions

View File

@ -1,59 +1,57 @@
# ii - irc it - simple but flexible IRC client # sic - simple irc client
# (C)opyright MMV Anselm R. Garbe, Nico Golde # (C)opyright MMVI Anselm R. Garbe
include config.mk include config.mk
SRC = sic.c SRC = sic.c
OBJ = ${SRC:.c=.o} OBJ = ${SRC:.c=.o}
MAN1 = sic.1
BIN = sic
all: options sic all: options sic
@echo built sic
options: options:
@echo ii build options: @echo sic build options:
@echo "LIBS = ${LIBS}"
@echo "CFLAGS = ${CFLAGS}" @echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}" @echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}" @echo "CC = ${CC}"
@echo "LD = ${LD}"
.c.o: .c.o:
@echo CC $< @echo CC $<
@${CC} -c ${CFLAGS} $< @${CC} -c ${CFLAGS} $<
${OBJ}: config.mk
sic: ${OBJ}
@echo LD $@
@${LD} -o $@ ${OBJ} ${LDFLAGS}
@strip $@
clean: clean:
rm -f sic *.o core sic-${VERSION}.tar.gz @echo cleaning
@rm -f sic ${OBJ} sic-${VERSION}.tar.gz
dist: clean dist: clean
@echo creating dist tarball
@mkdir -p sic-${VERSION} @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} @tar -cf sic-${VERSION}.tar sic-${VERSION}
@gzip sic-${VERSION}.tar @gzip sic-${VERSION}.tar
@rm -rf sic-${VERSION} @rm -rf sic-${VERSION}
sic: ${OBJ}
@echo LD $@
@${CC} -o $@ ${OBJ} ${LDFLAGS}
install: all install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin @mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f ${BIN} ${DESTDIR}${PREFIX}/bin @cp -f sic ${DESTDIR}${PREFIX}/bin
@for i in ${BIN}; do \ @chmod 755 ${DESTDIR}${PREFIX}/bin/sic
chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \ @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
done
@echo installed executable files to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${MANPREFIX}/man1 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
@cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1 @sed 's/VERSION/${VERSION}/g' < sic.1 > ${DESTDIR}${MANPREFIX}/man1/sic.1
@for i in ${MAN1}; do \ @chmod 644 ${DESTDIR}${MANPREFIX}/man1/sic.1
chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
done
@echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
uninstall: uninstall:
for i in ${BIN}; do \ @echo removing executable file from ${DESTDIR}${PREFIX}/bin
rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \ @rm -f ${DESTDIR}${PREFIX}/bin/sic
done @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
for i in ${MAN1}; do \ @rm -f ${DESTDIR}${MANPREFIX}/man1/sic.1
rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
done .PHONY: all options clean dist install uninstall

View File

@ -1,19 +1,22 @@
# sic version # sic version
VERSION = 0.3 VERSION = 0.3
# Customize to fit your system # Customize below to fit your system
# paths # paths
PREFIX = /usr/local PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man MANPREFIX = ${PREFIX}/share/man
# includes and libs # includes and libs
LIBS = -L${PREFIX}/lib -L/usr/lib -lc INCS = -I. -I/usr/include
LIBS = -L/usr/lib -lc
# compiler # flags
CFLAGS = -O3 -I${PREFIX}/include -I/usr/include \ CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
-DVERSION=\"${VERSION}\" LDFLAGS = ${LIBS}
LDFLAGS = ${LIBS} #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
#CFLAGS = -g -Wall -O2 -I${PREFIX}/include -I/usr/include \ #LDFLAGS = -g ${LIBS}
# -DVERSION=\"${VERSION}\"
#LDFLAGS = -g ${LIBS} # compiler and linker
CC = cc
LD = ${CC}

38
sic.1
View File

@ -1,19 +1,13 @@
.TH SIC 1 sic-0.2 .TH SIC 1 sic-VERSION
.SH NAME .SH NAME
sic \- simple irc client sic \- simple irc client
.SH SYNOPSIS .SH SYNOPSIS
.B sic .B sic
.RB [ \-s .RB [ \-s <server> ]
.IR server ] .RB [ \-p <port> ]
.RB [ \-p .RB [ \-n <nick> ]
.IR port ] .RB [ \-k <keyword> ]
.RB [ \-n .RB [ \-f <fullname> ]
.IR nick ]
.RB [ \-k
.IR keyword ]
.RB [ \-f
.IR fullname ]
.RB \-v
.RB [ \-v ] .RB [ \-v ]
.SH DESCRIPTION .SH DESCRIPTION
.B sic .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. different channel buffers, that's actually a feature.
.SH OPTIONS .SH OPTIONS
.TP .TP
.BI \-s " server" .B \-s <server>
Overrides the default server (irc.oftc.net) Overrides the default server (irc.oftc.net)
.TP .TP
.BI \-p " port" .B \-p <port>
Overrides the default port (6667) Overrides the default port (6667)
.TP .TP
.BI \-n " nickname" .B \-n <nickname>
Override the default nick ($USER) Override the default nick ($USER)
.TP .TP
.BI \-k " keyword" .B \-k <keyword>
Specifies the keyword to authenticate your nick on the server Specifies the keyword to authenticate your nick on the server
.TP .TP
.BI \-f " fullname" .B \-f <fullname>
Specify the real name (default is $USER) Specify the real name (default is $USER)
.TP .TP
.BI \-v .BI \-v
Prints version information to standard output, then exits. Prints version information to standard output, then exits.
.SH COMMANDS .SH COMMANDS
.TP .TP
.BI /j " #channel " .B /j #channel
Join a channel Join a channel
.TP .TP
.BI /l " #channel " .B /l #channel
Leave a channel Leave a channel
.TP .TP
.BI /m " #channel/user msg " .B /m #channel/user msg
Write a message to #channel/user Write a message to #channel/user
.TP .TP
.BI /s " #channel/user " .B /s #channel/user
Set default channel/user Set default channel/user
.TP .TP
.BI /t " topic" .B /t topic
Set the channel topic Set the channel topic
.TP .TP
Everything which is not a command will simply be posted into the channel or to Everything which is not a command will simply be posted into the channel or to