summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-03-20 13:12:10 (GMT)
committerTobias Markmann <tm@ayena.de>2018-03-20 14:48:04 (GMT)
commitf2c2c7d035029fb9615b42c18ccea83e8e705b10 (patch)
tree2f56fb77de0f366528395f21732d418f016f63b5 /Swift/Packaging
parent44581c5285d13c0ec715b35ddc79177e5ebeef39 (diff)
parent5ba3f18ad8efa040d49f36d83ec2e7891a9add9f (diff)
downloadswift-f2c2c7d035029fb9615b42c18ccea83e8e705b10.zip
swift-f2c2c7d035029fb9615b42c18ccea83e8e705b10.tar.bz2
Merge branch 'swift-4.x'swift-5.0alpha2
* swift-4.x: (44 commits) Test-Information: Builds on macOS 10.13.3 with clang trunk. Change-Id: If50381f103b0ad18d038b920d3d43537642141cb
Diffstat (limited to 'Swift/Packaging')
-rwxr-xr-xSwift/Packaging/Debian/Testing/swift-distr-tests.sh16
-rw-r--r--Swift/Packaging/Debian/debian/control.in2
-rwxr-xr-xSwift/Packaging/Debian/debian/rules4
-rwxr-xr-xSwift/Packaging/Debian/package.sh12
-rwxr-xr-xSwift/Packaging/Debian/package_all_platforms.sh10
-rw-r--r--Swift/Packaging/Debian/update_debian_repo.sh13
-rw-r--r--Swift/Packaging/SConscript29
-rw-r--r--Swift/Packaging/WiX/include.xslt12
8 files changed, 74 insertions, 24 deletions
diff --git a/Swift/Packaging/Debian/Testing/swift-distr-tests.sh b/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
index 8d03282..e817974 100755
--- a/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
+++ b/Swift/Packaging/Debian/Testing/swift-distr-tests.sh
@@ -40,25 +40,31 @@ arr[0,0]="ubuntu"
arr[0,1]="http://archive.ubuntu.com/ubuntu"
arr[0,2]="xenial"
-#Ubuntu yakkety
+#Ubuntu artful
arr[1,0]="ubuntu"
arr[1,1]="http://archive.ubuntu.com/ubuntu"
-arr[1,2]="yakkety"
+arr[1,2]="artful"
#Debian jessie
arr[2,0]="debian"
arr[2,1]="http://deb.debian.org/debian/"
arr[2,2]="jessie"
-#Debian sid
+#Debian stretch
arr[3,0]="debian"
arr[3,1]="http://deb.debian.org/debian/"
-arr[3,2]="sid"
+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..3}
+for counter in {0..4}
do
# for ARCH in "amd64" "i386"
for ARCH in "amd64"
diff --git a/Swift/Packaging/Debian/debian/control.in b/Swift/Packaging/Debian/debian/control.in
index 26544e5..e779f21 100644
--- a/Swift/Packaging/Debian/debian/control.in
+++ b/Swift/Packaging/Debian/debian/control.in
@@ -3,7 +3,7 @@ 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 (>= 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
+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
diff --git a/Swift/Packaging/Debian/debian/rules b/Swift/Packaging/Debian/debian/rules
index 87c551b..ed432bb 100755
--- a/Swift/Packaging/Debian/debian/rules
+++ b/Swift/Packaging/Debian/debian/rules
@@ -4,7 +4,7 @@
export PYTHONDONTWRITEBYTECODE=1
export QT_SELECT=qt5
-SCONS_FLAGS=V=1 qt5=1 optimize=1 debug=1 allow_warnings=1 swiften_dll=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_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
@@ -21,7 +21,7 @@ override_dh_clean:
override_dh_configure:
override_dh_auto_build:
- scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) Swift Swiften
+ scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) Swift Swiften debian/swift-im.1 debian/swiften-config.1
override_dh_auto_install:
scons $(SCONS_FLAGS) $(SCONS_EXTRA_FLAGS) $(SCONS_INSTALL_FLAGS) $(SCONS_INSTALL_BASE)
diff --git a/Swift/Packaging/Debian/package.sh b/Swift/Packaging/Debian/package.sh
index d19f5dc..62dfff0 100755
--- a/Swift/Packaging/Debian/package.sh
+++ b/Swift/Packaging/Debian/package.sh
@@ -95,18 +95,6 @@ cat $DIRNAME/debian/control.in | sed -e "s/%SWIFTEN_SOVERSION%/$SWIFTEN_SOVERSIO
rm $DIRNAME/debian/control.in
mv $DIRNAME/debian/libswiften.install $DIRNAME/debian/libswiften$SWIFTEN_SOVERSION.install
cat ../../../COPYING.thirdparty | tail -n +3 >> $DIRNAME/debian/copyright
-# Generate updated man-page if possible
-if type "help2man" > /dev/null 2>&1; then
- if [ -f ../../QtUI/swift-im ]; then
- help2man -m "Swift Manual" -S "Swift" -n "swift-im" -N ../../QtUI/swift-im > $DIRNAME/debian/swift-im.1
- fi
- if [ -f ../../../Swiften/Config/swiften-config ]; then
- help2man -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N ../../../Swiften/Config/swiften-config > $DIRNAME/debian/swiften-config.1
- fi
-else
- >2& echo "Unable to generate man pages. Please ensure that help2man is installed"
- exit 1;
-fi
# Build
cd $DIRNAME
diff --git a/Swift/Packaging/Debian/package_all_platforms.sh b/Swift/Packaging/Debian/package_all_platforms.sh
index 097fe38..afd0621 100755
--- a/Swift/Packaging/Debian/package_all_platforms.sh
+++ b/Swift/Packaging/Debian/package_all_platforms.sh
@@ -24,9 +24,15 @@ export SWIFT_FORCE_LUCID="yep"
unset SWIFT_FORCE_LUCID
./package.sh
-for distro in xenial yakkety jessie sid; 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/update_debian_repo.sh b/Swift/Packaging/Debian/update_debian_repo.sh
index d62a376..b057103 100644
--- a/Swift/Packaging/Debian/update_debian_repo.sh
+++ b/Swift/Packaging/Debian/update_debian_repo.sh
@@ -73,12 +73,23 @@ command -v reprepro >/dev/null 2>&1 || { echo >&2 "This script requires aptly bu
mkdir -p $APT_REPO_ROOT
+if [ -z ${SWIFT_PACKAGE_PLATFORMS+x} ]; then
+ platformsarray=( xenial artful jessie 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 ! [[ $SWIFT_PACKAGE_PLATFORMS == *"$distro_version"* ]]; then
+ echo "$distro_version was not found in SWIFT_PACKAGE_PLATFORMS. Skipping..."
+ continue
+ fi
+
# ensure reprepro diretctory for this distribution version is present
if [ ! -d "$distro_preprepro_root" ]; then
echo "Create distribution repository for $distro_name/$distro_version"
@@ -89,7 +100,7 @@ for full_distribution_path in $INCOMING_FOLDER/{debian,ubuntu}/*; do
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
+ # 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
diff --git a/Swift/Packaging/SConscript b/Swift/Packaging/SConscript
new file mode 100644
index 0000000..3aa791f
--- /dev/null
+++ b/Swift/Packaging/SConscript
@@ -0,0 +1,29 @@
+Import("env")
+import os
+
+################################################################################
+# Build
+################################################################################
+
+if env["SCONS_STAGE"] == "build" :
+ help2man = env.WhereIs('help2man', os.environ['PATH'])
+ if help2man:
+ env['HELP2MAN'] = help2man
+ env['HELP2MANSTR'] = "HELP2MAN $TARGET"
+
+ if Dir("#/debian").exists():
+ # This is needed for debian packaging using pbuilder which expects
+ # generated man pages in this location.
+ env['HELP2MAN_DEBIAN_DIR'] = "#/debian"
+ else:
+ env['HELP2MAN_DEBIAN_DIR'] = "Debian/debian"
+
+ swiftenConfigHelp = env.Command(
+ target='$HELP2MAN_DEBIAN_DIR/swiften-config.1', source='#/Swiften/Config/swiften-config',
+ action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "swiften-config" -n "swiften-config" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR"))
+ swiftHelp = env.Command(
+ target='$HELP2MAN_DEBIAN_DIR/swift-im.1', source='#/Swift/QtUI/swift-im',
+ action = Action('$HELP2MAN --no-discard-stderr -m "Swift Manual" -S "Swift" -n "swift-im" -N $SOURCE > $TARGET', cmdstr = "$HELP2MANSTR"))
+ else:
+ print "Enabled help2man but help2man is not in the PATH of the current environment."
+ Exit(1)
diff --git a/Swift/Packaging/WiX/include.xslt b/Swift/Packaging/WiX/include.xslt
index ec1ad50..df86446 100644
--- a/Swift/Packaging/WiX/include.xslt
+++ b/Swift/Packaging/WiX/include.xslt
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi" xmlns="http://schemas.microsoft.com/wix/2006/wi" exclude-result-prefixes="xsl wix">
<xsl:template match='wix:Directory[@Id="Swift"]/@Id'>
<xsl:attribute name='Id'>INSTALLDIR</xsl:attribute>
@@ -11,4 +11,14 @@
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
+
+ <xsl:template match="wix:Component">
+ <xsl:copy>
+ <xsl:apply-templates select="@*"/>
+ <xsl:value-of select="concat(preceding-sibling::text(), ' ')" />
+ <RemoveFile Id="remove_{@Id}" Name="{@Id}" On="install" />
+ <xsl:apply-templates select="node()"/>
+ </xsl:copy>
+ </xsl:template>
+
</xsl:stylesheet>