summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--debian/apt-utils.examples1
-rw-r--r--debian/apt-utils.install7
-rw-r--r--debian/apt-utils.manpages6
-rw-r--r--debian/apt.examples1
-rw-r--r--debian/apt.install27
-rw-r--r--debian/apt.manpages26
-rw-r--r--debian/control8
-rwxr-xr-xdebian/rules16
-rw-r--r--doc/CMakeLists.txt13
-rw-r--r--vendor/CMakeLists.txt2
11 files changed, 67 insertions, 49 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86e5060d1..5c6896387 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,12 @@ include_directories(${PROJECT_BINARY_DIR}/include)
enable_testing()
-option(WITH_DOC "Build documentation." ON)
+option(WITH_DOC "Build all documentation." ON)
+include(CMakeDependentOption)
+cmake_dependent_option(WITH_DOC_MANPAGES "Force building manpages." OFF "NOT WITH_DOC" OFF)
+cmake_dependent_option(WITH_DOC_GUIDES "Force building guides." OFF "NOT WITH_DOC" OFF)
+cmake_dependent_option(WITH_DOC_DOXYGEN "Force building doxygen documentation." OFF "NOT WITH_DOC" OFF)
+cmake_dependent_option(WITH_DOC_EXAMPLES "Force building example configurations." OFF "NOT WITH_DOC" OFF)
option(WITH_TESTS "Build tests" ON)
option(USE_NLS "Localisation support." ON)
@@ -247,7 +252,9 @@ add_subdirectory(test)
if (USE_NLS)
add_subdirectory(po)
+endif()
+if(TARGET update-po AND TARGET update-po4a)
# Link update-po4a into the update-po target
add_dependencies(update-po update-po4a)
endif()
diff --git a/debian/apt-utils.examples b/debian/apt-utils.examples
new file mode 100644
index 000000000..b66de3cdd
--- /dev/null
+++ b/debian/apt-utils.examples
@@ -0,0 +1 @@
+usr/share/doc/apt-utils/examples/*
diff --git a/debian/apt-utils.install b/debian/apt-utils.install
index a27f1e1e4..9b304e535 100644
--- a/debian/apt-utils.install
+++ b/debian/apt-utils.install
@@ -3,11 +3,4 @@ usr/bin/apt-ftparchive
usr/bin/apt-sortpkgs
usr/lib/apt/planners/
usr/lib/apt/solvers/
-usr/share/doc/apt-utils
usr/share/locale/*/*/apt-utils.mo
-usr/share/man/*/*/apt-extracttemplates.*
-usr/share/man/*/*/apt-ftparchive.*
-usr/share/man/*/*/apt-sortpkgs.*
-usr/share/man/*/apt-extracttemplates.*
-usr/share/man/*/apt-ftparchive.*
-usr/share/man/*/apt-sortpkgs.*
diff --git a/debian/apt-utils.manpages b/debian/apt-utils.manpages
new file mode 100644
index 000000000..c61b908ea
--- /dev/null
+++ b/debian/apt-utils.manpages
@@ -0,0 +1,6 @@
+usr/share/man/*/*/apt-extracttemplates.*
+usr/share/man/*/*/apt-ftparchive.*
+usr/share/man/*/*/apt-sortpkgs.*
+usr/share/man/*/apt-extracttemplates.*
+usr/share/man/*/apt-ftparchive.*
+usr/share/man/*/apt-sortpkgs.*
diff --git a/debian/apt.examples b/debian/apt.examples
new file mode 100644
index 000000000..3e15bddda
--- /dev/null
+++ b/debian/apt.examples
@@ -0,0 +1 @@
+usr/share/doc/apt/examples/*
diff --git a/debian/apt.install b/debian/apt.install
index 3658bf5e6..e3a911a9f 100644
--- a/debian/apt.install
+++ b/debian/apt.install
@@ -16,32 +16,5 @@ usr/lib/apt/planners/dump
usr/lib/apt/solvers/dump
usr/lib/dpkg/methods/apt/
usr/share/bash-completion/completions/
-usr/share/doc/apt
usr/share/locale/*/*/apt.mo
-usr/share/man/*/*/apt-cache.*
-usr/share/man/*/*/apt-cdrom.*
-usr/share/man/*/*/apt-config.*
-usr/share/man/*/*/apt-get.*
-usr/share/man/*/*/apt-key.*
-usr/share/man/*/*/apt-mark.*
-usr/share/man/*/*/apt-secure.*
-usr/share/man/*/*/apt-patterns.*
-usr/share/man/*/*/apt.*
-usr/share/man/*/*/apt_preferences.*
-usr/share/man/*/*/apt_auth.*
-usr/share/man/*/*/apt-transport-*.*
-usr/share/man/*/*/sources.list.*
-usr/share/man/*/apt-cache.*
-usr/share/man/*/apt-cdrom.*
-usr/share/man/*/apt-config.*
-usr/share/man/*/apt-get.*
-usr/share/man/*/apt-key.*
-usr/share/man/*/apt-mark.*
-usr/share/man/*/apt-secure.*
-usr/share/man/*/apt-patterns.*
-usr/share/man/*/apt.*
-usr/share/man/*/apt_preferences.*
-usr/share/man/*/apt_auth.*
-usr/share/man/*/apt-transport-*.*
-usr/share/man/*/sources.list.*
var/
diff --git a/debian/apt.manpages b/debian/apt.manpages
new file mode 100644
index 000000000..80dbabd44
--- /dev/null
+++ b/debian/apt.manpages
@@ -0,0 +1,26 @@
+usr/share/man/*/*/apt-cache.*
+usr/share/man/*/*/apt-cdrom.*
+usr/share/man/*/*/apt-config.*
+usr/share/man/*/*/apt-get.*
+usr/share/man/*/*/apt-key.*
+usr/share/man/*/*/apt-mark.*
+usr/share/man/*/*/apt-secure.*
+usr/share/man/*/*/apt-patterns.*
+usr/share/man/*/*/apt.*
+usr/share/man/*/*/apt_preferences.*
+usr/share/man/*/*/apt_auth.*
+usr/share/man/*/*/apt-transport-*.*
+usr/share/man/*/*/sources.list.*
+usr/share/man/*/apt-cache.*
+usr/share/man/*/apt-cdrom.*
+usr/share/man/*/apt-config.*
+usr/share/man/*/apt-get.*
+usr/share/man/*/apt-key.*
+usr/share/man/*/apt-mark.*
+usr/share/man/*/apt-secure.*
+usr/share/man/*/apt-patterns.*
+usr/share/man/*/apt.*
+usr/share/man/*/apt_preferences.*
+usr/share/man/*/apt_auth.*
+usr/share/man/*/apt-transport-*.*
+usr/share/man/*/sources.list.*
diff --git a/debian/control b/debian/control
index 7f10eec3e..44650bfb9 100644
--- a/debian/control
+++ b/debian/control
@@ -9,8 +9,8 @@ Rules-Requires-Root: no
Standards-Version: 4.1.1
Build-Depends: cmake (>= 3.4),
debhelper-compat (= 12),
- docbook-xml,
- docbook-xsl,
+ docbook-xml <!nodoc>,
+ docbook-xsl <!nodoc>,
dpkg-dev (>= 1.20.8),
gettext (>= 0.12),
googletest <!nocheck> | libgtest-dev <!nocheck>,
@@ -27,9 +27,9 @@ Build-Depends: cmake (>= 3.4),
libzstd-dev (>= 1.0),
ninja-build,
pkg-config,
- po4a (>= 0.34-2),
+ po4a (>= 0.34-2) <!nodoc>,
triehash,
- xsltproc,
+ xsltproc <!nodoc>,
zlib1g-dev
Build-Depends-Indep: doxygen <!nodoc>, graphviz <!nodoc>, w3m <!nodoc>
Vcs-Git: https://salsa.debian.org/apt-team/apt.git
diff --git a/debian/rules b/debian/rules
index 502840080..9ab42f24c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,12 +17,6 @@ else
configure_test_flags =
endif
-ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
- profile_doc_flags=-DWITH_DOC=ON
-else
- profile_doc_flags=-DWITH_DOC=OFF
-endif
-
%:
dh $@ --buildsystem=cmake+ninja
@@ -50,7 +44,13 @@ override_dh_installsystemd:
dh_installsystemd -papt --no-restart-on-upgrade --no-restart-after-upgrade --no-start apt-daily.service apt-daily-upgrade.service
dh_installsystemd --remaining-packages
-override_dh_auto_configure-arch: configure_doc_flags=-DWITH_DOC=OFF
-override_dh_auto_configure-indep: configure_doc_flags=$(profile_doc_flags)
+ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
+override_dh_auto_configure-arch: configure_doc_flags="-DWITH_DOC=OFF -DWITH_DOC_MANPAGES=ON"
+override_dh_auto_configure-indep: configure_doc_flags="-DWITH_DOC=ON"
+else
+override_dh_auto_configure-arch: configure_doc_flags="-DWITH_DOC=OFF"
+override_dh_auto_configure-indep: configure_doc_flags="-DWITH_DOC=OFF"
+endif
+
override_dh_auto_configure-arch override_dh_auto_configure-indep:
dh_auto_configure -- -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON $(configure_doc_flags) $(configure_test_flags)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 3060949e5..72a1fed88 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,4 +1,6 @@
+if (WITH_DOC OR WITH_DOC_MANPAGES OR WITH_DOC_GUIDES)
include(Documentation)
+endif()
set(LINGUAS
de
@@ -21,7 +23,7 @@ set(ENTITIES
../vendor/${CURRENT_VENDOR}/apt-vendor.ent
)
-if(WITH_DOC)
+if(WITH_DOC OR WITH_DOC_GUIDES)
add_docbook(apt-doc HTML TEXT ALL
DOCUMENTS
guide.dbk
@@ -43,7 +45,9 @@ add_docbook(libapt-pkg-doc HTML TEXT ALL
TRANSLATED_ENTITIES ${TRANSLATED_ENTITIES}
DEPENDS ${ENTITIES}
)
+endif()
+if(WITH_DOC OR WITH_DOC_DOXYGEN)
find_package(Doxygen REQUIRED)
file(GLOB_RECURSE apt_pkg "../apt-pkg/*.h" "../apt-pkg/*.cc")
@@ -65,9 +69,9 @@ install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/doxygen/html
PATTERN "*.map" EXCLUDE
PATTERN "*.md5" EXCLUDE
)
-
endif()
+if(WITH_DOC OR WITH_DOC_MANPAGES)
add_docbook(apt-man MANPAGE ALL
DOCUMENTS
apt.8.xml
@@ -93,7 +97,12 @@ add_docbook(apt-man MANPAGE ALL
TRANSLATED_ENTITIES ${TRANSLATED_ENTITIES}
LINGUAS ${LINGUAS}
)
+endif()
+if(WITH_DOC OR WITH_DOC_MANPAGES OR WITH_DOC_GUIDES)
add_update_po4a(update-po4a po/${PROJECT_NAME}-doc.pot "po/header.pot.txt")
+endif()
+if(WITH_DOC OR WITH_DOC_EXAMPLES)
add_subdirectory(examples)
+endif()
diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt
index 8246c725a..f6d88690a 100644
--- a/vendor/CMakeLists.txt
+++ b/vendor/CMakeLists.txt
@@ -10,6 +10,7 @@ else()
endif()
# Handle sources.list example
+if (WITH_DOC OR WITH_DOC_EXAMPLES)
add_vendor_file(OUTPUT sources.list
INPUT "${CURRENT_VENDOR}/sources.list.in"
MODE 644
@@ -21,6 +22,7 @@ add_vendor_file(OUTPUT sources.list
current-codename)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sources.list
DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+endif()
# Handle apt.conf snippets
file(GLOB conffiles ${CURRENT_VENDOR}/apt.conf-*)