Commit 71944387 authored by Richard Bayerle's avatar Richard Bayerle
Browse files

Changed the build to use proper static libs of the submodules.

And other minor things.
parent f33833d9
......@@ -19,10 +19,10 @@ It only uses libpurple functions, so if they are implemented in the client corre
That being said, indicating encrypted chats by setting the topic does not seem to work in Finch (maybe just because window titles are very short). The encryption itself does work though, which you can confirm by looking at the sent/received messages in the debug log.
## Installation
1. Install the (submodules') dependencies (`libpurple-dev`, `libmxml-dev`, `libsqlite3-dev`, `libgcrypt20-dev`)
1. Install the (submodules') dependencies (`libpurple-dev`, `libmxml-dev`, `libxml2-dev`, `libsqlite3-dev`, `libgcrypt20-dev`)
1. `git clone https://github.com/gkdr/lurch/`
2. `cd lurch`
3. `git submodule update --init`
3. `git submodule update --init` (If you just pull a newer version, remember to also update the submodules as they might have changed!)
4. `make`
5. A final `make install` should copy the compiled plugin into your libpurple plugin dir.
6. The next time you start Pidgin (or another libpurple client), you should be able to activate it in the "Plugins" window.
......
Subproject commit 211647e452f14d88e5c1c33c98f04271295c0dc7
Subproject commit a100d401f27650610af6942e891e55ddb8b21737
Subproject commit 1fbb33f42ad6f1d772b6178aa69ed65788129612
Subproject commit 1be885b958e9d513db69383d3a0b18083ce86929
......@@ -11,40 +11,45 @@ LOMEMO_DIR=$(LDIR)/libomemo
LOMEMO_SRC=$(LOMEMO_DIR)/src
LOMEMO_BUILD=$(LOMEMO_DIR)/build
LOMEMO_FILES=$(LOMEMO_BUILD)/libomemo.o $(LOMEMO_BUILD)/libomemo_storage.o $(LOMEMO_BUILD)/libomemo_crypto.o
LOMEMO_PATH=$(LOMEMO_BUILD)/libomemo-conversations.a
AXC_DIR=$(LDIR)/axc
AXC_SRC=$(AXC_DIR)/src
AXC_BUILD=$(AXC_DIR)/build
AXC_FILES=$(AXC_BUILD)/axc.o $(AXC_BUILD)/axc_store.o $(AXC_BUILD)/axc_crypto.o
AXC_PATH=$(AXC_BUILD)/libaxc.a
AX_DIR=$(AXC_DIR)/lib/libaxolotl-c
AX_PATH=$(AX_DIR)/build/src/libaxolotl-c.a
FILES=$(LOMEMO_FILES) $(AXC_FILES) $(AX_DIR)/build/src/libaxolotl-c.a
FILES=$(LOMEMO_PATH) $(AXC_PATH) $(AX_PATH)
HEADERS=-I$(HDIR)/jabber -I$(LOMEMO_SRC) -I$(AXC_SRC) -I$(AX_DIR)/src
PKGCFG_C=$(shell pkg-config --cflags glib-2.0 purple) $(shell xml2-config --cflags)
PKGCFG_L=$(shell pkg-config --libs purple glib-2.0 sqlite3 mxml) $(shell xml2-config --libs) -L$(shell pkg-config --variable=plugindir purple) $(shell libgcrypt-config --libs)
CFLAGS=-std=c11 -Wall -Wstrict-overflow -D_XOPEN_SOURCE=700 -D_BSD_SOURCE $(PKGCFG_C) $(HEADERS)
CFLAGS=-std=c11 -Wall -g -Wstrict-overflow -D_XOPEN_SOURCE=700 -D_BSD_SOURCE $(PKGCFG_C) $(HEADERS)
LFLAGS=-pthread -ldl -lm $(PKGCFG_L) -ljabber
all: lurch
all: $(BDIR)/lurch.so
$(BDIR):
mkdir -p build
axc: $(AXC_SRC)
$(AX_PATH):
cd $(AXC_DIR)/lib/libaxolotl-c/ && mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make
cd $(AXC_DIR) && make axc-pic
libomemo: $(LOMEMO_SRC)
cd $(LOMEMO_DIR) && make libomemo-conversations-pic
lurch: $(SDIR)/lurch.c axc libomemo $(BDIR)
$(AXC_PATH):
cd $(AXC_DIR) && make
$(LOMEMO_PATH):
cd $(LOMEMO_DIR) && make
$(BDIR)/lurch.so: $(SDIR)/lurch.c $(AX_PATH) $(AXC_PATH) $(LOMEMO_PATH) $(BDIR)
gcc $(CFLAGS) -fPIC -c $(SDIR)/lurch.c -o $(BDIR)/lurch.o
gcc -fPIC -shared $(CFLAGS) $(BDIR)/lurch.o $(FILES) -o $(BDIR)/lurch.so $(LFLAGS)
gcc -fPIC -shared $(CFLAGS) $(BDIR)/lurch.o $(FILES) -o $@ $(LFLAGS)
install: $(BDIR)/lurch.so
mkdir -p $(PURPLE_PLUGIN_DIR)
......
......@@ -169,6 +169,7 @@ static void lurch_queued_msg_destroy(lurch_queued_msg * qmsg_p) {
g_list_free_full(qmsg_p->recipient_addr_l_p, free);
g_hash_table_destroy(qmsg_p->sess_handled_p);
(void) sem_close(qmsg_p->mutex_p);
g_free(qmsg_p->mutex_name);
free(qmsg_p);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment