288.1. ark-26.08.2
Archive manager — browse, extract and create tar, zip, 7z and compressed archives
| Version | 26.08.2, release 1 |
| Shelf | archiver — Compression libraries and archive tools |
| Phase | 44_apps (Applications), 7 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://apps.kde.org/ark/ |
| Build time | 7.6 SBU |
| Installed size | 3.2 MiB in 41 files |
| Recipe | ports/core/archiver/ark/kpkgbuild |
About
Ark is KDE’s archive manager. It opens, browses, extracts and creates archives through plugins: one on libarchive for tar and its compressed forms, one on libzip for zip, and plugins that drive command-line tools for the rest. The 7z, zip and unzip programs those plugins run are in depends (7zip, zip, unzip); unrar and rar, lsar and unar, and arj are not ports, so the RAR, unarchiver and ARJ plugins find nothing to run. RAR archives are read by the read-only libarchive plugin instead (see Notes).
Sources
ark-26.08.2.tar.xz(2.9 MiB)
sha256ef1e6c47fb17e57271917f71d72cd093eee7c88bcdf679753958498dae6d43a0
upstream: https://download.kde.org/stable/release-service/26.08.2/src/ark-26.08.2.tar.xz
archive copy: sources-1/archiver--ark-26.08.2.tar.xz
Dependencies
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, kconfig, kcrash, kdbusaddons, kfilemetadata, ki18n, kio, kservice, kparts, kwidgetsaddons, kwindowsystem, kiconthemes, kpty, kdoctools, libarchive, libzip, zlib, 7zip, zip, unzip.
Required by (1): kde-gear-core.
Patches
build.sh applies these; kpkg applies nothing by itself.
app-id.patch— Set StartupWMClass in ark's desktop entry to its desktop id, org.kde.arkPlasma's task manager matches a window to a desktop entry by its Wayland app_id, which KAboutData sets to the desktop file name, org.kde.ark, and by StartupWMClass. Upstream's StartupWMClass=ark names neither, so the two lookups disagree.
rar-libarchive.patch— Open RAR archives read-only through libarchivelibarchive reads RAR 4 and RAR 5 archives natively, with no external program, but Ark offers RAR only to its unrar and unarchiver plugins, which need the unrar or lsar executables. Without them Ark lists RAR as supported and then fails with "No suitable plugin found". Listing application/vnd.rar in the read-only libarchive plugin lets Ark open, browse and extract RAR archives wherever libarchive is built; the unrar plugin's higher priority keeps it the choice when unrar is installed.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install ark'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/archiver/ark.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/archiver/ark
echo 'ef1e6c47fb17e57271917f71d72cd093eee7c88bcdf679753958498dae6d43a0 ark-26.08.2.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/ark
SRC=$SRC_ROOT/ark-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf ark-26.08.2.tar.xz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/app-id.patch"
patch -p1 -i "$PORT_SRC/rar-libarchive.patch"
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-D BUILD_DOC=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_LibZip=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
The switches, and why each is set:
-D KF_SKIP_PO_PROCESSING=ON—ki18n_install(po)returns at once, so none of the message catalogues inpo/is compiled or installed. kpkg removes every non-English catalogue from the package anyway (see size and language policy), so this only saves build time. The translated handbooks underpo/<lang>/docs/are still built bykdoctools_install(po), and kpkg removes those too.-D BUILD_DOC=ON— Build Ark’s handbook with kdoctools, which is then a required package. On by default upstream; named so the handbook cannot drop out.-D CMAKE_REQUIRE_FIND_PACKAGE_LibZip=ON— Ark looks for LibZip as optional and builds the libzip plugin only when it is found. Made required, a missing libzip stops the configure instead of quietly leaving zip to the command-line plugin alone (see a graphical application).
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/ark, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf ark-26.08.2-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/ark, and runs the triggers its paths call for.
Contents
Installed programs: ark.
Installed libraries: libkerfuffle.so.
Installed directories: /usr/lib/qt6/plugins/kerfuffle, /usr/share/doc/HTML/en/ark, /usr/share/licenses/ark.
Short descriptions
ark |
KDE archiving tool |
Notes
app-id.patch sets StartupWMClass in Ark’s desktop entry to org.kde.ark, its desktop id. Plasma’s task manager matches a window to its desktop entry by the Wayland app id, which KAboutData sets to the desktop file name, org.kde.ark, and by StartupWMClass; upstream’s StartupWMClass=ark names neither, so the two lookups disagree.
rar-libarchive.patch adds application/vnd.rar to the types of the read-only libarchive plugin. Upstream lists RAR only for the unrar and unarchiver plugins, and a plugin is used only when its programs are found, so without the patch Ark would claim RAR, fail with “No suitable plugin found” and leave ark --batch waiting with nothing to extract. libarchive reads RAR 4 and RAR 5 itself; with the patch Ark opens, browses and extracts RAR, read-only, and an encrypted RAR is not opened. The unrar plugin’s higher priority keeps it first wherever unrar is installed.
Neither patch is merged upstream in Ark.