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: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: icns-utils
BuildRequires: makeself
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-devel
BuildRequires: yasm
BuildRequires: pkgconfig(fuse)
BuildRequires: pkgconfig(libpcsclite)
Requires: device-mapper
Requires: fuse
%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.
%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 "s/\(Exec=\).*/\1%{name}/" 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 32 48 128; do
icns2png -x -s $i\x$i -d 32 src/Resources/Icons/VeraCrypt.icns
install -Dm 0644 VeraCrypt_$i\x$i\x32.png %{buildroot}%{_datadir}/icons/hicolor/$i\x$i/apps/%{name}.png
done
%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
%license License.txt
%files doc
%doc "doc/chm/VeraCrypt User Guide.chm" doc/EFI-DCS/*.pdf
%changelog