aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-01-10 23:27:23 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-01-17 09:03:28 +0700
commitf74a16b46399fd6404f9ab5336783d464b300973 (patch)
tree80e4ae1a1dc67388d651f58a6ed3757cd8041957 /network
parent0b407b380e0493113184997e804dd33bb5d162a6 (diff)
network/irc.c: Added (minimalist curses IRC client).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/irc.c/README5
-rw-r--r--network/irc.c/git2tarxz.sh44
-rw-r--r--network/irc.c/irc.c.1159
-rw-r--r--network/irc.c/irc.c.SlackBuild85
-rw-r--r--network/irc.c/irc.c.info10
-rw-r--r--network/irc.c/irc.c.rst134
-rw-r--r--network/irc.c/slack-desc19
7 files changed, 456 insertions, 0 deletions
diff --git a/network/irc.c/README b/network/irc.c/README
new file mode 100644
index 0000000000000..9996813f77430
--- /dev/null
+++ b/network/irc.c/README
@@ -0,0 +1,5 @@
+irc.c (minimalist curses IRC client)
+
+The irc.c client is, as its name implies, a single C file which
+implements a usable IRC client. The display mechanism uses any
+standard curses library.
diff --git a/network/irc.c/git2tarxz.sh b/network/irc.c/git2tarxz.sh
new file mode 100644
index 0000000000000..878fcc5a88418
--- /dev/null
+++ b/network/irc.c/git2tarxz.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version
+# number.
+
+# Note that this script doesn't need to be run as root. It does
+# need to be able to write to the current directory it's run from.
+
+# Takes one optional argument, which is the commit or tag to create
+# a tarball of. With no arg, HEAD is used.
+
+PRGNAM=irc.c
+CLONE_URL=git://c9x.me/irc.git
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERSION=${DATE}_${GIT_SHA}
+
+rm -rf .git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=$VERSION"
diff --git a/network/irc.c/irc.c.1 b/network/irc.c/irc.c.1
new file mode 100644
index 0000000000000..94e7f8c4164a6
--- /dev/null
+++ b/network/irc.c/irc.c.1
@@ -0,0 +1,159 @@
+.\" Man page generated from reStructuredText.
+.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.TH "IRC.C" 1 "2022-01-03" "20210302_490f194" "SlackBuilds.org"
+.SH NAME
+irc.c \- minimalist curses IRC client
+.\" RST source for irc.c(1) man page. Convert with:
+.
+.\" rst2man.py irc.c.rst > irc.c.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+irc.c [\fI\-n NICK\fP] [\fI\-u USER\fP] [\fI\-s SERVER\fP] [\fI\-p PORT\fP] [\fI\-l LOGFILE\fP] [\fI\-t\fP] [\fI\-h\fP]
+.SH DESCRIPTION
+.sp
+\fBirc.c\fP is a simple IRC client. Features:
+.INDENT 0.0
+.INDENT 3.5
+.INDENT 0.0
+.IP \(bu 2
+infinite scrollback
+.IP \(bu 2
+automatic reconnection
+.IP \(bu 2
+utf8 support (inputting is still to do)
+.IP \(bu 2
+line editing (emacs like keybindings)
+.IP \(bu 2
+activity markers
+.IP \(bu 2
+logging
+.IP \(bu 2
+terminal resizes (inside an xterm)
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.sp
+The user interface uses multiple windows. The first window is always
+the server window, and each channel or private message conversation
+gets its own window. Press \fB^N\fP and \fB^P\fP for next/previous window.
+.sp
+There is no config file. Options are set on the command line and/or
+in the environment.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.BI \-n \ NICK
+Sets the nickname (default: \fBIRCNICK\fP from environment; if not set, the
+username from \fB\-u\fP or \fBUSER\fP).
+.TP
+.BI \-u \ USER
+Sets the username (default: \fBUSER\fP from environment, or \fIanonymous\fP if not set).
+.TP
+.BI \-s \ SERVER
+Server to connect to (default: irc.oftc.net).
+.TP
+.BI \-p \ PORT
+Port to connect to (default: 6667).
+.TP
+.BI \-l \ FILE
+File to log recieved data (default: none). If the file already
+exists, new data is appended to it.
+.TP
+.B \-t
+Use a secured connection. For most IRC servers, you\(aqll also have to set
+\fB\-p 6697\fP (or whatever port the server uses for secure connections).
+.TP
+.B \-h
+Display help.
+.UNINDENT
+.SH COMMANDS
+.sp
+IRC commands are \fInot\fP prefixed with a slash, in this client.
+.INDENT 0.0
+.TP
+.B \fBj\fP \fIchannel\fP
+Join a channel and create a new window for it.
+.TP
+.B \fBl\fP
+Leave (part) the currently displayed channel and close its window.
+.TP
+.B \fBm\fP \fInick\fP \fImessage\fP
+Send a private message. This creates a new window for the conversation.
+.TP
+.B \fBr\fP \fItext\fP
+Send raw \fItext\fP to the server (like \fB/QUOTE\fP in other clients).
+.TP
+.B \fBq\fP
+Quit. There is no way to send a quit message.
+.UNINDENT
+.SH KEYSTROKES
+.INDENT 0.0
+.TP
+.B \fB^N\fP
+Next window.
+.TP
+.B \fB^P\fP
+Previous window.
+.TP
+.B \fBPageUp\fP
+Scroll up.
+.TP
+.B \fBPageDown\fP
+Scroll down.
+.UNINDENT
+.sp
+Emacs\-style editing keys are also supported (\fB^U\fP, \fB^W\fP, etc).
+.SH ENVIRONMENT
+.INDENT 0.0
+.TP
+.B \fBUSER\fP
+The default IRC username (override with \fB\-u\fP). This is unlike other
+IRC clients, which use \fBIRCUSER\fP\&.
+.TP
+.B \fBIRCNICK\fP
+The default IRC nickname. Override with \fB\-n\fP\&.
+.TP
+.B \fBIRCPASS\fP
+Password used to authenticate to the IRC server, if set.
+.UNINDENT
+.SH COPYRIGHT
+.sp
+The author has placed \fBirc.c\fP in the public domain.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+The irc.c homepage: \fI\%https://c9x.me/irc/\fP
+.\" Generated by docutils manpage writer.
+.
diff --git a/network/irc.c/irc.c.SlackBuild b/network/irc.c/irc.c.SlackBuild
new file mode 100644
index 0000000000000..fff9af5689ade
--- /dev/null
+++ b/network/irc.c/irc.c.SlackBuild
@@ -0,0 +1,85 @@
+#!/bin/bash
+
+# Slackware build script for irc.c
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=irc.c
+VERSION=${VERSION:-20210302_490f194}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# set default server. if unspecified, use libera, because that's where
+# our #slackbuilds channel lives. man page is written by SlackBuild
+# author.
+cp $CWD/$PRGNAM.1 .
+sed -i "s,irc\\.oftc\\.net,${SERVER:-irc.libera.chat}," \
+ $PRGNAM README $PRGNAM.1
+
+# make the backspace key work, regardless of whether it sends ASCII
+# BS or DEL.
+sed -i "/CTRL('h')/a\\\\tcase 127:" $PRGNAM
+
+sed -i "s|-Os|$SLKCFLAGS|" Makefile
+
+make
+mkdir -p $PKG/usr/bin $PKG/usr/man/man1
+install -s -m0755 irc $PKG/usr/bin/$PRGNAM
+gzip -9c < $PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/irc.c/irc.c.info b/network/irc.c/irc.c.info
new file mode 100644
index 0000000000000..4fba1018aef9e
--- /dev/null
+++ b/network/irc.c/irc.c.info
@@ -0,0 +1,10 @@
+PRGNAM="irc.c"
+VERSION="20210302_490f194"
+HOMEPAGE="https://c9x.me/irc/"
+DOWNLOAD="https://slackware.uk/~urchlay/src/irc.c-20210302_490f194.tar.xz"
+MD5SUM="ff34e47e6167424a9a075eecbe21be0a"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/network/irc.c/irc.c.rst b/network/irc.c/irc.c.rst
new file mode 100644
index 0000000000000..c4f7508010e48
--- /dev/null
+++ b/network/irc.c/irc.c.rst
@@ -0,0 +1,134 @@
+.. RST source for irc.c(1) man page. Convert with:
+.. rst2man.py irc.c.rst > irc.c.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 20210302_490f194
+.. |date| date::
+
+=====
+irc.c
+=====
+
+----------------------------
+minimalist curses IRC client
+----------------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+irc.c [*-n NICK*] [*-u USER*] [*-s SERVER*] [*-p PORT*] [*-l LOGFILE*] [*-t*] [*-h*]
+
+DESCRIPTION
+===========
+
+**irc.c** is a simple IRC client. Features:
+
+ * infinite scrollback
+ * automatic reconnection
+ * utf8 support (inputting is still to do)
+ * line editing (emacs like keybindings)
+ * activity markers
+ * logging
+ * terminal resizes (inside an xterm)
+
+The user interface uses multiple windows. The first window is always
+the server window, and each channel or private message conversation
+gets its own window. Press **^N** and **^P** for next/previous window.
+
+There is no config file. Options are set on the command line and/or
+in the environment.
+
+OPTIONS
+=======
+
+-n NICK
+ Sets the nickname (default: **IRCNICK** from environment; if not set, the
+ username from **-u** or **USER**).
+
+-u USER
+ Sets the username (default: **USER** from environment, or *anonymous* if not set).
+
+-s SERVER
+ Server to connect to (default: irc.oftc.net).
+
+-p PORT
+ Port to connect to (default: 6667).
+
+-l FILE
+ File to log recieved data (default: none). If the file already
+ exists, new data is appended to it.
+
+-t
+ Use a secured connection. For most IRC servers, you'll also have to set
+ **-p 6697** (or whatever port the server uses for secure connections).
+
+-h
+ Display help.
+
+COMMANDS
+========
+
+IRC commands are *not* prefixed with a slash, in this client.
+
+**j** *channel*
+ Join a channel and create a new window for it.
+
+**l**
+ Leave (part) the currently displayed channel and close its window.
+
+**m** *nick* *message*
+ Send a private message. This creates a new window for the conversation.
+
+**r** *text*
+ Send raw *text* to the server (like **/QUOTE** in other clients).
+
+**q**
+ Quit. There is no way to send a quit message.
+
+KEYSTROKES
+==========
+
+**^N**
+ Next window.
+
+**^P**
+ Previous window.
+
+**PageUp**
+ Scroll up.
+
+**PageDown**
+ Scroll down.
+
+Emacs-style editing keys are also supported (**^U**, **^W**, etc).
+
+ENVIRONMENT
+===========
+
+**USER**
+ The default IRC username (override with **-u**). This is unlike other
+ IRC clients, which use **IRCUSER**.
+
+**IRCNICK**
+ The default IRC nickname. Override with **-n**.
+
+**IRCPASS**
+ Password used to authenticate to the IRC server, if set.
+
+COPYRIGHT
+=========
+
+The author has placed **irc.c** in the public domain.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+The irc.c homepage: https://c9x.me/irc/
diff --git a/network/irc.c/slack-desc b/network/irc.c/slack-desc
new file mode 100644
index 0000000000000..8a04cada9a64b
--- /dev/null
+++ b/network/irc.c/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+irc.c: irc.c (minimalist curses IRC client)
+irc.c:
+irc.c: The irc.c client is, as its name implies, a single C file which
+irc.c: implements a usable IRC client. The display mechanism uses any
+irc.c: standard curses library.
+irc.c:
+irc.c:
+irc.c:
+irc.c:
+irc.c:
+irc.c: