Skip to content

Commit

Permalink
debian packaging: make packaging of api documentation optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 27, 2024
1 parent 392d7ce commit 66c716d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
1 change: 0 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Build-Depends:
qttools5-dev-tools,
qttools5-dev,
git,
doxygen,
graphviz,
xvfb,
xauth,
Expand Down
28 changes: 14 additions & 14 deletions debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Build-Depends:
protobuf-compiler,
libzstd-dev,
git,
doxygen,
#apidoc# doxygen,
graphviz,
xvfb,
xauth,
Expand Down Expand Up @@ -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
Expand Down
21 changes: 17 additions & 4 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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 \
Expand Down

0 comments on commit 66c716d

Please sign in to comment.