summaryrefslogtreecommitdiff
path: root/veracrypt
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-09-05 22:25:58 -0400
committerB Stack <bgstack15@gmail.com>2018-09-05 22:25:58 -0400
commit8b61a22f9a388244cfdece5a2816780520aec7f3 (patch)
tree9c4e8160a98f192b304ee13c85bc248bd2d6b3a9 /veracrypt
parentinclude sysmacros patch (diff)
downloadstackrpms-8b61a22f9a388244cfdece5a2816780520aec7f3.tar.gz
stackrpms-8b61a22f9a388244cfdece5a2816780520aec7f3.tar.bz2
stackrpms-8b61a22f9a388244cfdece5a2816780520aec7f3.zip
apply cross-elfc improvements to veracrypt
Diffstat (limited to 'veracrypt')
-rw-r--r--veracrypt/vc_include_sysmacros.patch11
-rw-r--r--veracrypt/veracrypt.spec110
2 files changed, 111 insertions, 10 deletions
diff --git a/veracrypt/vc_include_sysmacros.patch b/veracrypt/vc_include_sysmacros.patch
new file mode 100644
index 0000000..9381b40
--- /dev/null
+++ b/veracrypt/vc_include_sysmacros.patch
@@ -0,0 +1,11 @@
+diff -x '*.orig' -x '*.rej' -Naur VeraCrypt_1.22/src/Platform/Unix/FilesystemPath.cpp VeraCrypt_1.22-1/src/Platform/Unix/FilesystemPath.cpp
+--- VeraCrypt_1.22/src/Platform/Unix/FilesystemPath.cpp 2018-03-30 07:54:10.000000000 -0400
++++ VeraCrypt_1.22-1/src/Platform/Unix/FilesystemPath.cpp 2018-09-05 21:20:12.897225387 -0400
+@@ -15,6 +15,7 @@
+ #include "Platform/StringConverter.h"
+ #include <stdio.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+
+ namespace VeraCrypt
+ {
diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec
index e59f1c2..3612a71 100644
--- a/veracrypt/veracrypt.spec
+++ b/veracrypt/veracrypt.spec
@@ -6,28 +6,104 @@
%define license_files src/License.txt
%define debug_package %{nil}
+# lifted from https://copr-be.cloud.fedoraproject.org/results/scx/veracrypt/fedora-27-x86_64/00657099-veracrypt/veracrypt.spec
+%define wx_version_major 3
+%define wx_version_minor 0
+%define wx_version %{wx_version_major}.%{wx_version_minor}
+
+%define force_wx_gtk2 %{nil}
+%define force_wx_gtk2 0
+
+%define wx_name_postfix %{nil}
+%if 0%{?wx_version_major} >= 3
+ %if 0%{?wx_version_minor} == 0
+ %define wx_name_postfix %{wx_version_major}
+ %else
+ %define wx_name_postfix %{wx_version_major}%{wx_version_minor}
+ %endif
+%endif
+
+# Force toolkit
+# e.g. gtk2 instead of gtk3
+%define wx_toolkit %{nil}
+%if 0%{?force_wx_gtk2}
+ %if 0%{?wx_version_major} >= 3
+ %if 0%{?wx_version_minor} == 0
+ %define wx_toolkit gtk2
+ %endif
+ %endif
+%endif
+
+%undefine update_mime_database_n
+%if 0%{?fedora}%{?rhel}
+ %define update_mime_database_n 1
+%endif
+
+%define doc_license %{nil}
+%define doc_license 1
+%if 0%{?rhel}%{?fedora}
+ %if 0%{?rhel}
+ %if 0%{?rhel} < 7
+ %define doc_license 0
+ %endif
+ %else
+ %if 0%{?fedora} < 19
+ %define doc_license 0
+ %endif
+ %endif
+%endif
+
+%define enable_dumpfullversion %{nil}
+%define enable_dumpfullversion 0
+%if 0%{?rhel}%{?fedora}
+ %if 0%{?rhel}
+ %if 0%{?rhel} > 7
+ %define enable_dumpfullversion 1
+ %endif
+ %else
+ %if 0%{?fedora} > 25
+ %define enable_dumpfullversion 1
+ %endif
+ %endif
+%endif
+
Name: veracrypt
Version: 1.22
-Release: 1
+Release: 4
Summary: Disk encryption with strong security based on TrueCrypt
Group: Applications/File
License: Apache License 2.0 and TrueCrypt License 3.0
URL: https://www.veracrypt.fr/
Source0: https://www.veracrypt.fr/code/%{pname}/snapshot/%{pname}_%{version}.tar.gz
-# in case upstream ever malfunctions here is my mirror
-#Source0: https://gitlab.com/bgstack15/big-sources/raw/master/%{name}/%{pname}_%{version}.tar.gz
+#Source0: https://gitlab.com/bgstack15/big-sources/raw/master/%%{name}/%%{pname}_%%{version}.tar.gz
+#Source0: https://launchpad.net/veracrypt/trunk/%%{version}/+download/VeraCrypt_%%{version}_Source.tar.bz2
Patch0: vc_fedora.patch
Patch1: vc_desktop.patch
+Patch2: vc_include_sysmacros.patch
Packager: Bgstack15 <bgstack15@gmail.com>
+%if "%{?wx_toolkit}" != ""
+BuildRequires: compat-wxGTK%{?wx_name_postfix}-%{wx_toolkit}-devel
+%else
+BuildRequires: wxGTK%{?wx_name_postfix}-devel
+%endif
BuildRequires: gcc-c++
-BuildRequires: wxGTK3-devel
BuildRequires: fuse-devel
BuildRequires: desktop-file-utils
BuildRequires: ImageMagick
BuildRequires: yasm
-Requires: wxGTK3
+%if 0%{?rhel}%{?fedora}
+%if 0%{?rhel}
+BuildRequires: ghostscript
+%else
+BuildRequires: ghostscript-core
+%endif
+%else
+BuildRequires: ghostscript
+%endif
+# WORKHERE: experiment with not requiring this, explicitly
+#Requires: wxGTK3
%description
VeraCrypt is a free open source disk encryption software for Windows, Mac OSX and Linux. Brought to you by IDRIX (https://www.idrix.fr) and based on TrueCrypt 7.1a.
@@ -37,11 +113,25 @@ VeraCrypt is a free open source disk encryption software for Windows, Mac OSX an
%patch0 -p0
%patch1 -p0
+%patch2 -p0
%build
-#%make_build -C %{tarballdir}/src
+%if 0%{wx_version_major} < 3
+WXCONFIG="wx-config"
+%else
+WXCONFIG="wx-config-%{wx_version}"
+%endif
+export WXCONFIG
+
+%if "%{?wx_toolkit}" != ""
+if hash "${WXCONFIG}-%{?wx_toolkit}" >/dev/null 2>&1 ; then
+ WXCONFIG="${WXCONFIG}-%{?wx_toolkit}"
+ export WXCONFIG
+fi
+%endif
+
pushd %{srcdir}
-make %{_smp_mflags}
+%{__make} WX_CONFIG="${WXCONFIG}" %{?_smp_mflags}
popd
%install
@@ -73,7 +163,7 @@ test -f %{srcdir}/Setup/Linux/%{name}.desktop && \
# icons
pushd %{srcdir}/Resources/Icons
-for s in {16,48,128,256} ;
+for s in 16 48 128 256 ;
do
convert "%{pname}-${s}x${s}.xpm" "%{pname}-${s}x${s}.png" && \
%{__install} -p -D -m 0644 "%{pname}-${s}x${s}.png" "%{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png" || :
@@ -131,5 +221,5 @@ fi
%{_datadir}/icons/hicolor/*/apps/*
%changelog
-* Sat Sep 1 2018 B Stack <bgstack15@gmail.com> 1.22-1
-- Initial rpm built.
+* Wed Sep 05 2018 B Stack <bgstack15@gmail.com> 1.22-4
+- rebuild rpm
bgstack15