diff -pruN 3.6-1.5/debian/bitlbee-common.install 3.6-2/debian/bitlbee-common.install
--- 3.6-1.5/debian/bitlbee-common.install	1970-01-01 00:00:00.000000000 +0000
+++ 3.6-2/debian/bitlbee-common.install	2025-10-11 05:47:15.000000000 +0000
@@ -0,0 +1 @@
+init/*.service	/usr/lib/systemd/system/
diff -pruN 3.6-1.5/debian/bitlbee-common.lintian-overrides 3.6-2/debian/bitlbee-common.lintian-overrides
--- 3.6-1.5/debian/bitlbee-common.lintian-overrides	1970-01-01 00:00:00.000000000 +0000
+++ 3.6-2/debian/bitlbee-common.lintian-overrides	2025-10-11 05:47:15.000000000 +0000
@@ -0,0 +1,3 @@
+# Seems upstream prefers errors to syslog instead of the default journal
+bitlbee-common: systemd-service-file-uses-deprecated-syslog-facility StandardError=syslog [usr/lib/systemd/system/bitlbee@.service]
+
diff -pruN 3.6-1.5/debian/bitlbee-libpurple.lintian-overrides 3.6-2/debian/bitlbee-libpurple.lintian-overrides
--- 3.6-1.5/debian/bitlbee-libpurple.lintian-overrides	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/bitlbee-libpurple.lintian-overrides	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-# manpage is installed in bitlbee-common, which bitlbee depends on
-bitlbee-libpurple: binary-without-manpage usr/sbin/bitlbee
diff -pruN 3.6-1.5/debian/bitlbee.lintian-overrides 3.6-2/debian/bitlbee.lintian-overrides
--- 3.6-1.5/debian/bitlbee.lintian-overrides	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/bitlbee.lintian-overrides	2025-10-11 05:47:15.000000000 +0000
@@ -1,2 +1,2 @@
 # manpage is installed in bitlbee-common, which bitlbee depends on
-bitlbee: binary-without-manpage usr/sbin/bitlbee
+bitlbee: no-manual-page usr/sbin/bitlbee
diff -pruN 3.6-1.5/debian/changelog 3.6-2/debian/changelog
--- 3.6-1.5/debian/changelog	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/changelog	2025-10-11 05:47:15.000000000 +0000
@@ -1,3 +1,43 @@
+bitlbee (3.6-2) unstable; urgency=medium
+
+  * QA upload.
+
+  [ Andreas Tille ]
+  * Move Debian maintenance to Debian/ team on Salsa
+    Closes: #1114687
+  * Take over further d/copyright changes from Github packaging
+  * d/watch: version=4
+  * Remove old FSF address from d/copyright
+  * Remove Homepage field from d/u/metadata
+  * Short dh
+  * Install systemd unit provided by upstream
+    Closes: #981437, #1039138
+  * d/copyright: Remove old FSF address
+  * Drop unused lintian-override
+  * Apply patch via quilt instead manually in d/rules
+  * Standards-Version: 4.7.2 (routine-update)
+  * debhelper-compat 13 (routine-update)
+  * Remove trailing whitespace in debian/copyright (routine-update)
+  * Do not parse d/changelog (routine-update)
+  * bitlbee-common: Pre-Depends: ${misc:Pre-Depends}
+  * lintian-overrides: Seems upstream prefers errors to syslog instead of the
+    default journal
+  * Update renamed lintian tag names in lintian overrides.
+
+  [ Jelmer Vernooĳ ]
+  * Use secure URI in debian/watch.
+  * Use secure URI in Homepage field.
+  * Add missing colon in closes line.
+  * Remove obsolete fields Name from debian/upstream/metadata.
+  * Add configuration to prevent lintian-brush upgrading to newer version of
+    debhelper.
+  * Fix day-of-week for changelog entries 0.81a-1.
+  * Set upstream metadata fields: Repository.
+  * Use system libjsonparser rather than bundled one.
+    Closes: #958251
+
+ -- Andreas Tille <tille@debian.org>  Sat, 11 Oct 2025 07:47:15 +0200
+
 bitlbee (3.6-1.5) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -723,7 +763,7 @@ bitlbee (0.81a-1) unstable; urgency=low
 
   * New upstream release.
 
- -- Wilmer van der Gaast <lintux@debian.org>  Wed, 16 Oct 2003 16:21:31 +0200
+ -- Wilmer van der Gaast <lintux@debian.org>  Thu, 16 Oct 2003 16:21:31 +0200
 
 bitlbee (0.81-1) unstable; urgency=low
 
diff -pruN 3.6-1.5/debian/compat 3.6-2/debian/compat
--- 3.6-1.5/debian/compat	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/compat	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-10
diff -pruN 3.6-1.5/debian/control 3.6-2/debian/control
--- 3.6-1.5/debian/control	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/control	2025-10-11 05:47:15.000000000 +0000
@@ -1,19 +1,32 @@
 Source: bitlbee
+Standards-Version: 4.7.2
+Maintainer: Debian QA Group <packages@qa.debian.org>
 Section: net
 Priority: optional
-Maintainer: Wilmer van der Gaast <wilmer@gaast.net>
-Uploaders: Jelmer Vernooĳ <jelmer@debian.org>
-Standards-Version: 3.9.8
-Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls28-dev | libgnutls-dev | gnutls-dev, po-debconf, libpurple-dev, libotr5-dev, debhelper (>= 10~), python3
-Homepage: http://www.bitlbee.org/
-Vcs-Git: https://github.com/bitlbee/bitlbee
-Vcs-Browser: https://github.com/bitlbee/bitlbee
+Build-Depends:
+ libglib2.0-dev,
+ libevent-dev,
+ libgnutls28-dev | libgnutls-dev | gnutls-dev,
+ po-debconf,
+ libpurple-dev,
+ libotr5-dev,
+ debhelper-compat (= 13),
+ python3,
+ libjsonparser-dev,
+Vcs-Browser: https://salsa.debian.org/debian/bitlbee
+Vcs-Git: https://salsa.debian.org/debian/bitlbee.git
+Homepage: https://www.bitlbee.org/
 
 Package: bitlbee
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${binary:Version})
-Conflicts: bitlbee-libpurple
-Replaces: bitlbee-libpurple
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ bitlbee-common (= ${binary:Version}),
+Conflicts:
+ bitlbee-libpurple,
+Replaces:
+ bitlbee-libpurple,
 Description: IRC to other chat networks gateway (default version)
  This program can be used as an IRC server which forwards everything you
  say to people on other chat networks: Jabber (which includes Google
@@ -21,9 +34,14 @@ Description: IRC to other chat networks
 
 Package: bitlbee-libpurple
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${binary:Version})
-Conflicts: bitlbee
-Replaces: bitlbee
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ bitlbee-common (= ${binary:Version}),
+Conflicts:
+ bitlbee,
+Replaces:
+ bitlbee,
 Description: IRC to other chat networks gateway (using libpurple)
  This program can be used as an IRC server which forwards everything you
  say to people on other chat networks: Jabber (which includes Google
@@ -38,8 +56,12 @@ Description: IRC to other chat networks
 
 Package: bitlbee-common
 Architecture: any
-Depends: ${misc:Depends}, adduser
-Replaces: bitlbee
+Depends:
+ ${misc:Depends},
+ adduser,
+Replaces:
+ bitlbee,
+Pre-Depends: ${misc:Pre-Depends}
 Description: IRC to other chat networks gateway (common files/docs)
  This program can be used as an IRC server which forwards everything you
  say to people on other chat networks: Jabber (which includes Google
@@ -50,7 +72,10 @@ Description: IRC to other chat networks
 
 Package: bitlbee-dev
 Architecture: any
-Depends: ${misc:Depends}, bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}), bitlbee-common (= ${binary:Version})
+Depends:
+ ${misc:Depends},
+ bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}),
+ bitlbee-common (= ${binary:Version}),
 Description: IRC to other chat networks gateway (dev files)
  This program can be used as an IRC server which forwards everything you
  say to people on other chat networks: Jabber (which includes Google
@@ -60,7 +85,11 @@ Description: IRC to other chat networks
 
 Package: bitlbee-plugin-otr
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}), bitlbee-common (= ${binary:Version})
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}),
+ bitlbee-common (= ${binary:Version}),
 Description: IRC to other chat networks gateway (OTR 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
diff -pruN 3.6-1.5/debian/copyright 3.6-2/debian/copyright
--- 3.6-1.5/debian/copyright	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/copyright	2025-10-11 05:47:15.000000000 +0000
@@ -1,69 +1,61 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: bitlbee
+Source: https://github.com/bitlbee/bitlbee
 
 Files: *
-Copyright: 
-           1998-1999, Adam Fritzler <afritz@auk.cx>
+Copyright:
            2002-2006, Jelmer Vernooij <jelmer@samba.org>
-           2006, Marijn Kruisselbrink and others
+           2001-2013, Wilmer 'Lintux' van der Gaast <wilmer@gaast.net>
+License: GPL-2+
+
+Files: lib/misc.c
+       lib/proxy.?
+       protocols/nogaim.h
+Copyright:
            1998-1999, Mark Spencer <markster@marko.net>
-           (and possibly other members of the Gaim team)
+           2002-2006, Jelmer Vernooij <jelmer@samba.org>
+           2001-2013, Wilmer 'Lintux' van der Gaast <wilmer@gaast.net>
+License: GPL-2+
+
+Files: otr.?
+Copyright: 2008-2013, Sven Moritz Hallberg <pesco@khjk.org>
+License: GPL-2+
+
+Files: dcc.?
+       lib/ftutil.?
+       protocols/jabber/si.c
+       protocols/jabber/s5bytestream.c
+Copyright: 2007-2008, Uli Meis <a.sporto+bee@gmail.com>
+License: GPL-2+
+
+Files: dcc.h
+       protocols/ft.h
+Copyright:
+           2006, Marijn Kruisselbrink
+           2007-2008, Uli Meis <a.sporto+bee@gmail.com>
+License: GPL-2+
+
+Files: protocols/jabber/hipchat.c
+Copyright: 2015, Xamarin Inc
+License: GPL-2+
+
+Files: lib/canohost.c
+Copyright: 1995, Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
+License: OpenSSH
+
+Files: configure
+Copyright:
            2007-2013, Miklos Vajna <vmiklos@vmiklos.hu>
            2002, Sjoerd 'lucumo' Hemminga <sjoerd@hemminga-online.nl>
-           2008-2013, Sven Moritz Hallberg <pesco@khjk.org>
-           2007-2008, Uli Meis <a.sporto+bee@gmail.com>
            2001-2013, Wilmer 'Lintux' van der Gaast <wilmer@gaast.net>
-           2015, Xamarin Inc
 License: GPL-2+
 
-Files: protocols/oscar/admin.c
-       protocols/oscar/admin.h
-       protocols/oscar/aim.h
-       protocols/oscar/aim_internal.h
-       protocols/oscar/aim_prefixes.h
-       protocols/oscar/auth.c
-       protocols/oscar/bos.c
-       protocols/oscar/bos.h
-       protocols/oscar/buddylist.c
-       protocols/oscar/buddylist.h
-       protocols/oscar/chat.c
-       protocols/oscar/chat.h
-       protocols/oscar/chatnav.c
-       protocols/oscar/chatnav.h
-       protocols/oscar/conn.c
-       protocols/oscar/icq.c
-       protocols/oscar/icq.h
-       protocols/oscar/im.c
-       protocols/oscar/im.h
-       protocols/oscar/info.c
-       protocols/oscar/info.h
-       protocols/oscar/Makefile
-       protocols/oscar/misc.c
-       protocols/oscar/msgcookie.c
-       protocols/oscar/oscar_util.c
-       protocols/oscar/rxhandlers.c
-       protocols/oscar/rxqueue.c
-       protocols/oscar/search.c
-       protocols/oscar/search.h
-       protocols/oscar/service.c
-       protocols/oscar/snac.c
-       protocols/oscar/ssi.c
-       protocols/oscar/ssi.h
-       protocols/oscar/stats.c
-       protocols/oscar/tlv.c
-       protocols/oscar/txqueue.c
-       protocols/twitter/twitter.c
-       protocols/twitter/twitter.h
-       protocols/twitter/twitter_http.c
-       protocols/twitter/twitter_http.h
-       protocols/twitter/twitter_lib.c
-       protocols/twitter/twitter_lib.h
-Copyright: 1998-1999, Adam Fritzler <afritz@auk.cx>
-           2009-2010, Geert Mulders <g.c.w.m.mulders@gmail.com>
+Files: protocols/twitter/*
+Copyright: 2009-2010, Geert Mulders <g.c.w.m.mulders@gmail.com>
            2002-2013, Wilmer 'Lintux' van der Gaast <wilmer@gaast.net>
 License: LGPL-2.1
 
-Files: lib/json.c
-       lib/json.h
+Files: lib/json.?
 Copyright: 2012-2014, James McLaughlin
 License: BSD-2-clause
 
@@ -108,10 +100,6 @@ License: GPL-2+
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  .
- You should have received a copy of the GNU General Public License along with
- this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
- St, Fifth Floor, Boston, MA 02110-1301 USA
- .
  On Debian systems, the complete text of the GNU General Public License version 2
  can be found in /usr/share/common-licenses/GPL-2.
 
@@ -138,10 +126,65 @@ License: LGPL-2.1
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  .
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- .
  On Debian systems, the complete text of the GNU Lesser General Public
  License can be found in /usr/share/common-licenses/LGPL-2.1 file.
 
+License: OpenSSH
+ Tatu Ylonen's original licence is as follows (excluding some terms about
+ third-party code which are no longer relevant; see the LICENCE file for
+ details):
+ .
+   As far as I am concerned, the code I have written for this software
+   can be used freely for any purpose.  Any derived versions of this
+   software must be clearly marked as such, and if the derived work is
+   incompatible with the protocol description in the RFC file, it must be
+   called by a name other than "ssh" or "Secure Shell".
+ .
+   Note that any information and cryptographic algorithms used in this
+   software are publicly available on the Internet and at any major
+   bookstore, scientific library, and patent office worldwide.  More
+   information can be found e.g. at "http://www.cs.hut.fi/crypto".
+ .
+   The legal status of this program is some combination of all these
+   permissions and restrictions.  Use only at your own responsibility.
+   You will be responsible for any legal consequences yourself; I am not
+   making any claims whether possessing or using this is legal or not in
+   your country, and I am not taking any responsibility on your behalf.
+ .
+ Most remaining components of the software are provided under a standard
+ 2-term BSD licence:
+ .
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+ .
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ Some code is licensed under an ISC-style license, to the following
+ copyright holders:
+ .
+  Permission to use, copy, modify, and distribute this software for any
+  purpose with or without fee is hereby granted, provided that the above
+  copyright notice and this permission notice appear in all copies.
+  .
+  THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL
+  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+  OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE
+  FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+  OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff -pruN 3.6-1.5/debian/lintian-brush.conf 3.6-2/debian/lintian-brush.conf
--- 3.6-1.5/debian/lintian-brush.conf	1970-01-01 00:00:00.000000000 +0000
+++ 3.6-2/debian/lintian-brush.conf	2025-10-11 05:47:15.000000000 +0000
@@ -0,0 +1,2 @@
+# Be at least compatible with trusty, for backports.
+compat-release = trusty
diff -pruN 3.6-1.5/debian/patches/bitlbee.conf.diff 3.6-2/debian/patches/bitlbee.conf.diff
--- 3.6-1.5/debian/patches/bitlbee.conf.diff	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/patches/bitlbee.conf.diff	2025-10-11 05:47:15.000000000 +0000
@@ -1,5 +1,9 @@
---- bitlbee.conf	2009-06-01 00:20:24.000000000 +0100
-+++ bitlbee.conf	2009-06-07 21:16:19.000000000 +0100
+Author: Wilmer van der Gaast
+Last-Update: 2009-06-07
+Description: Run bitlbee as user bitlbee instead of root
+
+--- a/bitlbee.conf
++++ b/bitlbee.conf
 @@ -23,13 +23,18 @@
  ## If BitlBee is started by root as a daemon, it can drop root privileges,
  ## and change to the specified user.
diff -pruN 3.6-1.5/debian/patches/replace-libgcrypt-configure-with-pkg-con.patch 3.6-2/debian/patches/replace-libgcrypt-configure-with-pkg-con.patch
--- 3.6-1.5/debian/patches/replace-libgcrypt-configure-with-pkg-con.patch	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/patches/replace-libgcrypt-configure-with-pkg-con.patch	2025-10-11 05:47:15.000000000 +0000
@@ -10,8 +10,6 @@ https://bugs.debian.org/cgi-bin/bugrepor
 
 ---
 
-diff --git a/configure b/configure
-index fd8d363a..3be785a1 100755
 --- a/configure
 +++ b/configure
 @@ -402,8 +402,8 @@ detect_gnutls()
diff -pruN 3.6-1.5/debian/patches/series 3.6-2/debian/patches/series
--- 3.6-1.5/debian/patches/series	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/patches/series	2025-10-11 05:47:15.000000000 +0000
@@ -1 +1,2 @@
+bitlbee.conf.diff
 replace-libgcrypt-configure-with-pkg-con.patch
diff -pruN 3.6-1.5/debian/rules 3.6-2/debian/rules
--- 3.6-1.5/debian/rules	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/rules	2025-10-11 05:47:15.000000000 +0000
@@ -1,11 +1,5 @@
 #!/usr/bin/make -f
 #
-# Finally switching to debhelper.
-#
-# Not using debhelper was an exercise suggested to me by my AM (Gergely
-# Nagy). It was educating at the time but I finally decided that the
-# exercise is over now.
-#
 
 export PYTHON = python3
 
@@ -17,7 +11,8 @@ DEBUG ?= 0
 
 ifndef BITLBEE_VERSION
 # Want to use the full package version number instead of just the release.
-BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION="$(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')"
+include /usr/share/dpkg/default.mk
+BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=$(DEB_VERSION)
 endif
 
 ifneq ($(BITLBEE_LIBPURPLE),1)
@@ -28,20 +23,15 @@ ifneq ($(BITLBEE_OTR),plugin)
 DH_OPTIONS += -Nbitlbee-plugin-otr
 endif
 
-CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
-CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
-LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
-
 CONFIGURE_OVERRIDES:=CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
-HAS_DH_SYSTEMD:=$(shell dpkg-query -W -f='$${Status}' dh-systemd 2>/dev/null | grep -c "ok installed")
-
-build-arch: build
+%:
+	dh $@
 
-build: build-stamp
-build-stamp:
-	dh_testdir
+override_dh_auto_configure:
+	echo "Configure and build are done in dh_auto_build"
 
+override_dh_auto_build:
 	mkdir -p debian/build-native
 	ROOT=$$PWD; cd debian/build-native; $(BITLBEE_CONFIGURE_VERSION) $(CONFIGURE_OVERRIDES) $$ROOT/configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent --otr=$(BITLBEE_OTR) --systemdsystemunitdir=/lib/systemd/system --pcdir=/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig $(BITLBEE_CONFIGURE_FLAGS)
 	$(MAKE) -C debian/build-native
@@ -55,76 +45,33 @@ endif
 	$(MAKE) -C doc
 	$(MAKE) -C doc/user-guide
 
-	touch build-stamp
+	SYSTEMDSYSTEMUNITDIR=/usr/lib/systemd/system/ make systemd
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp
-
-	rm -rf build-arch-stamp debian/build-* debian/bitlbee-libpurple.prerm
+override_dh_auto_clean:
+	rm -rf debian/build-* debian/bitlbee-libpurple.prerm
 	$(MAKE) distclean
 
-	dh_clean
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
+override_dh_auto_test:
+	echo "FIXME: Run upstream build time test"
 
+override_dh_auto_install:
 	$(MAKE) -C debian/build-native install-bin DESTDIR=`pwd`/debian/bitlbee
 	$(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-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr
 
-ifeq ($(HAS_DH_SYSTEMD),1)
-	$(MAKE) -C debian/build-native install-systemd DESTDIR=`pwd`/debian/bitlbee-common
-endif
-
 ifeq ($(BITLBEE_LIBPURPLE),1)
 	$(MAKE) -C debian/build-libpurple install-bin DESTDIR=`pwd`/debian/bitlbee-libpurple
 	ln -sf debian/bitlbee.prerm debian/bitlbee-libpurple.prerm
 endif
 
-	patch debian/bitlbee-common/etc/bitlbee/bitlbee.conf debian/patches/bitlbee.conf.diff
 	chmod 640 debian/bitlbee-common/etc/bitlbee/bitlbee.conf
 
-binary-common:
-	dh_testdir
-	dh_testroot
-
-	dh_installexamples
+override_dh_installdocs:
 	dh_installdocs --link-doc=bitlbee-common
+
+override_dh_installchangelogs:
 	dh_installchangelogs doc/CHANGES
-	dh_installdebconf
-ifeq ($(HAS_DH_SYSTEMD),1)
-	dh_systemd_enable -p bitlbee-common --no-enable bitlbee.socket
-	dh_systemd_enable -p bitlbee-common bitlbee.service
-	dh_installinit -p bitlbee-common --init-script=bitlbee
-	dh_systemd_start -p bitlbee-common
-else
+
+override_dh_installinit:
 	dh_installinit -p bitlbee-common --init-script=bitlbee
-endif
-	dh_installman
-	dh_lintian
-	dh_strip
-	dh_link
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary-arch: build install
-	DH_OPTIONS=-a $(MAKE) -f debian/rules binary-common
-
-binary-%: build install
-	DH_OPTIONS=-p$* $(MAKE) -f debian/rules binary-common
-
-binary: binary-arch
-build-arch: build
-build-indep: build
-.PHONY: build build-arch build-indep clean binary-arch binary-common binary install
diff -pruN 3.6-1.5/debian/upstream/metadata 3.6-2/debian/upstream/metadata
--- 3.6-1.5/debian/upstream/metadata	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/upstream/metadata	2025-10-11 05:47:15.000000000 +0000
@@ -1,7 +1,5 @@
-Name: bitlbee
-Repository: https://github.com/bitlbee/bitlbee
+Repository: https://github.com/bitlbee/bitlbee.git
 Repository-Browse: https://github.com/bitlbee/bitlbee
-Homepage: https://www.bitlbee.org/
 Bug-Database: https://bugs.bitlbee.org/
 Bug-Submit: https://bugs.bitlbee.org/newticket
 Documentation: https://wiki.bitlbee.org/
diff -pruN 3.6-1.5/debian/watch 3.6-2/debian/watch
--- 3.6-1.5/debian/watch	2025-02-14 07:20:44.000000000 +0000
+++ 3.6-2/debian/watch	2025-10-11 05:47:15.000000000 +0000
@@ -1,2 +1,2 @@
-version=2
-http://get.bitlbee.org/src/bitlbee-(.*).tar.gz
+version=4
+https://get.bitlbee.org/src/bitlbee-(.*).tar.gz
