From 66c716d8a3db16f6b6dae373c1c5f43292af9105 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 23 Mar 2024 23:30:16 +0100 Subject: [PATCH] debian packaging: make packaging of api documentation optional --- debian/control | 1 - debian/control.in | 28 ++++++++++++++-------------- debian/rules | 21 +++++++++++++++++---- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/debian/control b/debian/control index 851cf2852570..590317c5ab55 100644 --- a/debian/control +++ b/debian/control @@ -67,7 +67,6 @@ Build-Depends: qttools5-dev-tools, qttools5-dev, git, - doxygen, graphviz, xvfb, xauth, diff --git a/debian/control.in b/debian/control.in index 25e0a500788d..1e37feceb4e1 100644 --- a/debian/control.in +++ b/debian/control.in @@ -81,7 +81,7 @@ Build-Depends: protobuf-compiler, libzstd-dev, git, - doxygen, +#apidoc# doxygen, graphviz, xvfb, xauth, @@ -563,19 +563,19 @@ Description: QGIS server providing various OGC services display databases of geographic information. . This package contains the landing page service. - -Package: qgis-api-doc -Architecture: all -Section: doc -Depends: - ${misc:Depends} -Recommends: - qt5-doc-html -Description: QGIS API documentation - QGIS is a Geographic Information System (GIS) which manages, analyzes and - display databases of geographic information. - . - This package contains the QGIS API documentation. +#apidoc# +#apidoc#Package: qgis-api-doc +#apidoc#Architecture: all +#apidoc#Section: doc +#apidoc#Depends: +#apidoc# ${misc:Depends} +#apidoc#Recommends: +#apidoc# qt5-doc-html +#apidoc#Description: QGIS API documentation +#apidoc# QGIS is a Geographic Information System (GIS) which manages, analyzes and +#apidoc# display databases of geographic information. +#apidoc# . +#apidoc# This package contains the QGIS API documentation. #oracle# #oracle#Package: qgis-oracle-provider #oracle#Architecture: any diff --git a/debian/rules b/debian/rules index 4abb692fb603..71d1645447ec 100755 --- a/debian/rules +++ b/debian/rules @@ -88,8 +88,6 @@ CMAKE_OPTS := \ -DPEDANTIC=TRUE \ -DSERVER_SKIP_ECW=TRUE \ -DQGIS_CGIBIN_SUBDIR=/usr/lib/cgi-bin \ - -DWITH_APIDOC=TRUE \ - -DGENERATE_QHP=TRUE \ -DWITH_CUSTOM_WIDGETS=TRUE \ -DWITH_SERVER=TRUE \ -DWITH_SERVER_PLUGINS=TRUE \ @@ -134,6 +132,13 @@ ifneq (0,$(.SHELLSTATUS)) -DQT5_3DEXTRA_LIBRARY=/usr/lib/$(DEB_BUILD_MULTIARCH)/libQt53DExtras.so endif +ifneq (,$(WITH_APIDOC)) + CMAKE_OPTS += -DWITH_APIDOC=TRUE -DGENERATE_QHP=TRUE +else + CMAKE_OPTS += -DWITH_APIDOC=OFF -DGENERATE_QHP=OFF +endif + + ifneq (,$(WITH_ORACLE)) ifeq ($(DEB_BUILD_ARCH),amd64) ORACLE_INCLUDEDIR=/usr/include/oracle/21/client64/ @@ -195,12 +200,16 @@ endif CONTROL_EXPRESSIONS = $(DISTRIBUTION) grass$(GRASSVER) +ifneq (,$(WITH_APIDOC)) +CONTROL_EXPRESSIONS += apidoc +endif + ifneq (,$(WITH_ORACLE)) - CONTROL_EXPRESSIONS += oracle +CONTROL_EXPRESSIONS += oracle endif ifeq ($(shell pkg-config --exists pdal && dpkg --compare-versions $$(pkg-config --modversion pdal) ge 2.5 && echo 1 || echo 0),1) - CONTROL_EXPRESSIONS += pdal_wrench +CONTROL_EXPRESSIONS += pdal_wrench endif define gentemplate @@ -253,7 +262,9 @@ else ninja $(NINJA_OPTS) -C $(QGIS_BUILDDIR) endif +ifneq (,$(WITH_APIDOC)) ninja $(NINJA_OPTS) -C $(QGIS_BUILDDIR) apidoc +endif override_dh_auto_test: test-stamp @@ -280,8 +291,10 @@ endif override_dh_auto_install: DESTDIR=$(CURDIR)/debian/tmp ninja $(NINJA_OPTS) -C $(QGIS_BUILDDIR) install +ifneq (,$(WITH_APIDOC)) # remove unwanted files $(RM) $(CURDIR)/debian/tmp/usr/share/qgis/doc/api/installdox +endif # replace leaflet and jquery urls perl -i -p \