From 2eaa898dab9b88cf8fd105b15291ecb6af0b7f45 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 3 Aug 2026 17:31:29 +0200 Subject: build: add a SlackBuild under assets/slackbuild Packages the application for Slackware, following SBo conventions with two deliberate departures: the tag is _danix rather than _SBo and the package type is txz rather than tgz, since this is not an SBo submission. sbolint reports exactly those two as errors and nothing else; the template comments it warned about are gone. Written against the install layout the build really produces, checked by staging it: one binary, one .desktop entry and one scalable icon, no libraries and no man or info pages. The template's .la removal, man and info compression and perllocal.pod cleanup would all act on nothing here, so they are left out rather than carried along as dead code. doinst.sh keeps only the desktop-database and icon-cache updates. The download URL and checksum are verified rather than assumed: sbodl fetches the tarball and reports "md5sum matches OK". Adds QTMAILDIR_BUILD_TESTS, defaulting to ON so the ordinary build is unchanged. A packaging build has no use for the test binaries, and building them pulls in Qt6::Test to produce nothing that ships. Note the 0.4.0 tarball predates this option, so with that source the flag is accepted but does nothing; the README says so. notmuch is the only dependency outside Slackware. Qt6 including WebEngine, gmime and cmake are all stock, which is what REQUIRES reflects. Co-Authored-By: Claude Opus 5 --- CMakeLists.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 827b806..e974dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,16 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets WebEngineWidgets Test) +# Off for a packaging build, which has no use for the test binaries and would +# otherwise pull in Qt6::Test and compile the whole suite to produce nothing +# that ships. +option(QTMAILDIR_BUILD_TESTS "Build the test suite" ON) + +set(QTMAILDIR_QT_COMPONENTS Widgets WebEngineWidgets) +if(QTMAILDIR_BUILD_TESTS) + list(APPEND QTMAILDIR_QT_COMPONENTS Test) +endif() +find_package(Qt6 6.5 REQUIRED COMPONENTS ${QTMAILDIR_QT_COMPONENTS}) # notmuch ships no pkg-config file; locate it by hand. find_path(NOTMUCH_INCLUDE_DIR notmuch.h) @@ -27,6 +36,8 @@ configure_file( ${CMAKE_CURRENT_BINARY_DIR}/generated/qtmaildir/version.h @ONLY) -enable_testing() add_subdirectory(src) -add_subdirectory(tests) +if(QTMAILDIR_BUILD_TESTS) + enable_testing() + add_subdirectory(tests) +endif() -- cgit v1.2.3