diff options
Diffstat (limited to 'irssi-MASTER/Makefile')
-rw-r--r-- | irssi-MASTER/Makefile | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/irssi-MASTER/Makefile b/irssi-MASTER/Makefile new file mode 100644 index 0000000..ffbbd1c --- /dev/null +++ b/irssi-MASTER/Makefile @@ -0,0 +1,104 @@ +MASTERNICK = weasel +CERT="$(HOME)/.irssi/oftc-weasel.pem" +PKEY="$(HOME)/.irssi/oftc-weasel.key" +CAFILE="$(HOME)/.irssi/oftc.crt" +HOST="asteria.debian.or.at" + +WAIT=1000 + +config: config.tmp + mv -f "$<" "$@" + chmod -w "$@" + +.INTERMEDIATE: config.tmp +config.tmp: config.in servers.tmp chatnets.tmp + cat $? > "$@" + +.INTERMEDIATE: servers.tmp +servers.tmp: ~/.oftc-hosts ~/.oftc-port ~/.oftc-testnet-port Makefile + echo "servers = (" > "$@" + while read name ip; do \ + echo "# $$name" >> "$@" && \ + printf '{ \ + address = "%s"; \ + chatnet = "OFTC-%s"; \ + port = "%d"; \ + use_ssl = "yes"; \ + ssl_cert = $(CERT); \ + ssl_pkey = $(PKEY); \ + ssl_verify = "yes"; \ + ssl_cafile = $(CAFILE); \ + own_host = $(HOST); \ + autoconnect = "no"; \ + },\n' \ + \ + $$ip \ + $$name \ + "`cat ~/.oftc-port`" \ + \ + >> "$@" && \ + \ + \ + printf '{ \ + address = "%s"; \ + chatnet = "TESTNET-%s"; \ + port = "%d"; \ + use_ssl = "yes"; \ + ssl_cert = $(CERT); \ + ssl_pkey = $(PKEY); \ + ssl_verify = "yes"; \ + ssl_cafile = $(CAFILE); \ + own_host = $(HOST); \ + autoconnect = "no"; \ + },\n' \ + \ + $$ip \ + $$name \ + "`cat ~/.oftc-port`" \ + \ + >> "$@" ; \ + \ + done < ~/.oftc-hosts && echo built. + echo ")" >> "$@" + +.INTERMEDIATE: chatnets.tmp +chatnets.tmp: ~/.oftc-hosts ~/.oftc-port ~/.oftc-testnet-port Makefile + echo "chatnets = {" > "$@" + while read name ip; do \ + echo "# $$name" >> "$@" && \ + printf '"OFTC-%s" = { \ + type = "IRC"; \ + autosendcmd = "wait -OFTC-%s $(WAIT)"; \ + cmdmax = "512"; \ + cmdspeed = "10"; \ + max_kicks = "1"; \ + max_msgs = "100"; \ + max_modes = "4"; \ + nick = "$(MASTERNICK)-%s"; \ + };\n' \ + \ + $$name \ + $$name \ + $$name \ + \ + >> "$@" && \ + \ + printf '"TESTNET-%s" = { \ + type = "IRC"; \ + autosendcmd = "wait -TESTNET-%s $(WAIT)"; \ + cmdmax = "512"; \ + cmdspeed = "10"; \ + max_kicks = "1"; \ + max_msgs = "100"; \ + max_modes = "4"; \ + nick = "$(MASTERNICK)-%s"; \ + };\n' \ + \ + $$name \ + $$name \ + $$name \ + \ + >> "$@" ; \ + \ + done < ~/.oftc-hosts && echo built. + echo "}" >> "$@" |