summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2020-03-31 00:27:07 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2020-03-31 00:27:07 +0000
commit95b4705364e43f7295aefedfc2036d64444b564f (patch)
tree26906850de1a4c994fc03703847c930d3b15171f
parent489cc5e01c962a4c014e0b9e41801bf07af5b36b (diff)
downloadfreebsd-ports-95b4705364e43f7295aefedfc2036d64444b564f.zip
New port: irc/birch: IRC client written in bash
PR: 245174 Submitted by: Lewis Cook <vulcan@wired.sh>
-rw-r--r--irc/Makefile1
-rw-r--r--irc/birch/Makefile37
-rw-r--r--irc/birch/distinfo3
-rw-r--r--irc/birch/files/pkg-message.in83
-rw-r--r--irc/birch/pkg-descr5
5 files changed, 129 insertions, 0 deletions
diff --git a/irc/Makefile b/irc/Makefile
index ab254efc35fc..8833a156548e 100644
--- a/irc/Makefile
+++ b/irc/Makefile
@@ -6,6 +6,7 @@
SUBDIR += anope
SUBDIR += atheme-services
SUBDIR += bip
+ SUBDIR += birch
SUBDIR += bitchx
SUBDIR += bitlbee
SUBDIR += bitlbee-discord
diff --git a/irc/birch/Makefile b/irc/birch/Makefile
new file mode 100644
index 000000000000..c14ede461df0
--- /dev/null
+++ b/irc/birch/Makefile
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+PORTNAME= birch
+DISTVERSION= g20200327
+CATEGORIES= irc
+
+MAINTAINER= vulcan@wired.sh
+COMMENT= IRC client written in bash
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+RUN_DEPENDS= bash:shells/bash
+
+USES= shebangfix
+USE_GITHUB= yes
+GH_ACCOUNT= dylanaraps
+GH_TAGNAME= f04f673a57d3f416174fb84755d528aefe5adc6d
+SHEBANG_FILES= ${PORTNAME}
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+SUB_FILES= pkg-message
+PLIST_FILES= bin/${PORTNAME}
+PORTDOCS= README.md
+
+OPTIONS_DEFINE= DOCS
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/irc/birch/distinfo b/irc/birch/distinfo
new file mode 100644
index 000000000000..e7e5ae68b9e0
--- /dev/null
+++ b/irc/birch/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1585518968
+SHA256 (dylanaraps-birch-g20200327-f04f673a57d3f416174fb84755d528aefe5adc6d_GH0.tar.gz) = 3c07101640cf3b1d13304cf8a4ff0df490094645f4b7d4c2cd298468508ecc6e
+SIZE (dylanaraps-birch-g20200327-f04f673a57d3f416174fb84755d528aefe5adc6d_GH0.tar.gz) = 8206
diff --git a/irc/birch/files/pkg-message.in b/irc/birch/files/pkg-message.in
new file mode 100644
index 000000000000..600b48082aa0
--- /dev/null
+++ b/irc/birch/files/pkg-message.in
@@ -0,0 +1,83 @@
+[
+{ type: install
+ message: <<EOM
+birch was successfully installed.
+
+Caveats (or limitations):
+=========================
+
+* Nick column is fixed and truncated to 10 columns wide.
+
+ This is something fixable down the line. It merely serves to
+ simplify the alignment of messages into two columns (nick and
+ messages).
+
+* Lines are word-wrapped to a fixed 60 columns.
+
+ This is also fixable down the line though a lot more painful
+ than the nick column issue. POSIX fold is used to achieve the
+ word wrapping but doesn't take into account non-printable
+ characters and unicode.
+
+ What this means is that wrapping will always be a little _off_
+ as escape sequences, IRC formatting and unicode will throw
+ out all attempts at calculating the "visible" line length.
+
+ It's an interesting problem to solve. I've made a myriad of
+ attempts at writing a suitable function in bash though they're
+ all too slow (as expected!).
+
+* No automatic server reconnect.
+
+ This should be fairly easy to fix though I need to figure out
+ the best way of doing so.
+
+* No SSL (sadly).
+
+ The network connection is through bash's builtin /dev/tcp
+ feature which doesn't allow for SSL.
+
+Keybindings:
+============
+
+Ctrl+n - Next buffer.
+Ctrl+p - Previous buffer.
+Tab - Completion of nicks and channels.
+
+Further, all readline keybindings are available for use. See the
+readline or bash manpages for a list of these.
+
+Keybindings to birch may also be set via a .inputrc file. Which
+can be configured by setting `$BIRCH_INPUTRC`.
+
+(BIRCH_INPUTRC=/path/to/birch-inputrc birch)
+
+Commands:
+=========
+
+Channels
+
+/join <channel> - Join a channel.
+/part <channel> - Leave a channel.
+/quit - Quit out of birch.
+
+Messages
+
+/msg <nick> <message> - Message a user.
+/me <message> - Send an action.
+
+Navigation
+
+/next - Next buffer.
+/prev - Previous buffer.
+/<num> - Buffer by number (0 indexed).
+
+Other
+
+/nick <nick> - Change nickname.
+/names - Display all nicks in channel.
+/topic - Display channel topic.
+/raw <args> - Send a raw IRC message.
+EOM
+}
+]
diff --git a/irc/birch/pkg-descr b/irc/birch/pkg-descr
new file mode 100644
index 000000000000..3b45bda1fb21
--- /dev/null
+++ b/irc/birch/pkg-descr
@@ -0,0 +1,5 @@
+Minimal IRC client written in bash, featuring the full power of readline for
+input and keybindings, tab completion of nicks and unique (or semi-unique)
+nick colors.
+
+WWW: https://github.com/dylanaraps/birch