File veracrypt.spec of Package veracrypt

#
# spec file for package veracrypt
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

Name:           veracrypt
Version:        1.26.24
Release:        0
Summary:        Free disk encryption software based on TrueCrypt
# Original TrueCrypt 3.0 license is non-free: https://www.truecrypt.org/docs/license
# Additions are Apache-2.0: https://veracrypt.io/en/VeraCrypt%20License.html
# Project claims dual-license but this does not cover the whole code
License:        LicenseRef-TrueCrypt-3.0 AND Apache-2.0
Group:          Productivity/Security
URL:            https://www.%{name}.fr
Source0:        https://github.com/veracrypt/VeraCrypt/releases/download/VeraCrypt_%{version}/VeraCrypt_%{version}_Source.tar.bz2
Source1:        https://github.com/veracrypt/VeraCrypt/releases/download/VeraCrypt_%{version}/VeraCrypt_%{version}_Source.tar.bz2.sig
# https://veracrypt.io/en/Downloads.html
# 0xID=0x680D16DE 5069 A233 D55A 0EEB 174A 5FC3 821A CD02 680D 16DE
# https://www.idrix.fr/VeraCrypt/VeraCrypt_PGP_public_key.asc
# https://amcrypto.jp/VeraCrypt/VeraCrypt_PGP_public_key.asc
Source2:        %{name}.keyring
BuildRequires:  gcc-c++
BuildRequires:  help2man
BuildRequires:  pcsc-lite-devel
BuildRequires:  pkgconfig
BuildRequires:  sed
BuildRequires:  update-desktop-files
BuildRequires:  wxWidgets-devel < 3.3
BuildRequires:  wxWidgets-devel >= 3.0
BuildRequires:  pkgconfig(fuse)
%ifarch %{ix86} x86_64
BuildRequires:  yasm
%else
BuildRequires:  nasm
%endif

%description
VeraCrypt is software for establishing and maintaining an
on-the-fly-encrypted volume (data storage device).
On-the-fly encryption means that data is automatically encrypted
right before it is saved and decrypted right after it is loaded,
without any user intervention. No data stored on an encrypted
volume can be read (decrypted) without using the correct
password/keyfile(s) or correct encryption keys. Entire file system
is encrypted (e.g., file names, folder names, contents of every
file, free space, meta data, etc).
It is based on original TrueCrypt 7.1a with security enhancements
and modifications.

%package -n veracrypt-lang
# FIXME: consider using %%lang_package macro
Summary:        Translations for package veracrypt
Group:          System/Localization
Requires:       veracrypt = %{version}
Supplements:    veracrypt
Provides:       veracrypt-lang-all = %{version}
BuildArch:      noarch

%description -n veracrypt-lang
Provides translations for the "veracrypt" package.

%package -n veracrypt-doc
Summary:        Documentation for veracrypt
Group:          Documentation/HTML
BuildArch:      noarch

%description -n veracrypt-doc
This package contains the documentation for veracrypt.

%prep
%autosetup -c

%build
%make_build -C src

%install
install -D -m 0755 src/Main/veracrypt "%{buildroot}/%{_bindir}/veracrypt"
install -D -m 0755 -t %{buildroot}%{_sbindir} src/Setup/Linux/mount.veracrypt
install -D -m 0644 -t %{buildroot}%{_datadir}/veracrypt/languages Translations/*.xml
install -D -m 0644 -t %{buildroot}%{_datadir}/mime/packages src/Setup/Linux/veracrypt.xml
install -D -m 0644 src/Setup/Linux/%{name}.desktop "%{buildroot}%{_datadir}/applications/%{name}.desktop"
install -D -m 0644 src/Resources/Icons/VeraCrypt-256x256.xpm "%{buildroot}%{_datadir}/pixmaps/veracrypt.xpm"

%suse_update_desktop_file -r -i veracrypt System Security

# man page
install -d -m 0755 %{buildroot}%{_mandir}/man1
help2man -N -o %{buildroot}%{_mandir}/man1/veracrypt.1 \
	%{buildroot}%{_bindir}/veracrypt
 
%files
%license License.txt
%doc README.md doc/EFI-DCS/*.pdf
%{_bindir}/veracrypt
%{_sbindir}/mount.veracrypt
%dir %{_datadir}/veracrypt
%{_datadir}/mime/packages/veracrypt.xml
%{_mandir}/man1/veracrypt.1%{?ext_man}
%{_datadir}/applications/veracrypt.desktop
%{_datadir}/pixmaps/veracrypt.xpm

%files -n veracrypt-lang
%license License.txt
%{_datadir}/veracrypt/languages

%files -n veracrypt-doc
%license License.txt
%doc doc/html

%changelog
openSUSE Build Service is sponsored by