%global debug_package %{nil} %undefine _debugsource_packages Name: dde-file-manager Version: 6.5.152 Release: 2%{?dist} Summary: Deepin Desktop Environment File Manager License: GPLv3+ URL: https://github.com/linuxdeepin/dde-file-manager Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtbase-private-devel BuildRequires: qt6-qtsvg-devel BuildRequires: qt6-qttools-devel BuildRequires: qt6-qtmultimedia-devel BuildRequires: dtk6core-devel BuildRequires: dtk6gui-devel BuildRequires: dtk6widget-devel BuildRequires: dde-shell-devel BuildRequires: dde-application-manager-devel BuildRequires: util-dfm-devel BuildRequires: glib2-devel BuildRequires: libsecret-devel BuildRequires: polkit-qt6-1-devel BuildRequires: polkit-devel BuildRequires: libX11-devel BuildRequires: libxcb-devel BuildRequires: xcb-util-wm-devel BuildRequires: openssl-devel BuildRequires: cryptsetup-devel BuildRequires: device-mapper-devel BuildRequires: systemd-devel BuildRequires: libmount-devel BuildRequires: libheif-devel BuildRequires: zlib-devel BuildRequires: libnl3-devel BuildRequires: poppler-cpp-devel BuildRequires: poppler-qt6-devel BuildRequires: minizip-ng-compat-devel BuildRequires: lucene++-devel BuildRequires: boost-devel BuildRequires: libicu-devel BuildRequires: kf6-syntax-highlighting-devel BuildRequires: taglib-devel BuildRequires: qt6-linguist Requires: util-dfm%{?_isa} %description DDE File Manager is the default file manager for Deepin Desktop Environment. It provides file browsing, desktop icon management, and file dialog services. This build is trimmed for EC2/VNC testing: no search plugin, no vault, no disk encryption, no AppImage thumbnails, no OCR extractor. %prep %autosetup -n %{name}-%{version} # === TRIM: Remove plugins that need unavailable deps or aren't needed === # Remove search plugin from filemanager sed -i '/dfmplugin-search/d' src/plugins/filemanager/CMakeLists.txt # Remove disk-encrypt-entry (needs deepin-qdbus-service) sed -i '/dfmplugin-disk-encrypt-entry/d' src/plugins/filemanager/CMakeLists.txt # Remove vault plugin from filemanager and daemon sed -i '/dfmplugin-vault/d' src/plugins/filemanager/CMakeLists.txt sed -i '/vault/d' src/plugins/daemon/CMakeLists.txt # Remove services that need unavailable deps sed -i '/textindex/d' src/services/CMakeLists.txt sed -i '/diskencrypt/d' src/services/CMakeLists.txt sed -i '/tpmcontrol/d' src/services/CMakeLists.txt # Remove dde-dock-plugins (needs dde-dock which is not available) sed -i '/dde-dock-plugins/d' src/external/CMakeLists.txt # Remove pdf-preview (needs deepin-pdfium) sed -i '/pdf-preview/d' src/apps/dde-file-manager-preview/pluginpreviews/CMakeLists.txt # Remove ocr-extractor (needs dtk6ocr) sed -i '/ocr-extractor/d' src/apps/dde-file-manager-extractor/plugins/CMakeLists.txt # === PATCH: Remove libappimage dependency (not available) === # Patch DFMLibraryConfig.cmake to remove libappimage sed -i '/find_package(libappimage REQUIRED)/d' cmake/DFMLibraryConfig.cmake sed -i '/libappimage/d' cmake/DFMLibraryConfig.cmake # Remove appimage support completely using python for reliable multi-line patching sed -i '/appimage\/appimage.h/d' src/dfm-base/utils/thumbnail/thumbnailcreators.cpp python3 << 'PYEOF' import re fn = 'src/dfm-base/utils/thumbnail/thumbnailcreators.cpp' with open(fn) as f: lines = f.readlines() # Find the function and replace its body out = [] in_func = False brace_depth = 0 for line in lines: if 'appimageThumbnailCreator' in line and '(' in line and not in_func: in_func = True out.append(line) continue if in_func and not brace_depth and '{' in line: brace_depth = 1 out.append('{\n Q_UNUSED(filePath); Q_UNUSED(size); return QImage();\n}\n') continue if in_func and brace_depth: brace_depth += line.count('{') - line.count('}') if brace_depth <= 0: in_func = False continue out.append(line) with open(fn, 'w') as f: f.writelines(out) print("Patched appimageThumbnailCreator") PYEOF # Also remove any libappimage linking from cmake find . -name "CMakeLists.txt" -exec sed -i '/appimage/Id' {} \; find . -name "*.cmake" -exec sed -i '/appimage/Id' {} \; # === PATCH: Enable desktop plugins (wallpaper/canvas/organizer) + org.deepin.ds.desktop === # These provide the desktop wallpaper + icons and the dde-shell desktop panel plugin. # dde-shell-devel installs headers at /usr/include/ (no dde-shell/ prefix) and the # Dde::Shell cmake target uses -I/usr/include, but sources include them with a # dde-shell/ prefix. Rewrite every include to the unprefixed path. grep -rlZ '/dev/null | \ xargs -0 -r sed -i -E 's##<\1>#g' # (desktop subdir + external/dde-shell-plugins stay enabled) # === PATCH: Fix docparser API (AL2023 version uses different signature) === # Remove the text-extractor plugin that uses docparser (API mismatch) sed -i '/text-extractor/d' src/apps/dde-file-manager-extractor/plugins/CMakeLists.txt # === PATCH: Remove dfm6-mount from DFMCommon.cmake (it's found via DFMLibraryConfig) === # DFMCommon has a duplicate find_package(dfm6-mount REQUIRED) that causes issues # Actually it's fine as we now build dfm-mount. %build %cmake \ -DOPT_ENABLE_BUILD_UT=OFF \ -DOPT_ENABLE_BUILD_TESTS=OFF \ -DOPT_ENABLE_BUILD_DOCS=OFF \ -DCMAKE_BUILD_TYPE=Release \ %cmake_build %install %cmake_install # Strip stray libappimage references from installed pkgconfig files. # The appimage code was trimmed, but a leftover 'Requires: libappimage' in a .pc # makes RPM auto-generate Requires: pkgconfig(libappimage), which is unsatisfiable. for pc in %{buildroot}%{_libdir}/pkgconfig/*.pc; do [ -e "$pc" ] || continue sed -i -E 's/(Requires(\.private)?:.*)\blibappimage\b[[:space:]]*/\1/g; s/\blibappimage\b//g' "$pc" done # Relocate files mis-installed under /usr/usr (dde-shell DDE_SHELL_PLUGIN_INSTALL_DIR # cmake bug sets the plugin dir to /usr//usr/lib64/dde-shell). Move them to the real path. if [ -d %{buildroot}/usr/usr ]; then cp -a %{buildroot}/usr/usr/. %{buildroot}/usr/ rm -rf %{buildroot}/usr/usr fi %files %license LICENSE %{_bindir}/dde-file-manager %{_bindir}/dfm-trash.sh %{_datadir}/dde-shell/ %{_libdir}/dde-shell/ %{_bindir}/dde-file-manager-daemon %{_bindir}/dde-file-manager-pkexec %{_bindir}/dde-file-dialog %{_bindir}/dde-property-dialog %{_bindir}/dde-select-dialog-wayland %{_bindir}/dde-select-dialog-x11 %{_bindir}/file-manager.sh %{_libdir}/libdfm6-base.so.* %{_libdir}/libdfm6-framework.so.* %{_libdir}/libdfm-extension.so.* %{_libdir}/dde-file-manager/ %{_datadir}/dde-file-manager/ %{_datadir}/dbus-1/ %{_datadir}/applications/*.desktop %{_datadir}/polkit-1/ %{_datadir}/deepin/dde-file-manager/ %{_datadir}/dsg/ %{_datadir}/mime/ %{_prefix}/etc/ %{_sysconfdir}/systemd/ %{_prefix}/lib/systemd/ %{_libdir}/deepin-service-manager/ %{_libdir}/libdde-file-manager.so* %{_libexecdir}/dde-file-manager* %{_datadir}/applications/context-menus/ %{_datadir}/deepin-debug-config/ %{_datadir}/deepin-log-viewer/ %{_datadir}/deepin-manual/ %{_datadir}/deepin-service-manager/ %{_includedir}/dfm-base/ %{_includedir}/dfm-framework/ %{_includedir}/dfm-extension/ %{_libdir}/libdfm6-base.so %{_libdir}/libdfm6-framework.so %{_libdir}/libdfm-extension.so %{_libdir}/cmake/dfm*/ %{_libdir}/pkgconfig/dfm*.pc %changelog * Sat Jul 18 2026 Yonghang Wang - 6.5.152-1 - Initial package for al-stream-2023 - Trim: search plugin, vault, disk-encrypt, textindex, diskencrypt, tpmcontrol - Trim: pdf-preview, ocr-extractor, dde-dock-plugins, libappimage support