Index: Makefile
===================================================================
--- Makefile	(revision 06b58933ad0f46995c2a676671f92a335dfdfe05)
+++ Makefile	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -85,9 +85,9 @@
 
 install-bin:
-	mkdir -p $(DESTDIR)$(BINDIR)
-	install -m 0755 $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)
+	mkdir -p $(DESTDIR)$(SBINDIR)
+	install -m 0755 $(OUTFILE) $(DESTDIR)$(SBINDIR)/$(OUTFILE)
 
 uninstall-bin:
-	rm -f $(DESTDIR)$(BINDIR)/$(OUTFILE)
+	rm -f $(DESTDIR)$(SBINDIR)/$(OUTFILE)
 
 install-dev:
@@ -113,16 +113,21 @@
 	-rmdir $(DESTDIR)$(ETCDIR)
 
-install-plugins:
+install-plugins: install-plugin-otr install-plugin-skype
+
+install-plugin-otr:
 ifdef OTR_PI
 	mkdir -p $(DESTDIR)$(PLUGINDIR)
 	install -m 0755 otr.so $(DESTDIR)$(PLUGINDIR)
 endif
+
+install-plugin-skype:
 ifdef SKYPE_PI
 	mkdir -p $(DESTDIR)$(PLUGINDIR)
 	install -m 0755 skype.so $(DESTDIR)$(PLUGINDIR)
-	mkdir -p $(DESTDIR)$(ETCDIR)/../skyped
+	mkdir -p $(DESTDIR)$(ETCDIR)/../skyped $(DESTDIR)$(BINDIR)
 	install -m 0644 $(SRCDIR)protocols/skype/skyped.cnf $(DESTDIR)$(ETCDIR)/../skyped/skyped.cnf
 	install -m 0644 $(SRCDIR)protocols/skype/skyped.conf.dist $(DESTDIR)$(ETCDIR)/../skyped/skyped.conf
 	install -m 0755 $(SRCDIR)protocols/skype/skyped.py $(DESTDIR)$(BINDIR)/skyped
+	make -C protocols/skype install-doc
 endif
 
Index: configure
===================================================================
--- configure	(revision 06b58933ad0f46995c2a676671f92a335dfdfe05)
+++ configure	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -9,5 +9,6 @@
 
 prefix='/usr/local/'
-bindir='$prefix/sbin/'
+bindir='$prefix/bin/'
+sbindir='$prefix/sbin/'
 etcdir='$prefix/etc/bitlbee/'
 mandir='$prefix/share/man/'
@@ -59,4 +60,5 @@
 --prefix=...	Directories to put files in		$prefix
 --bindir=...						$bindir
+--sbindir=...						$sbindir
 --etcdir=...						$etcdir
 --mandir=...						$mandir
@@ -99,4 +101,5 @@
 # Expand $prefix and get rid of double slashes
 bindir=`eval echo "$bindir/" | sed 's/\/\{1,\}/\//g'`
+sbindir=`eval echo "$sbindir/" | sed 's/\/\{1,\}/\//g'`
 etcdir=`eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g'`
 mandir=`eval echo "$mandir/" | sed 's/\/\{1,\}/\//g'`
@@ -117,4 +120,5 @@
 PREFIX=$prefix
 BINDIR=$bindir
+SBINDIR=$sbindir
 ETCDIR=$etcdir
 MANDIR=$mandir
Index: debian/bitlbee-plugin-skype.docs
===================================================================
--- debian/bitlbee-plugin-skype.docs	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
+++ debian/bitlbee-plugin-skype.docs	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -0,0 +1,2 @@
+protocols/skype/NEWS
+protocols/skype/README
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 06b58933ad0f46995c2a676671f92a335dfdfe05)
+++ debian/changelog	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -1,2 +1,12 @@
+bitlbee (3.0.4-0) unstable; urgency=low
+
+  * New upstream release.
+  * Added bitlbee-plugin-skype and skyped packages, now part of BitlBee
+    instead of a separate package.
+  * Fixed dependencies of bitlbee-plugin-otr package to not break with
+    binary MTUs. (Closes: #651612)
+
+ -- Wilmer van der Gaast <wilmer@gaast.net>  Sat, 10 Dec 2011 22:42:08 +0000
+
 bitlbee (3.0.3-1) unstable; urgency=low
 
Index: debian/control
===================================================================
--- debian/control	(revision 06b58933ad0f46995c2a676671f92a335dfdfe05)
+++ debian/control	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -61,5 +61,5 @@
 Package: bitlbee-plugin-otr
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (= ${bee:Version}) | bitlbee-libpurple (= ${bee:Version}), bitlbee-common (= ${bee:Version})
+Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (>= ${bee:Version}) | bitlbee-libpurple (>= ${bee:Version}), bitlbee (<< ${bee:Version}.1~) | bitlbee-libpurple (<< ${bee:Version}.1~)
 Description: An IRC to other chat networks gateway (OTR plugin)
  This program can be used as an IRC server which forwards everything you
@@ -69,2 +69,25 @@
  This package contains a plugin that adds support for Off-The-Record
  encryption of instant messages.
+
+Package: bitlbee-plugin-skype
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, bitlbee (>= ${bee:Version}) | bitlbee-libpurple (>= ${bee:Version}), bitlbee (<< ${bee:Version}.1~) | bitlbee-libpurple (<< ${bee:Version}.1~)
+Recommends: skyped
+Description: An IRC to other chat networks gateway (Skype plugin)
+ This program can be used as an IRC server which forwards everything you
+ say to people on other chat networks: Jabber (which includes Google Talk
+ and Facebook Chat), ICQ, AIM, MSN, Yahoo! and Twitter/Identica/Status.net.
+ .
+ This package contains a plugin that adds support for the Skype IM network.
+ You need to download and install the Skype client for this to work.
+
+Package: skyped
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.5), python-gnutls, python-skype (>=0.9.28.7)
+Recommends: skype
+Description: Daemon to control Skype remotely
+ Daemon to control the GUI Skype client. Currently required to control Skype
+ from the BitlBee IRC2IM gateway. Skyped and Skype can run on a different
+ host than the BitlBee server, the communication is encrypted.
+ .
+ You need to download and install the Skype client for this to work.
Index: debian/rules
===================================================================
--- debian/rules	(revision 06b58933ad0f46995c2a676671f92a335dfdfe05)
+++ debian/rules	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -11,4 +11,5 @@
 BITLBEE_LIBPURPLE ?= 1
 BITLBEE_OTR ?= plugin
+BITLBEE_SKYPE ?= plugin
 BITLBEE_CONFIGURE_FLAGS ?=
 DEBUG ?= 0
@@ -27,4 +28,8 @@
 endif
 
+ifneq ($(BITLBEE_SKYPE),plugin)
+DH_OPTIONS += -Nbitlbee-plugin-skype -Nskyped
+endif
+
 build: build-stamp
 build-stamp:
@@ -32,5 +37,5 @@
 
 	mkdir -p debian/build-native
-	ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent --otr=$(BITLBEE_OTR) $(BITLBEE_CONFIGURE_FLAGS)
+	ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent --otr=$(BITLBEE_OTR) --skype=$(BITLBEE_SKYPE) $(BITLBEE_CONFIGURE_FLAGS)
 	$(MAKE) -C debian/build-native
 
@@ -64,5 +69,9 @@
 	$(MAKE) -C debian/build-native install-etc install-doc DESTDIR=`pwd`/debian/bitlbee-common
 	$(MAKE) -C debian/build-native install-dev DESTDIR=`pwd`/debian/bitlbee-dev
-	$(MAKE) -C debian/build-native install-plugins DESTDIR=`pwd`/debian/bitlbee-plugin-otr
+	$(MAKE) -C debian/build-native install-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr
+	$(MAKE) -C debian/build-native install-plugin-skype DESTDIR=`pwd`/debian/skyped
+
+	mkdir -p debian/bitlbee-plugin-skype/usr
+	mv debian/skyped/usr/lib debian/bitlbee-plugin-skype/usr
 
 ifeq ($(BITLBEE_LIBPURPLE),1)
Index: debian/skyped.README.Debian
===================================================================
--- debian/skyped.README.Debian	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
+++ debian/skyped.README.Debian	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -0,0 +1,18 @@
+bitlbee-skype for Debian
+------------------------
+
+The upstream package installs global configuration files in /etc. Since 
+configuration cannot be used by multiple users, however, the default for 
+Debian packages is in ~/.skyped/. Please copy the configuration files 
+from ./examples to ~/.skyped/. 
+
+You will also need to change the configuration values in skyped.conf 
+and skyped.cnf to suit your needs and create the keys. More information
+in the respective files as well as the README.gz.
+
+Without these measures, skyped will NOT work. 
+
+You need to download the official skype client for this to be of any
+use. Go to http://www.skype.com/.
+
+ -- David Spreen <netzwurm@debian.org>, Thu,  2 Apr 2009 15:01:25 -0700
Index: debian/skyped.docs
===================================================================
--- debian/skyped.docs	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
+++ debian/skyped.docs	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -0,0 +1,2 @@
+protocols/skype/NEWS
+protocols/skype/README
Index: protocols/skype/Makefile
===================================================================
--- protocols/skype/Makefile	(revision 06b58933ad0f46995c2a676671f92a335dfdfe05)
+++ protocols/skype/Makefile	(revision 57da9609d3b24014813ec39af844c70c466bcd9c)
@@ -1,5 +1,5 @@
 -include ../../Makefile.settings
 ifdef SRCDIR
-SRCDIR := $(SRCDIR)protocls/skype/
+SRCDIR := $(SRCDIR)protocols/skype/
 endif
 
@@ -23,7 +23,7 @@
 all: $(LIBS) $(MANPAGES)
 
-skype.$(SHARED_EXT): skype.c config.mak
+skype.$(SHARED_EXT): $(SRCDIR)skype.c config.mak
 ifeq ($(BITLBEE),yes)
-	$(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) skype.c $(LDFLAGS)
+	$(CC) $(CFLAGS) $(SHARED_FLAGS) -o skype.$(SHARED_EXT) $(SRCDIR)skype.c $(LDFLAGS)
 endif
 
@@ -47,5 +47,5 @@
 endif
 
-client: client.c
+client: $(SRCDIR)client.c
 
 autogen: configure.ac
@@ -57,5 +57,5 @@
 
 distclean: clean
-	rm -f config.log config.mak config.status
+	rm -f config.log config.mak config.status skyped.1
 
 autoclean: distclean
@@ -103,5 +103,5 @@
 	git shortlog -s -n |sed 's/.*\t//'> AUTHORS
 
-%.1: %.txt asciidoc.conf
-	a2x --asciidoc-opts="-f asciidoc.conf" \
+%.1: $(SRCDIR)%.txt $(SRCDIR)asciidoc.conf
+	a2x --asciidoc-opts="-f $(SRCDIR)asciidoc.conf" \
 		-a bs_version=$(VERSION) -a bs_date=$(DATE) -f manpage $<
