summaryrefslogtreecommitdiff
path: root/veracrypt
diff options
context:
space:
mode:
Diffstat (limited to 'veracrypt')
-rw-r--r--veracrypt/vc_include_sysmacros.patch11
-rw-r--r--veracrypt/veracrypt.spec140
2 files changed, 130 insertions, 21 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..43ea177 100644
--- a/veracrypt/veracrypt.spec
+++ b/veracrypt/veracrypt.spec
@@ -3,31 +3,106 @@
%global tarballdir %{pname}_%{version}
%global srcdir %{tarballdir}/src
%global indocdir %{tarballdir}/doc
-%define license_files src/License.txt
+%define license_files %{srcdir}/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
+
+%define doctarget %{_docdir}/%{name}
+%if 0%{?rhel}
+ %define doctarget %{_docdir}/%{name}-%{version}
+%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: util-linux
BuildRequires: yasm
-Requires: wxGTK3
+BuildRequires: ghostscript
+%if 0%{?fedora}
+BuildRequires: ghostscript-core
+%endif
%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,22 +112,42 @@ 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
-pushd %{srcdir}
-make %{_smp_mflags}
-popd
+%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
+
+%if !0%{?dummy_package}
+ pushd %{srcdir}
+ %{__make} WX_CONFIG="${WXCONFIG}" %{?_smp_mflags}
+ popd
+%endif
%install
#%make_install -C %{tarballdir}/src
%{__install} -d "%{buildroot}%{_bindir}"
+%if !0%{?dummy_package}
%{__install} %{srcdir}/Main/veracrypt "%{buildroot}%{_bindir}"
+%endif
%{__install} -d "%{buildroot}%{_docdir}/%{name}"
-%{__install} -m 0644 %{srcdir}/License.txt "%{buildroot}%{_docdir}/%{name}"
+%if !0%{?doc_license}
+%{__install} -m 0644 %{srcdir}/License.txt "%{buildroot}%{doctarget}"
+%endif
%{__install} -d "%{buildroot}%{_datadir}/applications" "%{buildroot}%{_datadir}/pixmaps"
%{__install} %{srcdir}/Setup/Linux/%{name}.desktop "%{buildroot}%{_datadir}/applications"
-%{__install} %{srcdir}/Resources/Icons/VeraCrypt-256x256.xpm "%{buildroot}%{_datadir}/pixmaps/veracrypt.xpm"
+%{__install} %{srcdir}/Resources/Icons/%{pname}-256x256.xpm "%{buildroot}%{_datadir}/pixmaps/%{name}.xpm"
# cleanup
@@ -64,16 +159,17 @@ test -f %{srcdir}/Setup/Linux/%{name}.desktop && \
# none
# man pages
-# handled by the %files %doc directive?
# not really man pages in this case, just html and text
-#for thisdir in $( find %{indocdir} -mindepth 1 -maxdepth 1 -printf '%f\n' ) ;
-#do
-# %{__install} -p -D -d %{indocdir}/${thisdir} %{buildroot}%{_defaultdocdir}/%{name}/${thisdir}
-#done
+if test -e "%{indocdir}/chm/VeraCrypt User Guide.chm" ;
+then
+ mv "%{indocdir}/chm/VeraCrypt User Guide.chm" "%{indocdir}/chm/VeraCrypt_User_Guide.chm" || :
+fi
+! test -d "%{buildroot}%{doctarget}" && %{__install} -d "%{buildroot}%{doctarget}" || :
+%{__install} -D -m 0644 %{indocdir}/chm/VeraCrypt_User_Guide.chm %{buildroot}%{doctarget}
# 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" || :
@@ -123,13 +219,15 @@ fi
%else
%doc %{license_files}
%endif
-%doc "%{indocdir}/chm/VeraCrypt User Guide.chm" %{indocdir}/EFI-DCS/ %{indocdir}/html/
+%doc %{indocdir}/chm/VeraCrypt_User_Guide.chm %{indocdir}/EFI-DCS/ %{indocdir}/html/
+%if !0%{?dummy_package}
%{_bindir}/%{name}
+%endif
#%{_docdir}/%{name} # handled by %doc above?
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/*
%{_datadir}/icons/hicolor/*/apps/*
%changelog
-* Sat Sep 1 2018 B Stack <bgstack15@gmail.com> 1.22-1
-- Initial rpm built.
+* Thu Sep 06 2018 B Stack <bgstack15@gmail.com> 1.22-4
+- rebuild rpm
bgstack15