summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Packaging/Debian')
-rw-r--r--Swift/Packaging/Debian/.dockerignore1
-rw-r--r--Swift/Packaging/Debian/.gitignore4
-rw-r--r--Swift/Packaging/Debian/Dockerfile.package.in30
-rw-r--r--Swift/Packaging/Debian/Dockerfile.source17
-rwxr-xr-xSwift/Packaging/Debian/Testing/swift-distr-tests.sh103
-rw-r--r--Swift/Packaging/Debian/Testing/test-distr.sh88
-rwxr-xr-xSwift/Packaging/Debian/build_for_debian.sh2
-rw-r--r--Swift/Packaging/Debian/changelog.debian-unstable54
-rw-r--r--Swift/Packaging/Debian/debian/compat2
-rw-r--r--Swift/Packaging/Debian/debian/control.in23
-rw-r--r--Swift/Packaging/Debian/debian/copyright2
-rwxr-xr-xSwift/Packaging/Debian/debian/rules54
-rw-r--r--Swift/Packaging/Debian/debian/swift-im.133
-rw-r--r--Swift/Packaging/Debian/debian/swift-im.install5
-rw-r--r--Swift/Packaging/Debian/debian/swift-im.menu3
-rw-r--r--Swift/Packaging/Debian/debian/swiften-config.121
-rwxr-xr-xSwift/Packaging/Debian/package.sh4
-rwxr-xr-xSwift/Packaging/Debian/package_all_platforms.sh31
-rwxr-xr-xSwift/Packaging/Debian/package_docker.sh70
-rw-r--r--Swift/Packaging/Debian/update_debian_repo.sh114
20 files changed, 528 insertions, 133 deletions
diff --git a/Swift/Packaging/Debian/.dockerignore b/Swift/Packaging/Debian/.dockerignore
new file mode 100644
index 0000000..5d238e7
--- /dev/null
+++ b/Swift/Packaging/Debian/.dockerignore
@@ -0,0 +1 @@
+**/out
diff --git a/Swift/Packaging/Debian/.gitignore b/Swift/Packaging/Debian/.gitignore
index 5401ae0..9c8f275 100644
--- a/Swift/Packaging/Debian/.gitignore
+++ b/Swift/Packaging/Debian/.gitignore
@@ -1,3 +1,7 @@
/swift-*
/swift_*
/libswiften*
+/out/
+/swift-src/
+swift-im*.orig.tar.gz
+*.tmp.package
diff --git a/Swift/Packaging/Debian/Dockerfile.package.in b/Swift/Packaging/Debian/Dockerfile.package.in
new file mode 100644
index 0000000..b53d477
--- /dev/null
+++ b/Swift/Packaging/Debian/Dockerfile.package.in
@@ -0,0 +1,30 @@
+FROM __DISTRO__
+MAINTAINER packages@swift.im
+
+ENV DEBIAN_VERSION=__DEBIAN_VERSION__
+
+# Make sure nothing needs an interactive prompt
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN \
+ apt-get -qq update && \
+ apt-get install -y lintian devscripts scons build-essential dh-make pkg-config libssl-dev qt5-default libqt5x11extras5-dev libqt5webkit5-dev qtmultimedia5-dev qttools5-dev-tools qt5-image-formats-plugins libqt5svg5-dev libminiupnpc-dev libnatpmp-dev libhunspell-dev libxml2-dev libxss-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-signals-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev libidn11-dev docbook-xsl docbook-xml xsltproc libxml2-utils libsqlite3-dev zlib1g-dev help2man && \
+ apt-get clean
+
+RUN mkdir /swift-packages
+COPY * /swift-packages/
+
+CMD \
+ gpg --allow-secret-key-import --import /gpg-keys/*.asc && \
+ cd /swift-packages && \
+ tar xf swift-im_${DEBIAN_VERSION}*.orig.tar.gz && \
+ tar xf swift-im_${DEBIAN_VERSION}*.debian.tar.xz -C /swift-packages/swift-im-${DEBIAN_VERSION}/ && \
+ cd swift-im-${DEBIAN_VERSION} && \
+ debuild -i -I -b --lintian-opts --profile debian --pedantic && \
+ cd /swift-packages/ && \
+ rm -rf /swift-packages/swift-im-${DEBIAN_VERSION}/ && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*.orig.tar.gz && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*.debian.tar.xz && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*.dsc && \
+ rm -f /swift-packages/swift-im_${DEBIAN_VERSION}*_source.* && \
+ mv * /out/
diff --git a/Swift/Packaging/Debian/Dockerfile.source b/Swift/Packaging/Debian/Dockerfile.source
new file mode 100644
index 0000000..3c23b2c
--- /dev/null
+++ b/Swift/Packaging/Debian/Dockerfile.source
@@ -0,0 +1,17 @@
+FROM debian:stretch
+VOLUME ["/gpg-keys"]
+MAINTAINER packages@swift.im
+
+RUN \
+ apt-get -qq update && \
+ apt-get install -y lintian devscripts scons build-essential pkg-config libssl-dev qt5-default libqt5x11extras5-dev libqt5webkit5-dev qtmultimedia5-dev qttools5-dev-tools qt5-image-formats-plugins libqt5svg5-dev libminiupnpc-dev libnatpmp-dev libhunspell-dev libxml2-dev libxss-dev libboost-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-signals-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev libidn11-dev docbook-xsl docbook-xml xsltproc libxml2-utils libsqlite3-dev zlib1g-dev help2man && \
+ apt-get clean
+
+COPY swift-src /swift-src
+
+CMD \
+ gpg --allow-secret-key-import --import /gpg-keys/*.asc && \
+ cd /swift-src && \
+ mv swift-im_*.orig.tar.gz ../ && \
+ debuild -i -I -S --lintian-opts --pedantic && \
+ mv /swift-im* /out/
diff --git a/Swift/Packaging/Debian/Testing/swift-distr-tests.sh b/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
new file mode 100755
index 0000000..e817974
--- /dev/null
+++ b/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
@@ -0,0 +1,103 @@
+#!/usr/bin/env bash
+
+# Returns 0 if all releases are valid. Needs to be run with sudo
+# release_level is the level of the release to test.
+# 2 will test development stream only
+# 1 will test development and beta
+# 0 will test all three development, beta and release
+
+function finish {
+ if [ "$?" -eq 0 ] && [ "$CLEAN_INSTALL" = True ]; then
+ echo "No errors found, removing base systems."
+ rm -rf "Debian-Tests/"
+ fi
+}
+trap finish EXIT
+
+if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
+ echo "Usage $0 <release_tag> <release_level> [-c]"
+ echo "The -c flag will recreate all base systems."
+ exit 1
+fi
+RELEASE_LEVEL="$2"
+re='^[0-9]+$'
+if ! [[ "$RELEASE_LEVEL" =~ $re ]]; then
+ echo "error: release level is not a number" >&2; exit 1
+fi
+if [ "$RELEASE_LEVEL" -gt 2 ] || [ "$RELEASE_LEVEL" -lt 0 ]; then
+ echo "error: release level should be between 0 and 2" >&2; exit 1
+fi
+if [ "$3" == "-c" ]; then
+ echo "The script will create all base systems from scratch."
+ CLEAN_INSTALL=True
+else
+ CLEAN_INSTALL=False
+fi
+
+declare -A arr
+#Ubuntu xenial
+arr[0,0]="ubuntu"
+arr[0,1]="http://archive.ubuntu.com/ubuntu"
+arr[0,2]="xenial"
+
+#Ubuntu artful
+arr[1,0]="ubuntu"
+arr[1,1]="http://archive.ubuntu.com/ubuntu"
+arr[1,2]="artful"
+
+#Debian jessie
+arr[2,0]="debian"
+arr[2,1]="http://deb.debian.org/debian/"
+arr[2,2]="jessie"
+
+#Debian stretch
+arr[3,0]="debian"
+arr[3,1]="http://deb.debian.org/debian/"
+arr[3,2]="stretch"
+
+#Debian sid
+arr[4,0]="debian"
+arr[4,1]="http://deb.debian.org/debian/"
+arr[4,2]="sid"
+
+
+DIST="$1"
+RETURN_VALUE=0
+
+for counter in {0..4}
+do
+# for ARCH in "amd64" "i386"
+ for ARCH in "amd64"
+ do
+ echo "========================================"
+ echo "Testing ${arr[${counter},0]} ${arr[${counter},2]} $ARCH"
+ echo "========================================"
+ DIST_FOLDER="Debian-Tests/${arr[${counter},0]}_${arr[${counter},2]}_$ARCH"
+ if [ "$CLEAN_INSTALL" = True ] ; then
+ rm -rf "$DIST_FOLDER"
+ echo "Removing $DIST_FOLDER"
+ fi
+ if [ ! -d "$DIST_FOLDER" ]; then
+ echo "$DIST_FOLDER was not present. Creating Base system from scratch."
+ {
+ mkdir -p "$DIST_FOLDER"
+ debootstrap --arch=$ARCH ${arr[${counter},2]} $DIST_FOLDER ${arr[${counter},1]}
+ } &>/dev/null
+ echo "Setup complete."
+ fi
+ cp test-distr.sh "$DIST_FOLDER"
+
+ RELEASES_COUNT=0
+ for RELEASE in "development" "beta" "release"
+ do
+ if [[ "$RELEASES_COUNT" -le "$RELEASE_LEVEL" ]]; then
+ chroot $DIST_FOLDER bash test-distr.sh https://swift.im/packages/${arr[${counter},0]}/${arr[${counter},2]} ${arr[${counter},2]} $DIST $RELEASE
+ RETURN_VALUE=$((RETURN_VALUE + $?))
+ else
+ echo "Skipping stream: $RELEASE"
+ fi
+ RELEASES_COUNT=$((RELEASES_COUNT + 1))
+ done
+ done
+done
+exit $RETURN_VALUE
diff --git a/Swift/Packaging/Debian/Testing/test-distr.sh b/Swift/Packaging/Debian/Testing/test-distr.sh
new file mode 100644
index 0000000..82d31ee
--- /dev/null
+++ b/Swift/Packaging/Debian/Testing/test-distr.sh
@@ -0,0 +1,88 @@
+#!/usr/bin/env bash
+
+# Return values
+# 0 if the package, source and installation were successful
+# 1 if the source packages are missing
+# 2 if the binary is not present in the repository
+# 3 if the binary and source packages are not present in the repository
+# 4 if the binary failed to install
+# 5 if the binary failed to install and the source package is not available.
+
+function finish {
+ rm /etc/apt/sources.list.d/swift-distr.list
+ if [[ "$1" != "*ubuntu*" ]]; then
+ rm /etc/apt/sources.list.d/ubuntu-universe.list
+ fi
+ {
+ rm -rf swift-im* packages.key*
+ apt-get remove -y swift-im
+ apt-get autoremove -y
+ } &>/dev/null
+}
+trap finish EXIT
+
+if [ "$#" -ne 4 ]; then
+ echo "Usage $0 <remote_repository> <dist_code_name> <swift_version> <release> "
+ exit 1
+fi
+RELEASE="$4"
+echo "Repository $1 build $RELEASE contents:"
+echo "------------------------"
+
+#Adding the swift repository
+echo deb $1 $RELEASE main >/etc/apt/sources.list.d/swift-distr.list
+echo deb-src $1 $RELEASE main >>/etc/apt/sources.list.d/swift-distr.list
+
+#Adding the ubuntu universe repository if it is not present.
+if [[ "$1" != "*ubuntu*" ]]; then
+ if ! grep -q '^deb http://archive.ubuntu.com/ubuntu '"$2"' universe' /etc/apt/sources.list /etc/apt/sources.list.d/*.list; then
+ echo deb http://archive.ubuntu.com/ubuntu $2 universe >/etc/apt/sources.list.d/ubuntu-universe.list
+ fi
+fi
+
+{
+ apt-get remove -y swift-im
+ apt-get autoremove -y
+ apt-get update
+ apt-get upgrade -y
+ apt-get install -y apt-transport-https wget
+ apt-get install -y dpkg-dev
+ wget http://swift.im/keys/packages.key
+ apt-key add packages.key
+ apt-get update
+} &>/dev/null
+
+RETURN_VALUE=0
+echo "Sources:"
+{
+ rm -rf swift-im*
+ apt-get source swift-im=$3
+} &>/dev/null
+if [ "$?" -eq 0 ]; then
+ echo "Sources files downloaded."
+else
+ echo "Sources files not present"
+ RETURN_VALUE=$((RETURN_VALUE + ((1 << 0))))
+fi
+
+echo "Binary:"
+{
+ apt-cache show swift-im=$3*
+} &>/dev/null
+if [ "$?" -ne 0 ]; then
+ echo "Swift package was not found in the repository."
+ RETURN_VALUE=$((RETURN_VALUE + ((1 << 1))))
+ exit $RETURN_VALUE
+fi
+echo "Installing binaries"
+{
+ apt-get install -y swift-im=$3*
+} &>/dev/null
+if [ "$?" -eq 0 ]; then
+ echo "Installation was successful."
+else
+ echo "Installation failed"
+ RETURN_VALUE=$((RETURN_VALUE + ((1 << 2))))
+fi
+echo "------------------------"
+exit $RETURN_VALUE
diff --git a/Swift/Packaging/Debian/build_for_debian.sh b/Swift/Packaging/Debian/build_for_debian.sh
index 3d79177..0f0691f 100755
--- a/Swift/Packaging/Debian/build_for_debian.sh
+++ b/Swift/Packaging/Debian/build_for_debian.sh
@@ -6,6 +6,6 @@ export SWIFT_DEBUILD_FLAGS="-S"
./package.sh
-for arch in i386 amd64; do
+for arch in amd64; do
pbuilder-dist sid $arch build *.dsc
done
diff --git a/Swift/Packaging/Debian/changelog.debian-unstable b/Swift/Packaging/Debian/changelog.debian-unstable
index d5cbd3d..f2bf2c5 100644
--- a/Swift/Packaging/Debian/changelog.debian-unstable
+++ b/Swift/Packaging/Debian/changelog.debian-unstable
@@ -1,7 +1,56 @@
-swift-im (2.0~beta1+dev46-1) unstable; urgency=low
+swift-im (4.0.3-1) UNRELEASED; urgency=medium
+
+ * New chat theme including a new font
+ * Support for message carbons (XEP-0280)
+ * Enabled trellis mode as a default feature, allowing several tiled chats windows to be shown at once
+ * Redesigned keyword highlighting
+ * Improve date formatting
+ * Fix Last Message Correction in multi client scenarios
+ * Fix UI layout issue for translations that require right-to-left (RTL) layout
+ * Fix UX issues in trellis mode
+ * Improvements to font size handling in the chat theme
+ * Add AppImage for Linux 64-bit as a supported platform
+ * Improved spell checker support on Linux
+ * Allow setting vCard on servers that do not return an empty vCard on fresh accounts
+ * And assorted smaller features and usability enhancements. Closes: 840151, 889062
+
+ -- Kevin Smith <kevin@kismith.co.uk> Thu, 03 Jan 2019 13:59:07 +0100
+
+swift-im (3.0.4-1) unstable; urgency=low
+
+ * New upstream release
+ * Allow compiling with newer boosts. Closes: 810839, 822131
+ * Switch to Qt5 instead of Qt4. Closes: 784532, 745807
+ * Fix some platform detection in build system. Closes: 757554
+ * Rewrite rules file with dh sequencer.
+ * Drop -dbg package.
+
+ -- Kevin Smith <kevin@kismith.co.uk> Fri, 03 Jun 2016 15:56:20 +0100
+
+swift-im (2.0+dev6-1) unstable; urgency=low
+
+ * Update from upstream.
+ * Don't conflict with libswiften2 overrides. Closes: 726289
+ * Don't conflict with swift-im-dbg overrides. Closes: 726290
+ * Don't conflict with libswiften-dev overrides. Closes: 726291
+
+
+ -- Kevin Smith <kevin@kismith.co.uk> Mon, 14 Oct 2013 16:42:12 -0000
+
+swift-im (2.0+dev5-1) unstable; urgency=low
+
+ * Update from upstream.
+ * Compiles with boost >= 1.50.0; will build on sid again. Closes: #713725
+ * Include dependencies for libswiften so that other packages
+ can depend on it. Closes: #714902
+
+ -- Kevin Smith <kevin@kismith.co.uk> Mon, 12 Aug 2013 16:18:09 -0000
+
+swift-im (2.0~beta1+dev47-1) unstable; urgency=low
* Update from upstream.
- * Rename /usr/bin/swift binary to not conflict with other package. Closes: #674504
+ * Rename /usr/bin/swift binary to not conflict with
+ other package. Closes: #674504
-- Kevin Smith <kevin@kismith.co.uk> Tue, 12 Jun 2012 19:25:12 -0000
@@ -11,4 +60,3 @@ swift-im (2.0~beta1+dev26-1) unstable; urgency=low
* Thanks to Olly Betts <olly@survex.com>
-- Kevin Smith <kevin@kismith.co.uk> Wed, 25 Apr 2012 09:55:52 -0000
-
diff --git a/Swift/Packaging/Debian/debian/compat b/Swift/Packaging/Debian/debian/compat
index 7f8f011..ec63514 100644
--- a/Swift/Packaging/Debian/debian/compat
+++ b/Swift/Packaging/Debian/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/Swift/Packaging/Debian/debian/control.in b/Swift/Packaging/Debian/debian/control.in
index dd7be88..e779f21 100644
--- a/Swift/Packaging/Debian/debian/control.in
+++ b/Swift/Packaging/Debian/debian/control.in
@@ -3,16 +3,15 @@ Section: net
Priority: optional
Maintainer: Swift Package Maintainer <packages@swift.im>
Uploaders: Remko Tronçon <dev@el-tramo.be>, Kevin Smith <kevin@kismith.co.uk>
-Build-Depends: debhelper (>= 7), scons (>= 1.2.0), libssl-dev (>= 0.9.8g), libqt4-dev (>= 4.5.0), libxml2-dev (>= 2.7.6), libxss-dev (>= 1.2.0), libboost-dev (>= 1.34.1), libboost-filesystem-dev (>= 1.34.1), libboost-program-options-dev (>= 1.34.1), libboost-regex-dev (>= 1.34.1), libboost-signals-dev (>= 1.34.1), libboost-system-dev (>= 1.34.1), libboost-thread-dev (>= 1.34.1), libboost-date-time-dev (>= 1.34.1), libidn11-dev (>= 1.10), docbook-xsl (>= 1.75.0), docbook-xml (>= 4.5), xsltproc, libxml2-utils, libhunspell-dev, libnatpmp-dev, libminiupnpc-dev, libsqlite3-dev %WEBKIT_DEPENDENCY%
-Standards-Version: 3.9.3
+Build-Depends: debhelper (>= 9), scons (>= 1.2.0), libssl-dev (>= 0.9.8g), qtbase5-dev (>= 5.0.0), qtchooser, qtbase5-dev-tools (>= 5.0.0), libqt5x11extras5-dev (>= 5.0.0), libqt5webkit5-dev (>= 5.0.0), qtmultimedia5-dev (>=5.0.0), qttools5-dev-tools (>=5.0.0), qt5-image-formats-plugins (>=5.0.0), libqt5svg5-dev (>=5.0.0), libxml2-dev (>= 2.7.6), libxss-dev (>= 1.2.0), libboost-dev (>= 1.34.1), libboost-filesystem-dev (>= 1.34.1), libboost-program-options-dev (>= 1.34.1), libboost-regex-dev (>= 1.34.1), libboost-signals-dev (>= 1.34.1), libboost-system-dev (>= 1.34.1), libboost-thread-dev (>= 1.34.1), libboost-date-time-dev (>= 1.34.1), libidn11-dev (>= 1.10), docbook-xsl (>= 1.75.0), docbook-xml (>= 4.5), xsltproc, libxml2-utils, libnatpmp-dev, libminiupnpc-dev, libsqlite3-dev, libhunspell-dev, zlib1g-dev, help2man
+Standards-Version: 3.9.8
Vcs-Git: git://swift.im/swift
Vcs-Browser: http://swift.im/git/swift
Homepage: http://swift.im
Package: libswiften%SWIFTEN_SOVERSION%
Architecture: any
-Section: net
-Priority: optional
+Section: libs
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: XMPP library
Swiften is a robust, high-quality, standards-compliant, cross-platform,
@@ -22,20 +21,17 @@ Description: XMPP library
Package: libswiften-dev
Architecture: any
Section: libdevel
-Priority: optional
-Depends: libswiften%SWIFTEN_SOVERSION% (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: libswiften%SWIFTEN_SOVERSION% (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, libboost-dev (>= 1.34.1), libboost-filesystem-dev (>= 1.34.1), libboost-regex-dev (>= 1.34.1), libboost-signals-dev (>= 1.34.1), libboost-thread-dev (>= 1.34.1), libboost-date-time-dev (>= 1.34.1)
Description: XMPP library (development files)
Swiften is a robust, high-quality, standards-compliant, cross-platform,
and performant C++ library for implementing XMPP applications. Swiften
is used as the back-end library for the Swift Instant Messaging client.
.
- This package contains the header development files and programs for
+ This package contains the header development files and programs for
developing with Swiften.
Package: swift-im
Architecture: any
-Section: net
-Priority: optional
Depends: libswiften%SWIFTEN_SOVERSION% (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: easy to use Jabber/XMPP chat client
Swift is a free instant messaging client. It concentrates on making
@@ -46,12 +42,3 @@ Description: easy to use Jabber/XMPP chat client
Swift uses the XMPP protocol and so supports both the public Jabber
network and closed XMPP services, such as those found in many
organisations.
-
-Package: swift-im-dbg
-Architecture: any
-Section: debug
-Priority: extra
-Depends: swift-im (= ${binary:Version}), ${misc:Depends}
-Description: XMPP client/library (debugging symbols)
- This package contains the debugging symbols for debugging Swift
- and Swiften applications.
diff --git a/Swift/Packaging/Debian/debian/copyright b/Swift/Packaging/Debian/debian/copyright
index 99eb7cc..9219930 100644
--- a/Swift/Packaging/Debian/debian/copyright
+++ b/Swift/Packaging/Debian/debian/copyright
@@ -3,7 +3,7 @@ with help from Olly Betts <olly@survex.com>.
The upstream sources were obtained from http://swift.im.
-Copyright (C) 2010-2012 Kevin Smith and Remko Tronçon
+Copyright (C) 2010-2019 Isode Limited.
Licensed under the GNU General Public License.
See /usr/share/common-licenses/GPL-3 for the full license.
diff --git a/Swift/Packaging/Debian/debian/rules b/Swift/Packaging/Debian/debian/rules
index e16465d..ed432bb 100755
--- a/Swift/Packaging/Debian/debian/rules
+++ b/Swift/Packaging/Debian/debian/rules
@@ -2,50 +2,26 @@
#export DH_VERBOSE=1
export PYTHONDONTWRITEBYTECODE=1
+export QT_SELECT=qt5
-SCONS_FLAGS=V=1 optimize=1 debug=1 allow_warnings=1 swiften_dll=1 qt=/usr/share/qt4 docbook_xsl=/usr/share/xml/docbook/stylesheet/docbook-xsl docbook_xml=/usr/share/xml/docbook/schema/dtd/4.5 linkflags="$(shell dpkg-buildflags --get LDFLAGS)" ccflags="$(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)"
+SCONS_FLAGS=V=1 qt5=1 optimize=1 debug=1 allow_warnings=1 swiften_dll=1 help2man=1 docbook_xsl=/usr/share/xml/docbook/stylesheet/docbook-xsl docbook_xml=/usr/share/xml/docbook/schema/dtd/4.5 linkflags="$(shell dpkg-buildflags --get LDFLAGS)" ccflags="$(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS)"
+SCONS_INSTALL_BASE=$(CURDIR)/debian/tmp
+SCONS_INSTALL_FLAGS=SWIFT_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr SWIFTEN_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr
+SWIFT_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr SWIFTEN_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr
-clean:
- dh_testdir
+%:
+ dh $@
+
+override_dh_clean:
dh_clean
- scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) SWIFT_INSTALLDIR=$(CURDIR)/debian/tmp/usr SWIFTEN_INSTALLDIR=$(CURDIR)/debian/tmp/usr -c
+ scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) $(SCONS_INSTALL_FLAGS) -c
-rm -rf .scon*
-rm -rf config.log
-configure:
-
-build: configure
- dh_testdir
- scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) Swift Swiften
-
-install: build
- dh_testroot
- dh_prep
- dh_installdirs
- scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) SWIFT_INSTALLDIR=$(CURDIR)/debian/tmp/usr SWIFTEN_INSTALLDIR=$(CURDIR)/debian/tmp/usr $(CURDIR)/debian/tmp
-
-binary-indep: install
-binary-arch: install
- dh_testdir
- dh_testroot
- dh_install --sourcedir=debian/tmp
- dh_installchangelogs
- dh_installdocs
- dh_installmenu
- dh_installman -a
- dh_link
- dh_strip --dbg-package=swift-im-dbg
- dh_compress
- dh_fixperms
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
+override_dh_configure:
-binary: binary-indep binary-arch
+override_dh_auto_build:
+ scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) Swift Swiften debian/swift-im.1 debian/swiften-config.1
-build-arch: build
-build-indep: build
-.PHONY: build clean binary-indep binary-arch binary install configure build-arch build-indep
+override_dh_auto_install:
+ scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) $(SCONS_INSTALL_FLAGS) $(SCONS_INSTALL_BASE)
diff --git a/Swift/Packaging/Debian/debian/swift-im.1 b/Swift/Packaging/Debian/debian/swift-im.1
deleted file mode 100644
index b7262bf..0000000
--- a/Swift/Packaging/Debian/debian/swift-im.1
+++ /dev/null
@@ -1,33 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
-.TH SWIFT "1" "June 2011" "Swift" "Swift Manual"
-.SH NAME
-swift-im \- Swift
-.SH SYNOPSIS
-.B swift-im
-[\fIOPTIONS\fR]...
-.SH DESCRIPTION
-Swift is an instant messaging client for the XMPP network.
-.SH OPTIONS
-.TP
-\fB\-\-debug\fR
-Turn on debug logging
-.TP
-\fB\-\-help\fR
-Show this help message
-.TP
-\fB\-\-version\fR
-Show version information
-.TP
-\fB\-\-netbook\-mode\fR
-Use netbook mode display (unsupported)
-.TP
-\fB\-\-no\-tabs\fR
-Don't manage chat windows in tabs (unsupported)
-.TP
-\fB\-\-latency\-debug\fR
-Use latency debugging (unsupported)
-.HP
-\fB\-\-multi\-account\fR arg (=1) Number of accounts to open windows for (unsupported)
-.TP
-\fB\-\-start\-minimized\fR
-Don't show the login/roster window at startup
diff --git a/Swift/Packaging/Debian/debian/swift-im.install b/Swift/Packaging/Debian/debian/swift-im.install
index 9e09ac7..82242ff 100644
--- a/Swift/Packaging/Debian/debian/swift-im.install
+++ b/Swift/Packaging/Debian/debian/swift-im.install
@@ -1,2 +1,5 @@
usr/bin/swift-im
-usr/share
+usr/share/icons
+usr/share/pixmaps
+usr/share/swift
+usr/share/applications
diff --git a/Swift/Packaging/Debian/debian/swift-im.menu b/Swift/Packaging/Debian/debian/swift-im.menu
deleted file mode 100644
index 68b621d..0000000
--- a/Swift/Packaging/Debian/debian/swift-im.menu
+++ /dev/null
@@ -1,3 +0,0 @@
-?package(swift-im):needs="X11" section="Applications/Network/Communication"\
- title="Swift IM" command="/usr/bin/swift-im"\
- icon="/usr/share/pixmaps/swift.xpm"
diff --git a/Swift/Packaging/Debian/debian/swiften-config.1 b/Swift/Packaging/Debian/debian/swiften-config.1
deleted file mode 100644
index 3717df6..0000000
--- a/Swift/Packaging/Debian/debian/swiften-config.1
+++ /dev/null
@@ -1,21 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
-.TH SWIFTEN-CONFIG "1" "June 2011" "swiften-config" "Swift Manual"
-.SH NAME
-swiften-config \- swiften-config
-.SH SYNOPSIS
-.B swiften-config
-[\fIOPTIONS\fR]...
-.SH DESCRIPTION
-swiften\-config outputs the Swiften build options.
-.TP
-\fB\-\-help\fR
-Show this help message
-.TP
-\fB\-\-version\fR
-Show version information
-.TP
-\fB\-\-libs\fR
-List the library flags
-.TP
-\fB\-\-cflags\fR
-List the compiler & preprocessor flags
diff --git a/Swift/Packaging/Debian/package.sh b/Swift/Packaging/Debian/package.sh
index 8c7c89f..62dfff0 100755
--- a/Swift/Packaging/Debian/package.sh
+++ b/Swift/Packaging/Debian/package.sh
@@ -50,13 +50,15 @@ else
rm -rf $DIRNAME/.git
find $DIRNAME -name .gitignore | xargs rm -f
if [ -z "$SWIFT_COPY_UUID" ]; then
- find $DIRNAME/3rdParty -type f | grep -v SConscript | grep -v miniupnp | grep -v natpmp |xargs rm -f
+ find $DIRNAME/3rdParty -type f | grep -v SConscript | xargs rm -f
else
find $DIRNAME/3rdParty -type f | grep -v uuid | grep -v SConscript | grep -v miniupnp | grep -v natpmp || xargs rm -f
fi
find $DIRNAME/3rdParty -depth -empty -type d -exec rmdir {} \;
rm -rf $DIRNAME/3rdParty/SCons
rm -rf $DIRNAME/Swift/Packaging/Debian
+ rm -rf $DIRNAME/BuildTools/DocBook/Fonts
+ rm -rf $DIRNAME/BuildTools/Git/Hooks/commit-msg
# Initialize the build version
echo $VERSION > $DIRNAME/VERSION.swift
diff --git a/Swift/Packaging/Debian/package_all_platforms.sh b/Swift/Packaging/Debian/package_all_platforms.sh
index 47c6b82..afd0621 100755
--- a/Swift/Packaging/Debian/package_all_platforms.sh
+++ b/Swift/Packaging/Debian/package_all_platforms.sh
@@ -1,8 +1,11 @@
#!/bin/bash
+# Quit immediately if any part fails
+set -e
+
## To get to this stage you need to already have the pbuilder-dist stuff installed, and have already run:
-# for distro in squeeze sid lucid maverick; do
-# for arch in i386 amd64; do
+# for distro in xenial yakkety jessie sid; do
+# for arch in amd64; do
# pbuilder-dist $distro $arch create
# done
# done
@@ -10,20 +13,26 @@
export SWIFT_DEBUILD_FLAGS="-S"
export SWIFT_FORCE_LUCID="yep"
-./package.sh
+#./package.sh
-for distro in lucid squeeze; do
- for arch in i386 amd64; do
- pbuilder-dist $distro $arch build *.dsc
- done
-done
+#for distro in lucid squeeze; do
+# for arch in i386 amd64; do
+# pbuilder-dist $distro $arch build *.dsc
+# done
+#done
unset SWIFT_FORCE_LUCID
./package.sh
-for distro in maverick sid; do
- for arch in i386 amd64; do
+if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ];
+then
+ platformsarray=( xenial artful jessie stretch sid )
+else
+ platformsarray=( $SWIFT_PACKAGE_PLATFORMS )
+fi
+
+for distro in "${platformsarray[@]}"; do
+ for arch in amd64; do
pbuilder-dist $distro $arch build *.dsc
done
done
-
diff --git a/Swift/Packaging/Debian/package_docker.sh b/Swift/Packaging/Debian/package_docker.sh
new file mode 100755
index 0000000..7fd1a3e
--- /dev/null
+++ b/Swift/Packaging/Debian/package_docker.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $(readlink -f $0 || realpath $0))
+export PYTHONPATH=../../../BuildTools/SCons
+VERSION=${VERSION:=`../../../BuildTools/GetBuildVersion.py swift`}
+DEBIAN_VERSION=`../../../BuildTools/DebianizeVersion.py $VERSION`
+SWIFTEN_SOVERSION=`../../../BuildTools/GetBuildVersion.py swift --major`
+SWIFT_SOURCE_DIR=swift-im-$DEBIAN_VERSION
+TARBALLBARE="swift-im_$DEBIAN_VERSION.orig.tar.gz"
+TARBALL="${SHARED_DIR}${TARBALLBARE}"
+# DEVATTN there is an issue with some versions of Qt(5.11.1) and docker see https://bugreports.qt.io/browse/QTBUG-64490. Workaround is to add privileged flag
+if [ -z ${DOCKERRUNEXTRAFLAGS+x} ];
+then
+ DOCKERRUNEXTRAFLAGS="--privileged"
+fi
+
+rm -rf $SWIFT_SOURCE_DIR
+git clone ../../../.git $SWIFT_SOURCE_DIR
+
+rm -rf $SWIFT_SOURCE_DIR/.git
+find $SWIFT_SOURCE_DIR -name .gitignore | xargs rm -f
+find $SWIFT_SOURCE_DIR/3rdParty -type f | grep -v uuid | grep -v SConscript | grep -v miniupnp | grep -v natpmp || xargs rm -f
+find $SWIFT_SOURCE_DIR/3rdParty -depth -empty -type d -exec rmdir {} \;
+rm -rf $SWIFT_SOURCE_DIR/3rdParty/SCons
+rm -rf $SWIFT_SOURCE_DIR/Swift/Packaging/Debian
+rm -rf $SWIFT_SOURCE_DIR/BuildTools/DocBook/Fonts
+rm -rf $SWIFT_SOURCE_DIR/BuildTools/Git/Hooks/commit-msg
+echo $VERSION > $SWIFT_SOURCE_DIR/VERSION.swift
+
+tar czf $TARBALLBARE $SWIFT_SOURCE_DIR
+cp $TARBALLBARE $SWIFT_SOURCE_DIR
+
+cp -r debian $SWIFT_SOURCE_DIR/debian
+../../../BuildTools/UpdateDebianChangelog.py $SWIFT_SOURCE_DIR/debian/changelog $DEBIAN_VERSION
+
+cat $SWIFT_SOURCE_DIR/debian/control.in | sed -e "s/%SWIFTEN_SOVERSION%/$SWIFTEN_SOVERSION/g" | sed -e "s/%WEBKIT_DEPENDENCY%/$WEBKIT_DEPENDENCY/g" > $SWIFT_SOURCE_DIR/debian/control
+rm $SWIFT_SOURCE_DIR/debian/control.in
+mv $SWIFT_SOURCE_DIR/debian/libswiften.install $SWIFT_SOURCE_DIR/debian/libswiften$SWIFTEN_SOVERSION.install
+cat ../../../COPYING.thirdparty | tail -n +3 >> $SWIFT_SOURCE_DIR/debian/copyright
+
+rm -rf swift-src
+mv $SWIFT_SOURCE_DIR swift-src
+docker build -t swift/swiftsourcebuilder -f Dockerfile.source .
+mkdir -p out/source
+docker run --rm -v`pwd`/gpg-keys:/gpg-keys -v`pwd`/out/source:/out swift/swiftsourcebuilder
+
+TMP_DOCKERFILE=Dockerfile.tmp.package
+
+if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ];
+then
+ platformsarray=( ubuntu:bionic ubuntu:cosmic debian:stretch debian:sid )
+else
+ platformsarray=( $SWIFT_PACKAGE_PLATFORMS )
+fi
+
+for distro in "${platformsarray[@]}";
+do
+ if [ -f $TMP_DOCKERFILE ];
+ then
+ rm $TMP_DOCKERFILE
+ fi
+ cat Dockerfile.package.in | sed -e "s/__DISTRO__/$distro/" -e "s/__DEBIAN_VERSION__/$DEBIAN_VERSION/" > $TMP_DOCKERFILE
+ docker build -t swift/packager -f $TMP_DOCKERFILE out/source
+ OUT_DIR="out/${distro//\://}"
+ echo $OUT_DIR
+ mkdir -p $OUT_DIR
+ docker run --rm $DOCKERRUNEXTRAFLAGS -v`pwd`/gpg-keys:/gpg-keys -v`pwd`/$OUT_DIR:/out swift/packager
+done
diff --git a/Swift/Packaging/Debian/update_debian_repo.sh b/Swift/Packaging/Debian/update_debian_repo.sh
new file mode 100644
index 0000000..fc736ed
--- /dev/null
+++ b/Swift/Packaging/Debian/update_debian_repo.sh
@@ -0,0 +1,114 @@
+#!/usr/bin/env bash
+
+# This script uses reprepro to create or update an apt repository with new packages
+# from an incoming directory for multiple distributions and update channels.
+#
+# Release Channels: stable (apt name release), testing (apt name beta), development (apt name development)
+# Packages: swift-im, libswiften, libswiften-dev
+
+# fail on error
+set -e
+shopt -s nullglob
+
+# configuration via environment variables
+INCOMING_FOLDER="${SWIFT_APT_INCOMING_FOLDER:-error}"
+if [ "$INCOMING_FOLDER" = "error" ];
+then
+ { echo >&2 "Please set SWIFT_APT_INCOMING_FOLDER to the folder where new packages are read from."; exit 1; }
+fi
+
+APT_REPO_ROOT="${SWIFT_APT_REPO_ROOT:-error}"
+if [ "$APT_REPO_ROOT" = "error" ];
+then
+ { echo >&2 "Please set SWIFT_APT_REPO_ROOT to the folder where the root of the apt repository should be created."; exit 1; }
+fi
+
+# Prepare temporary directory used by reprepro
+APT_TEMP_DIR=/tmp/swift_reprepro_tmp
+rm -rfd $APT_TEMP_DIR
+mkdir -p $APT_TEMP_DIR
+
+function write_reprepo_conf_distributions_to_file {
+cat <<EOM >$1
+Codename: beta
+Components: main
+Architectures: i386 amd64 source
+SignWith: packages@swift.im
+Contents: . .gz .bz2
+DebIndices: Packages Release . .gz .bz2
+DscIndices: Sources Release . .gz .bz2
+
+Codename: development
+Components: main
+Architectures: i386 amd64 source
+SignWith: packages@swift.im
+Contents: . .gz .bz2
+DebIndices: Packages Release . .gz .bz2
+DscIndices: Sources Release . .gz .bz2
+
+Codename: release
+Components: main
+Architectures: i386 amd64 source
+SignWith: packages@swift.im
+Contents: . .gz .bz2
+DebIndices: Packages Release . .gz .bz2
+DscIndices: Sources Release . .gz .bz2
+EOM
+}
+
+function write_reprepo_conf_incoming_to_file {
+cat <<EOM >$1
+Name: swift
+IncomingDir: $2
+TempDir: $APT_TEMP_DIR
+Allow: beta development release
+Multiple: Yes
+Cleanup: unused_files on_error
+Permit: unused_files older_version
+EOM
+}
+
+# check for existence of reprepro command
+command -v reprepro >/dev/null 2>&1 || { echo >&2 "This script requires aptly but it's not installed. See https://www.aptly.info/ for further information. Aborting."; exit 1; }
+
+mkdir -p $APT_REPO_ROOT
+
+if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ]; then
+ platformsarray=( bionic cosmic stretch sid )
+else
+ platformsarray=( $SWIFT_PACKAGE_PLATFORMS )
+fi
+
+# distros
+for full_distribution_path in $INCOMING_FOLDER/{debian,ubuntu}/*; do
+ distro_version=`basename $full_distribution_path`
+ distro_name=$(basename `dirname $full_distribution_path`)
+ distro_reprepro_root=${APT_REPO_ROOT}/${distro_name}/${distro_version}
+
+ if ! [[ ${platformsarray[@]} == *"$distro_version"* ]]; then
+ echo "$distro_version was not found in SWIFT_PACKAGE_PLATFORMS. Skipping..."
+ continue
+ fi
+
+ # ensure reprepro directory for this distribution version is present
+ if [ ! -d "$distro_reprepro_root" ]; then
+ echo "Create distribution repository for $distro_name/$distro_version"
+ mkdir -p $distro_reprepro_root
+ mkdir -p ${distro_reprepro_root}/conf
+
+ write_reprepo_conf_distributions_to_file "${distro_reprepro_root}/conf/distributions"
+ write_reprepo_conf_incoming_to_file "${distro_reprepro_root}/conf/incoming" "$full_distribution_path"
+ fi
+
+ # This is workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808558
+ # and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843402
+ if [ "$distro_name/$distro_version" = "debian/sid" ]; then
+ sed -i '/dbgsym/ d' $full_distribution_path/*.changes
+ fi
+
+ echo "Process incoming packages for $distro_name/$distro_version"
+ #set +e
+ reprepro -V -b ${distro_reprepro_root} processincoming swift
+ #set -e
+done
+echo "Successfully finished updating apt repository."