[neon/qt/qbs/Neon/release] debian: debian/*: Port to use cmake as build system

Marius Gripsgard null at kde.org
Thu May 5 12:48:32 BST 2022


Git commit 6148a9e588a9d56b4e36777f887a1c3e292f3e63 by Marius Gripsgard.
Committed on 30/12/2021 at 19:18.
Pushed by jriddell into branch 'Neon/release'.

debian/*: Port to use cmake as build system

M  +6    -1    debian/control
A  +32   -0    debian/patches/0001-doc-Install-man-pages-with-cmake.patch
M  +1    -0    debian/patches/series
M  +0    -1    debian/qbs-dev.install
M  +1    -1    debian/qbs-doc.install
M  +23   -18   debian/rules

https://invent.kde.org/neon/qt/qbs/commit/6148a9e588a9d56b4e36777f887a1c3e292f3e63

diff --git a/debian/control b/debian/control
index 4486091..c1f1935 100644
--- a/debian/control
+++ b/debian/control
@@ -6,11 +6,16 @@ Uploaders: Dmitry Shachnev <mitya57 at debian.org>,
            Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>,
            Adam Majer <adamm at zombino.com>,
            Simon Quigley <tsimonq2 at debian.org>
-Build-Depends: debhelper-compat (= 13),
+Build-Depends: cmake,
+               debhelper-compat (= 13),
                pkg-kde-tools,
+               python3-bs4,
+               python3-lxml,
                qtbase5-dev (>= 5.14.0),
+               qtbase5-private-dev,
                qtdeclarative5-private-dev,
                qtscript5-dev,
+               qttools5-dev,
                qttools5-dev-tools
 Build-Depends-Indep: libqt5sql5-sqlite
 Standards-Version: 4.6.0
diff --git a/debian/patches/0001-doc-Install-man-pages-with-cmake.patch b/debian/patches/0001-doc-Install-man-pages-with-cmake.patch
new file mode 100644
index 0000000..913abb1
--- /dev/null
+++ b/debian/patches/0001-doc-Install-man-pages-with-cmake.patch
@@ -0,0 +1,32 @@
+From 077ce0bce4265b69278c10f8956ae8fad145b0db Mon Sep 17 00:00:00 2001
+From: Marius Gripsgard <marius at ubports.com>
+Date: Thu, 30 Dec 2021 03:01:58 +0100
+Subject: [PATCH] doc: Install man pages with cmake
+
+Change-Id: Ibce74cf1b524c8c08b38dfc76549b4723ea705b3
+---
+ doc/CMakeLists.txt     | 2 ++
+ doc/man/CMakeLists.txt | 1 +
+ 2 files changed, 3 insertions(+)
+ create mode 100644 doc/man/CMakeLists.txt
+
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index 5b8ac7636..04ff12470 100644
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -26,3 +26,5 @@ add_qbs_documentation(
+         ${_DOC_IMAGES_SOURCES}
+         ${_DOC_TARGETS_SOURCES}
+     )
++
++add_subdirectory(man)
+diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt
+new file mode 100644
+index 000000000..7e8247ed4
+--- /dev/null
++++ b/doc/man/CMakeLists.txt
+@@ -0,0 +1 @@
++install(FILES qbs.1 DESTINATION ${QBS_RESOURCES_INSTALL_DIR}/man/man1)
+-- 
+2.34.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 5ba63a9..ae07ebb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ test_sanitizers_only_on_amd64.diff
 no_nosys_specs.diff
 disable_bad_assembly.diff
 0001-tests-Make-sure-we-handle-prefix-cases-where-libPath.patch
+0001-doc-Install-man-pages-with-cmake.patch
diff --git a/debian/qbs-dev.install b/debian/qbs-dev.install
index b93773e..fd572f2 100644
--- a/debian/qbs-dev.install
+++ b/debian/qbs-dev.install
@@ -33,5 +33,4 @@ usr/include/qbs/tools/setupprojectparameters.h
 usr/include/qbs/tools/toolchains.h
 usr/include/qbs/tools/version.h
 usr/include/qbs/use_installed_corelib.pri
-usr/lib/${DEB_HOST_MULTIARCH}/libqbscore.prl
 usr/lib/${DEB_HOST_MULTIARCH}/libqbscore.so
diff --git a/debian/qbs-doc.install b/debian/qbs-doc.install
index 90c1611..1e1b846 100644
--- a/debian/qbs-doc.install
+++ b/debian/qbs-doc.install
@@ -1 +1 @@
-doc/qbs.qch usr/share/qt5/doc/
+usr/share/qt5/doc/qbs.qch
diff --git a/debian/rules b/debian/rules
index b7b809c..fa58487 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,11 +6,13 @@
 include /usr/share/dpkg/pkg-info.mk
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+BUILDPATH ?= obj-$(DEB_HOST_GNU_TYPE)
 
 export QT_SELECT := qt5
 
 %:
-	dh $@ --with pkgkde_symbolshelper --buildsystem=qmake
+	dh $@ --with pkgkde_symbolshelper --buildsystem=cmake
 
 override_dh_auto_clean:
 	dh_auto_clean
@@ -19,35 +21,36 @@ override_dh_auto_clean:
 	find . -type f -name .gitignore -delete -print
 
 override_dh_auto_configure:
-	dh_auto_configure -- qbs.pro \
-		CONFIG+=debug \
-		CONFIG+=qbs_disable_rpath \
-		CONFIG+=qbs_enable_project_file_updates \
-		CONFIG+=qbs_enable_unit_tests \
-		QBS_INSTALL_PREFIX=/usr \
-		QBS_LIBRARY_DIRNAME=lib/${DEB_HOST_MULTIARCH}
+	dh_auto_configure -- \
+		-DQBS_ENABLE_RPATH=no \
+		-DWITH_TESTS=yes \
+		-DWITH_UNIT_TESTS=yes \
+		-DQBS_INSTALL_PREFIX=/usr \
+		-DQBS_LIB_INSTALL_DIR=lib/${DEB_HOST_MULTIARCH} \
+		-DQBS_PLUGINS_INSTALL_BASE=lib/${DEB_HOST_MULTIARCH} \
+		-DQBS_INSTALL_HTML_DOCS=yes \
+		-DQBS_INSTALL_QCH_DOCS=yes
 
 override_dh_auto_build-indep:
-	dh_auto_build -- docs
-	dh_auto_build -- sub-static-res-pro
+	dh_auto_build -- -C doc
+	dh_auto_build -- -C share
 
 override_dh_auto_install-indep:
-	dh_auto_build -- INSTALL_ROOT=$(CURDIR)/debian/tmp install_inst_html_docs
-	dh_auto_build -- INSTALL_ROOT=$(CURDIR)/debian/tmp sub-static-pro-install_subtargets
-	dh_auto_build -- INSTALL_ROOT=$(CURDIR)/debian/tmp sub-static-res-pro-install_subtargets
+	dh_auto_install -- -C doc
+	dh_auto_install -- -C share
 
 override_dh_auto_test-arch:
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	set -ex; \
-		export LD_LIBRARY_PATH=$(CURDIR)/lib/${DEB_HOST_MULTIARCH}:$$LD_LIBRARY_PATH; \
+		export LD_LIBRARY_PATH=$(BUILDPATH)/lib/${DEB_HOST_MULTIARCH}:$$LD_LIBRARY_PATH; \
 		export HOME=$(CURDIR)/debian/.debhelper/generated/_source/home; \
 		export QBS_AUTOTEST_PROFILE=qbs_autotests; \
 		export QBS_AUTOTEST_ALWAYS_LOG_STDOUT=1; \
 		export QBS_AUTOTEST_ALWAYS_LOG_STDERR=1; \
-		$(CURDIR)/bin/qbs-setup-toolchains /usr/bin/gcc gcc; \
-		$(CURDIR)/bin/qbs-setup-qt /usr/bin/qmake qbs_autotests; \
-		[ -n "`$(CURDIR)/bin/qbs-config --list profiles.qbs_autotests.baseProfile`" ] || \
-			$(CURDIR)/bin/qbs-config profiles.qbs_autotests.baseProfile gcc; \
+		$(BUILDPATH)/bin/qbs-setup-toolchains /usr/bin/gcc gcc; \
+		$(BUILDPATH)/bin/qbs-setup-qt /usr/bin/qmake qbs_autotests; \
+		[ -n "`$(BUILDPATH)/bin/qbs-config --list profiles.qbs_autotests.baseProfile`" ] || \
+			$(BUILDPATH)/bin/qbs-config profiles.qbs_autotests.baseProfile gcc; \
 		LC_ALL=C.UTF-8 dh_auto_test --max-parallel=1
 endif
 
@@ -57,4 +60,6 @@ override_dh_install:
 	rm -fv debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/libqbscore.so.1
 	rm -fv debian/tmp/usr/libexec/qbs/dmgbuild
 	rm -rfv debian/tmp/usr/share/qbs/python
+	mkdir -p debian/tmp/usr/share/qt5/doc
+	mv $(BUILDPATH)/doc/qbs.qch debian/tmp/usr/share/qt5/doc/qbs.qch
 	dh_install



More information about the Neon-commits mailing list