Name: veracrypt Version: 1.26.29 Release: 1%{?dist} Summary: Open-source disk encryption software License: Apache-2.0 URL: https://www.veracrypt.fr Source0: https://github.com/veracrypt/VeraCrypt.git BuildRequires: gcc, gcc-c++, make, wxGTK-devel, fuse-devel, pcsc-lite-devel, yasm, git, ImageMagick BuildRequires: libayatana-appindicator-gtk3-devel Requires: fuse, wxGTK, libayatana-appindicator-gtk3 %description VeraCrypt is a free and open-source disk encryption software brought to you by IDRIX. It is based on TrueCrypt, with enhanced security and improved features. %prep # Clone the Git repository into the build directory git clone https://github.com/veracrypt/VeraCrypt.git %{_builddir}/%{name}-%{version} cd %{_builddir}/%{name}-%{version} git checkout VeraCrypt_%{version} # Debugging: Show directory contents echo "Debug: Current working directory during %%prep:" pwd echo "Debug: Directory listing during %%prep:" ls -lR # Ensure file permissions are correct find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; %build # Debugging wx-config echo "Debug: Checking for wx-config in PATH..." command -v wx-config || { echo "wx-config not found!" >&2; exit 1; } echo "Debug: wx-config version: $(wx-config --version)" echo "Debug: wx-config --cxxflags: $(wx-config --cxxflags)" echo "Debug: wx-config --libs: $(wx-config --libs)" wx-config --list || { echo "Failed to list wx-config configurations!" >&2; exit 1; } # Export wx-config path explicitly export WX_CONFIG=$(command -v wx-config) # Ensure shared wxWidgets libraries are used (disable static) export CXXFLAGS="%{optflags} $(wx-config --cxxflags)" export LDFLAGS="$(wx-config --libs)" cd %{_builddir}/%{name}-%{version}/src %make_build VERBOSE=1 %install echo "Debug: Current working directory during %%install:" pwd # Install binary # NOTE: the Makefile always emits the ELF binary at src/Main/veracrypt. # Do NOT use `find -name veracrypt`: it also matches the OpenWRT packaging # directory src/Build/Packaging/openwrt/package/utils/veracrypt, producing a # two-line $VCRYPT_BIN and a broken cp with an embedded newline. VCRYPT_BIN=%{_builddir}/%{name}-%{version}/src/Main/veracrypt [ -x "$VCRYPT_BIN" ] || { echo "Error: veracrypt binary not found at $VCRYPT_BIN!" >&2; exit 1; } mkdir -p %{buildroot}/usr/libexec/veracrypt cp "$VCRYPT_BIN" %{buildroot}/usr/libexec/veracrypt/veracrypt-bin # Create wrapper script mkdir -p %{buildroot}/usr/bin cat > %{buildroot}/usr/bin/veracrypt << 'EOF' #!/bin/bash export GDK_BACKEND=x11 exec /usr/libexec/veracrypt/veracrypt-bin "$@" EOF chmod +x %{buildroot}/usr/bin/veracrypt # Install documentation (scoped to top level + doc/, not the whole tree) mkdir -p %{buildroot}/usr/share/doc/%{name} for FILE in \ %{_builddir}/%{name}-%{version}/License.txt \ %{_builddir}/%{name}-%{version}/Readme.txt \ %{_builddir}/%{name}-%{version}/doc/*.txt; do [ -f "$FILE" ] && cp "$FILE" %{buildroot}/usr/share/doc/%{name}/ done # Install .xpm icons ICON_SIZES=(16x16 48x48 128x128 256x256) for SIZE in "${ICON_SIZES[@]}"; do ICON_PATH=%{_builddir}/%{name}-%{version}/src/Resources/Icons/VeraCrypt-$SIZE.xpm if [ -f "$ICON_PATH" ]; then ICON_DIR=%{buildroot}/usr/share/icons/hicolor/$SIZE/apps/ mkdir -p "$ICON_DIR" echo "Debug: Copying icon $SIZE to $ICON_DIR" cp "$ICON_PATH" "$ICON_DIR/veracrypt.xpm" else echo "Warning: Icon size $SIZE not found at $ICON_PATH. Skipping." fi done # Install .icns files ICNS_FILES=("VeraCrypt.icns" "TrueCrypt.icns" "VeraCrypt_Volume.icns") mkdir -p %{buildroot}/usr/share/icons/veracrypt for ICNS in "${ICNS_FILES[@]}"; do ICNS_PATH=%{_builddir}/%{name}-%{version}/src/Resources/Icons/$ICNS if [ -f "$ICNS_PATH" ]; then echo "Debug: Copying $ICNS to /usr/share/icons/veracrypt/" cp "$ICNS_PATH" %{buildroot}/usr/share/icons/veracrypt/ else echo "Warning: $ICNS not found at $ICNS_PATH. Skipping." fi done # Install desktop entry mkdir -p %{buildroot}/usr/share/applications cat > %{buildroot}/usr/share/applications/veracrypt.desktop << 'EOF' [Desktop Entry] Name=VeraCrypt Comment=Open-source disk encryption software Exec=/usr/bin/veracrypt Icon=veracrypt Terminal=false Type=Application Categories=Utility;Security; EOF # Do not create or copy index.theme to avoid conflicts echo "Debug: Skipping index.theme to prevent conflicts." # Debugging: Log installed files echo "Debug: Listing installed files in %%buildroot:" find %{buildroot} %files /usr/bin/veracrypt /usr/libexec/veracrypt/veracrypt-bin /usr/share/doc/%{name}/ /usr/share/applications/veracrypt.desktop /usr/share/icons/hicolor/*/apps/veracrypt.xpm /usr/share/icons/veracrypt/* %changelog * Fri Jul 10 2026 Maxx - 1.26.29-1 - Version 1.26.29 - Fix %%install: pin binary to src/Main/veracrypt (find matched OpenWRT packaging dir) - Scope doc install to top level + doc/ instead of scanning the whole tree - Move -devel dependency to BuildRequires; trim runtime Requires - Use %%make_build