diff --git a/.envrc b/.envrc index 989115f..0e1023d 100644 --- a/.envrc +++ b/.envrc @@ -36,7 +36,8 @@ use_guix() PACKAGES=( autoconf autoconf-archive automake libtool make cmake gcc-toolchain pkg-config patchelf - weechat xz libxml2 libstrophe json-c + weechat libxml2 libstrophe + glib libsignal-protocol-c sqlite ) # Thanks diff --git a/.gitmodules b/.gitmodules index e69de29..88ff237 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "axc"] + path = axc + url = https://github.com/gkdr/axc diff --git a/Makefile b/Makefile index b452cdd..1979980 100644 --- a/Makefile +++ b/Makefile @@ -14,28 +14,32 @@ LIBDIR ?= $(PREFIX)/lib INSTALL ?= /usr/bin/install SRCS=plugin.c \ - account.c \ - buffer.c \ - channel.c \ - command.c \ - config.c \ - connection.c \ - input.c \ - message.c \ - user.c \ - -DEPS= + account.c \ + buffer.c \ + channel.c \ + command.c \ + config.c \ + connection.c \ + input.c \ + message.c \ + user.c \ + +DEPS=axc/build/libaxc.a OBJS=$(subst .c,.o,$(SRCS)) all: weechat-xmpp weechat-xmpp: $(DEPS) xmpp.so -xmpp.so: $(OBJS) - $(CC) $(LDFLAGS) -o xmpp.so $(OBJS) $(LDLIBS) +xmpp.so: $(OBJS) $(DEPS) + $(CC) $(LDFLAGS) -o xmpp.so $(OBJS) $(DEPS) $(LDLIBS) which patchelf >/dev/null && \ patchelf --set-rpath $(LIBRARY_PATH):$(shell realpath $(shell dirname $(shell gcc --print-libgcc-file-name))/../../../) xmpp.so && \ patchelf --shrink-rpath xmpp.so || true +axc/build/libaxc.a: + $(MAKE) -C axc +axc: axc/build/libaxc.a + test: xmpp.so env LD_PRELOAD=$(DEBUG) \ weechat -a -P 'alias,buflist,irc' -r '/plugin load ./xmpp.so' @@ -55,6 +59,10 @@ tidy: clean: $(RM) $(OBJS) + $(MAKE) -C axc clean + git submodule foreach --recursive git clean -xfd || true + git submodule foreach --recursive git reset --hard || true + git submodule update --init --recursive || true distclean: clean $(RM) *~ .depend diff --git a/README.org b/README.org index d93dc88..6b5244d 100644 --- a/README.org +++ b/README.org @@ -81,20 +81,26 @@ * [X] Opening PMs (/chat) ** TODO [#A] Implement essential functionality (milestone v0.2) * [X] Opening PMs with initial message - * [ ] Handle wide errors gracefully + * [ ] [#B] Handle wide errors gracefully * [ ] MUCs * [X] Opening (/enter) * [X] Receiving * [X] Sending + * [ ] [#B] Edits * [ ] [#B] Handle errors gracefully * [ ] [#B] Presence/nicklist - * [ ] [#B] Show topic - * [ ] [#B] Edits - * [ ] OMEMO presence - * [ ] OMEMO messages + * [ ] [#B] Enters + * [ ] [#B] Leaves + * [ ] [#B] Tracking + * [ ] [#B] Set/show topic + * [ ] OMEMO (libsignal-protocol-c / axc) + * [ ] Presence + * [ ] Messages * [ ] MUC PMs * [ ] Send typing notifications * [ ] Recv typing notifications + * [ ] OTR (libotr) + * [ ] PGP (libgpgme) ** TODO [#C] Implement completion engine (milestone v0.3) ** TODO [#D] Close all issues (milestone v1.0) diff --git a/axc b/axc new file mode 160000 index 0000000..1d4454e --- /dev/null +++ b/axc @@ -0,0 +1 @@ +Subproject commit 1d4454ea42d39a2064955f2a8de5f89787743f2a