File veracrypt.spec of Package veracrypt
#
# spec file for package veracrypt
#
# Copyright (c) 2020 SUSE LLC
#
# 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: @SERVICE@
Release: 0
Summary: Free disk encryption software based on TrueCrypt
License: Apache-2.0
Group: Productivity/Security
URL: https://www.veracrypt.fr
Source: %{name}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: help2man
BuildRequires: hicolor-icon-theme
BuildRequires: makeself
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-devel
BuildRequires: yasm
BuildRequires: pkgconfig(fuse)
BuildRequires: pkgconfig(libpcsclite)
Requires: device-mapper
Requires: fuse
Recommends: %{name}-lang
%description
VeraCrypt is a free disk encryption software brought to you by IDRIX
(https://www.idrix.fr) and that is based on TrueCrypt 7.1a.
%lang_package
%package doc
Summary: VeraCrypt User Guide
Group: Documentation/Other
Requires: %{name} = %{version}-%{release}
Suggests: xchm
BuildArch: noarch
%description doc
VeraCrypt user guide in CHM format.
%prep
%autosetup
sed -i '/^Exec/s|/usr/bin/||' src/Setup/Linux/%{name}.desktop
sed -i "s|doc/%{name}/HTML|doc/packages/%{name}/html|" src/Main/GraphicUserInterface.cpp
%build
pushd ./src
%make_build
popd
%install
install -Dm 0755 src/Main/%{name} %{buildroot}%{_bindir}/%{name}
install -Dm 0644 src/Setup/Linux/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
for i in 16 22 24 32 48 64 128 256 512 ; do
install -Dm 0644 src/Resources/Icons/VeraCrypt-$i\x$i.png %{buildroot}%{_datadir}/icons/hicolor/$i\x$i/apps/%{name}.png
done
install -Dm 0644 src/Resources/Icons/VeraCrypt.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -Dm 0644 src/Resources/Icons/VeraCrypt-symbolic.svg %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/%{name}-symbolic.svg
install -Dm 0644 Translations/Language.*.xml -t %{buildroot}%{_datadir}/%{name}/languages/
install -Dm 0644 src/Setup/Linux/%{name}.xml -t %{buildroot}%{_datadir}/mime/packages/
install -dm 0755 %{buildroot}%{_mandir}/man8
help2man --no-info --section=8 --output=%{buildroot}%{_mandir}/man8/%{name}.8 \
--name="is free open-source disk encryption software for Windows, Mac OS X and Linux" src/Main/%{name}
%fdupes -s doc/html/
%suse_update_desktop_file -r %{name} System Security
%files
%doc README.md doc/html
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}*.??g
%{_datadir}/mime/packages/%{name}.xml
%{_mandir}/man?/%{name}.?%{?ext_man}
%license License.txt
%files lang
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/languages/
%files doc
%doc "doc/chm/VeraCrypt User Guide.chm" doc/EFI-DCS/*.pdf
%changelog