I've updated the Bitlbee package from version 1.0.1 to version 3.2 and added a new package for
libotr which is used by the optional CONFIG_BITLBEE_OTR setting for off-the-record encryption support.
I had originally compiled with openssl but had to move to gnutls for Jabber to successfully
negotiate a TLS connection. I switched ASCII//TRANSLIT to ASCII for Bitlbee nicknames because
transliteration wasn't working correctly with the g_convert_with_fallback() implementation used by
OpenWRT's toolchain.
My patches are also posted to Trac: https://dev.openwrt.org/ticket/14119
---
Patch 1 of 2:
diff --git a/net/bitlbee/Config.in b/net/bitlbee/Config.in
new file mode 100644
index 0000000..5571992
--- /dev/null
+++ b/net/bitlbee/Config.in
@@ -0,0 +1,60 @@
+menu "Configuration"
+ depends on PACKAGE_bitlbee
+
+config BITLBEE_ENABLE_SSL
+ bool "Enable SSL (required for MSN and Yahoo!)"
+ select PACKAGE_libgnutls
+ default y
+ help
+ Disables SSL (gnutls)
+
+config BITLBEE_MSN
+ bool "Enable MSN"
+ depends on BITLBEE_ENABLE_SSL
+ default y if BITLBEE_ENABLE_SSL
+ default n if !BITLBEE_ENABLE_SSL
+ help
+ Unset this if you don't want Bitlbee to be able to connect to MSN
networks
+
+config BITLBEE_YAHOO
+ bool "Enable Yahoo!"
+ depends on BITLBEE_ENABLE_SSL
+ default y if BITLBEE_ENABLE_SSL
+ default n if !BITLBEE_ENABLE_SSL
+ help
+ Unset this if you don't want Bitlbee to be able to connect to Yahoo! IM
network
+
+config BITLBEE_JABBER
+ bool "Enable Jabber"
+ default y
+ help
+ Unset this if you don't want Bitlbee to be able to connect to Jabber
networks
+
+config BITLBEE_OSCAR
+ bool "Enable Oscar (ICQ,AIM,etc)"
+ default y
+ help
+ Unset this if you don't want Bitlbee to be able to connect to Oscar based networks like ICQ
and AIM
+
+config BITLBEE_TWITTER
+ bool "Enable Twitter"
+ default n
+ help
+ Unset this if you don't want Bitlbee to be able to connect to Twitter.com
+
+config BITLBEE_ENABLE_PLUGINS
+ bool "Enable Plugins support"
+ default n
+ help
+ This enables plugin support for Bitlbee - unless you know how to
cross-compile
+ Plugins using OpenWRT's toolchain you might as well leave this disabled
to save
+ space.
+
+config BITLBEE_OTR
+ bool "Enable OTR support"
+ select PACKAGE_libotr
+ default n
+ help
+ This enables OTR encryption support for Bitlbee.
+
+endmenu
diff --git a/net/bitlbee/Makefile b/net/bitlbee/Makefile
index 87ce80a..fa27cad 100644
--- a/net/bitlbee/Makefile
+++ b/net/bitlbee/Makefile
@@ -8,17 +8,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bitlbee
-PKG_VERSION:=1.0.1
-PKG_RELEASE:=2
+PKG_VERSION:=3.2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://get.bitlbee.org/src \
http://get.bitlbee.be/src \
http://get.us.bitlbee.org/src \
http://ftp.snt.utwente.nl/pub/software/bitlbee/src
-PKG_MD5SUM:=a4d7daa9b64898dd41a3a6d104692d9a
+PKG_MD5SUM:=6a8fe98e96a47c636004a245075d5d7c
-PKG_BUILD_DEPENDS:=libopenssl glib1
+PKG_BUILD_DEPENDS:=glib2
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
@@ -27,16 +27,59 @@ define Package/bitlbee
SUBMENU:=Instant Messaging
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libopenssl +glib1 $(ICONV_DEPENDS)
+ DEPENDS:=+libgnutls +glib2 $(ICONV_DEPENDS)
TITLE:=IRC gateway to IM chat networks
URL:=http://www.bitlbee.org/
endef
+define Package/bitlbee/config
+ source "$(SOURCE)/Config.in"
+endef
+
define Package/bitlbee/conffiles
/etc/bitlbee/motd.txt
/etc/bitlbee/bitlbee.conf
endef
+ifeq ($(CONFIG_BITLBEE_ENABLE_SSL),y)
+ EXTRA_CONF_OPTS+= \
+ --ssl=gnutls
+ PKG_BUILD_DEPENDS+= \
+ libgnutls
+else
+ EXTRA_CONF_OPTS:=--ssl=bogus
+endif
+ifneq ($(CONFIG_BITLBEE_MSN),y)
+ EXTRA_CONF_OPTS+= \
+ --msn=0
+endif
+ifneq ($(CONFIG_BITLBEE_JABBER),y)
+ EXTRA_CONF_OPTS+= \
+ --jabber=0
+endif
+ifneq ($(CONFIG_BITLBEE_OSCAR),y)
+ EXTRA_CONF_OPTS+= \
+ --oscar=0
+endif
+ifneq ($(CONFIG_BITLBEE_YAHOO),y)
+ EXTRA_CONF_OPTS+= \
+ --yahoo=0
+endif
+ifneq ($(CONFIG_BITLBEE_TWITTER),y)
+ EXTRA_CONF_OPTS+= \
+ --twitter=0
+endif
+ifneq ($(CONFIG_BITLBEE_ENABLE_PLUGINS),y)
+ EXTRA_CONF_OPTS+= \
+ --plugins=0
+endif
+ifeq ($(CONFIG_BITLBEE_OTR),y)
+ EXTRA_CONF_OPTS+= \
+ --otr=1
+ PKG_BUILD_DEPENDS+= \
+ libotr
+endif
+
define Build/Configure
# it's not GNU autoconf stuff
(cd $(PKG_BUILD_DIR); \
@@ -51,16 +94,14 @@ define Build/Configure
--bindir=/usr/sbin/ \
--etcdir=/etc/bitlbee/ \
--datadir=/usr/share/bitlbee/ \
+ --plugins=/usr/lib/bitlbee/ \
--config=/var/lib/bitlbee/ \
--arch=OpenWrt \
--cpu="$(ARCH)" \
--debug=0 \
--strip=1 \
- --sizeopt=1 \
--ipv6=1 \
- --ssl=openssl \
- --glib1=1 \
- --glib1prefix="$(STAGING_DIR)/usr" \
+ $(EXTRA_CONF_OPTS) \
);
$(SED) 's,^CFLAGS=.*,CFLAGS=$(TARGET_CFLAGS),g'\
$(PKG_BUILD_DIR)/Makefile.settings
diff --git a/net/bitlbee/patches/100-cross_compile_configure_fix
b/net/bitlbee/patches/100-cross_compile_configure_fix
index 3ba17d2..46cfe7f 100644
--- a/net/bitlbee/patches/100-cross_compile_configure_fix
+++ b/net/bitlbee/patches/100-cross_compile_configure_fix
@@ -1,98 +1,53 @@
-diff -Nur bitlbee-1.0.1-orig/configure bitlbee-1.0.1/configure
---- bitlbee-1.0.1-orig/configure 2006-01-14 16:14:05.000000000 +0100
-+++ bitlbee-1.0.1/configure 2006-03-06 18:30:19.000000000 +0100
-@@ -21,9 +21,12 @@
+--- bitlbee-3.2-orig/configure 2013-01-06 15:41:11.000000000 -0800
++++ bitlbee-3.2/configure 2013-09-02 20:56:07.220000264 -0700
+@@ -45,6 +45,7 @@
- debug=0
- strip=1
-+sizeopt=0
- ipv6=1
- ssl=auto
-
-+glib1=0
-+
arch=`uname -s`
cpu=`uname -m`
++noresolv=0
-@@ -52,11 +55,18 @@
+ GLIB_MIN_VERSION=2.14
+@@ -82,6 +83,9 @@
--debug=0/1 Disable/enable debugging $debug
--strip=0/1 Disable/enable binary stripping $strip
-+--sizeopt=0/1 Disable/enable size optimization $sizeopt
-+
-+--arch=... Describe Operating System ?! $arch
-+--cpu=... Describe CPU $cpu
-
- --ipv6=0/1 IPv6 socket support $ipv6
-
- --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto)
- $ssl
-+--glib1=0/1 Force usage of glib1 even if glib2 is present
-+--glib1prefix=...
-+
- EOF
- exit;
- fi
-@@ -110,8 +120,13 @@
- echo 'CFLAGS=-g' >> Makefile.settings
+ --pie=0/1 Build position independent executable $pie
++--arch=... Specify OS Architecture $arch
++--cpu=... Specify CPU $cpu
++--noresolv=0/1 Set to 1 to force disabling of resolv $noresolv
+ --gcov=0/1 Disable/enable test coverage reporting $gcov
+ --plugins=0/1 Disable/enable plugins support $plugins
+ --otr=0/1/auto/plugin
+@@ -200,7 +204,7 @@
echo 'DEBUG=1' >> Makefile.settings
- echo '#define DEBUG' >> config.h
-+ if [ "$sizeopt" = "1" ]; then
-+ echo "Warning: won't optimize for size since debug is on."
-+ fi
-+elif [ "$sizeopt" = "1" ]; then
-+ echo 'CFLAGS=-Os' >> Makefile.settings
+ CFLAGS="$CFLAGS -DDEBUG"
else
-- echo 'CFLAGS=-O3' >> Makefile.settings
-+ echo 'CFLAGS=-O2' >> Makefile.settings
+- [ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing"
++ [ -z "$CFLAGS" ] && CFLAGS="-Os"
fi
- echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings
-@@ -138,24 +153,33 @@
- exit 1;
- fi
+ if [ "$pie" = "1" ]; then
+@@ -452,6 +456,13 @@
--if type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then
-+if [ "$glib1" != "1" ] && \
-+ type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then
- cat<<EOF>>Makefile.settings
- EFLAGS+=`pkg-config --libs glib-2.0`
- CFLAGS+=`pkg-config --cflags glib-2.0`
- EOF
- echo '#define GLIB2' >> config.h
--elif type glib-config > /dev/null 2> /dev/null; then
-+elif [ "x$glib1prefix" = "x" ] && \
-+ type glib-config > /dev/null 2> /dev/null; then
- cat<<EOF>>Makefile.settings
- EFLAGS+=`glib-config --libs`
- CFLAGS+=`glib-config --cflags`
- EOF
- echo '#define GLIB1' >> config.h
-+elif [ "x$glib1prefix" != "x" ] && \
-+ type "$glib1prefix/bin/glib-config" > /dev/null 2> /dev/null; then
-+ cat<<EOF>>Makefile.settings
-+EFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --libs`
-+CFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --cflags`
-+EOF
-+ echo '#define GLIB1' >> config.h
- else
- echo 'Cannot find glib development libraries, aborting. (Install
libglib-dev?)'
- exit 1;
+ if detect_resolv_dynamic || detect_resolv_static; then
+ echo '#define HAVE_RESOLV_A' >> config.h
++ if [ "$noresolv" == "0" ]; then
++ echo '#define HAVE_RESOLV_A' >> config.h
++ else
++ echo '#undef HAVE_RESOLV_A' >> config.h
++ fi
++else
++ echo '#undef HAVE_RESOLV_A' >> config.h
fi
--if [ -r /usr/include/iconv.h ]; then
-+if [ -r "$STAGING_DIR/usr/include/iconv.h" ]; then
- :;
- elif [ -r /usr/local/include/iconv.h ]; then
- echo CFLAGS+=-I/usr/local/include >> Makefile.settings;
-@@ -360,6 +384,10 @@
+ STORAGES="xml"
+@@ -721,6 +732,9 @@
CYGWIN* )
echo 'Cygwin is not officially supported.'
;;
-+OpenWrt )
-+ echo 'EFLAGS+=-liconv' >> Makefile.settings;
++OpenWRT )
+ echo "CFLAGS+=\"-I$STAGING_DIR/usr/include\"" >> Makefile.settings;
+;;
+ Windows )
+ ;;
* )
- echo 'We haven'\''t tested BitlBee on many platforms yet, yours is
untested. YMMV.'
- echo 'Please report any problems at http://bugs.bitlbee.org/.'
diff --git a/net/bitlbee/patches/200-nick_transliteration_fix
b/net/bitlbee/patches/200-nick_transliteration_fix
new file mode 100644
index 0000000..9512eba
--- /dev/null
+++ b/net/bitlbee/patches/200-nick_transliteration_fix
@@ -0,0 +1,11 @@
+--- bitlbee-3.2-orig/nick.c 2013-01-06 15:41:11.000000000 -0800
++++ bitlbee-3.2/nick.c 2013-09-03 20:19:37.052000735 -0700
+@@ -199,7 +199,7 @@
+ accents don't just get stripped. Note that it depends on
+ LC_CTYPE being set to something other than C/POSIX. */
+ if( part )
+- part = asc = g_convert_with_fallback( part, -1, "ASCII//TRANSLIT",
++ part = asc = g_convert_with_fallback( part, -1, "ASCII",
+ "UTF-8", "", NULL, NULL,
NULL );
+
+ if( ret->len == 0 && part && isdigit( *part ) )
/
/
---
Patch 2 of 2:
diff --git a/libs/libotr/Makefile b/libs/libotr/Makefile
new file mode 100644
index 0000000..01ad655
--- /dev/null
+++ b/libs/libotr/Makefile
@@ -0,0 +1,59 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libotr
+PKG_VERSION:=3.2.1
+PKG_RELEASE:=1
+#PKG_VERSION:=4.0.0
+#PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.cypherpunks.ca/otr/
+PKG_MD5SUM:=974acf937d2ce0ee89b27a9815c17a3f
+#PKG_MD5SUM:=00979dca82d70383fcd1b01f3974363c
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libotr/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ URL:=http://www.cypherpunks.ca/otr/
+endef
+
+define Package/libotr
+ $(call Package/libotr/Default)
+ DEPENDS:=+libgcrypt
+ TITLE:=OTR Messaging Library
+ MENU:=1
+endef
+
+define Package/libotr/description
+Off-the-Record (OTR) Messaging allows you to have private conversations over
+instant messaging.
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC='$(TARGET_CC) $(FPIC)' \
+ CFLAGS='$(TARGET_CFLAGS) -Wall -D_GNU_SOURCE' \
+ LDFLAGS='$(TARGET_LDFLAGS)' \
+ all
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libotr $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libotr.{a,so*,la} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libotr.pc
$(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libotr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libotr.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libotr))
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel