diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-02 12:38:33 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2006-03-02 12:38:33 +0100 |
commit | e506d6ce40dd357e29a7c856ab2b664df69cf015 (patch) | |
tree | 93c304f6391119afd26f12495356f98289f1880a | |
parent | 9a1555dc8521f0973347911bcb26d1038259f967 (diff) |
Install bitlbee's header files and a pkg-config file. This means
that 3rd-parties can write support for additional protocols in BitlBee.
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | bitlbee.h | 2 | ||||
-rwxr-xr-x | configure | 19 | ||||
-rw-r--r-- | doc/example_plugin.c | 3 |
4 files changed, 40 insertions, 4 deletions
@@ -10,6 +10,7 @@ # Program variables objects = account.o bitlbee.o conf.o crypting.o help.o ini.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o storage_text.o unix.o url.o user.o util.o +headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ini.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h url.h user.h protocols/http_client.h protocols/md5.h protocols/nogaim.h protocols/proxy.h protocols/sha.h protocols/ssl_client.h subdirs = protocols # Expansion of variables @@ -19,10 +20,10 @@ CFLAGS += -Wall all: $(OUTFILE) $(MAKE) -C doc -uninstall: uninstall-bin uninstall-doc +uninstall: uninstall-bin uninstall-doc uninstall-header uninstall-pc @echo -e '\nmake uninstall does not remove files in '$(DESTDIR)$(ETCDIR)', you can use make uninstall-etc to do that.\n' -install: install-bin install-doc +install: install-bin install-doc install-header install-pc @if ! [ -d $(DESTDIR)$(CONFIG) ]; then echo -e '\nThe configuration directory $(DESTDIR)$(CONFIG) does not exist yet, don'\''t forget to create it!'; fi @if ! [ -e $(DESTDIR)$(ETCDIR)/bitlbee.conf ]; then echo -e '\nNo files are installed in '$(DESTDIR)$(ETCDIR)' by make install. Run make install-etc to do that.'; fi @echo @@ -56,6 +57,21 @@ install-bin: uninstall-bin: rm -f $(DESTDIR)$(BINDIR)/$(OUTFILE) +install-header: + mkdir -p $(DESTDIR)$(INCLUDEDIR) + install -m 0644 $(headers) $(DESTDIR)$(INCLUDEDIR) + +uninstall-header: + rm -f $(foreach hdr,$(headers),$(DESTDIR)$(INCLUDEDIR)/$(hdr)) + -rmdir $(DESTDIR)$(INCLUDEDIR) + +install-pc: + mkdir -p $(DESTDIR)$(PCDIR) + install -m 0644 bitlbee.pc $(DESTDIR)$(PCDIR) + +uninstall-pc: + rm -f $(DESTDIR)$(PCDIR)/bitlbee.pc + install-etc: mkdir -p $(DESTDIR)$(ETCDIR) install -m 0644 motd.txt $(DESTDIR)$(ETCDIR)/motd.txt @@ -101,7 +101,7 @@ extern char *CONF_FILE; #include "irc.h" #include "storage.h" #include "set.h" -#include "protocols/nogaim.h" +#include "nogaim.h" #include "commands.h" #include "account.h" #include "conf.h" @@ -16,6 +16,8 @@ config='/var/lib/bitlbee/' pidfile='/var/run/bitlbee.pid' ipcsocket='/var/run/bitlbee' plugindir='$prefix/lib/bitlbee' +pcdir='$prefix/lib/pkgconfig' +includedir='$prefix/include/bitlbee' msn=1 jabber=1 @@ -79,6 +81,8 @@ config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'` plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'` pidfile=`eval echo "$pidfile" | sed 's/\/\{1,\}/\//g'` ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'` +includedir=`eval echo "$includedir" | sed 's/\/\{1,\}/\//g'` +pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'` cat<<EOF>Makefile.settings ## BitlBee settings, generated by configure @@ -90,6 +94,8 @@ DATADIR=$datadir PLUGINDIR=$plugindir CONFIG=$config IPCSOCKET=$ipcsocket +INCLUDEDIR=$includedir +PCDIR=$pcdir ARCH=$arch CPU=$cpu @@ -310,6 +316,19 @@ if [ -n "$BITLBEE_VERSION" ]; then echo fi +cat <<EOF>bitlbee.pc +prefix=$prefix +includedir=$includedir + +Name: bitlbee +Description: IRC to IM gateway +Requires: glib-2.0 +Version: $BITLBEE_VERSION +Libs: +Cflags: -I\${includedir} + +EOF + protocols='' protoobjs='' diff --git a/doc/example_plugin.c b/doc/example_plugin.c index 38d02260..a33907a8 100644 --- a/doc/example_plugin.c +++ b/doc/example_plugin.c @@ -2,10 +2,11 @@ * This is the most simple possible BitlBee plugin. To use, compile it as * a shared library and place it in the plugin directory: * - * gcc -o example.so -shared example.c + * gcc -o example.so -shared example.c `pkg-config --cflags bitlbee` * cp example.so /usr/local/lib/bitlbee */ #include <stdio.h> +#include <bitlbee.h> void init_plugin(void) { |