%global pname VeraCrypt %global dummy_package 0 %global tarballdir %{pname}_%{version} %global srcdir %{tarballdir}/src %global indocdir %{tarballdir}/doc %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 Name: veracrypt Version: 1.22 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 #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 %if "%{?wx_toolkit}" != "" BuildRequires: compat-wxGTK%{?wx_name_postfix}-%{wx_toolkit}-devel %else BuildRequires: wxGTK%{?wx_name_postfix}-devel %endif BuildRequires: gcc-c++ BuildRequires: fuse-devel BuildRequires: desktop-file-utils BuildRequires: ImageMagick # need rename BuildRequires: util-linux BuildRequires: yasm %if 0%{?rhel}%{?fedora} %if 0%{?rhel} BuildRequires: ghostscript %else BuildRequires: ghostscript-core %endif %else BuildRequires: ghostscript %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. %prep %setup -q -c %patch0 -p0 %patch1 -p0 %patch2 -p0 %build %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}" %if !0%{?doc_license} %{__install} -m 0644 %{srcdir}/License.txt "%{buildroot}%{_docdir}/%{name}" %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" # cleanup # desktop files test -f %{srcdir}/Setup/Linux/%{name}.desktop && \ %{__install} -p -D -m 0644 "%{srcdir}/Setup/Linux/%{name}.desktop" "%{buildroot}%{_datadir}/applications/%{name}.desktop" || : # application start script # 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 %{__install} -m 0644 -t %{buildroot}%{_docdir}/%{name} %{indocdir}/chm/VeraCrypt_User_Guide.chm # icons pushd %{srcdir}/Resources/Icons 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" || : done popd for e in {xpm,png} ; do test -f "%{srcdir}/Resources/Icons/%{pname}-256x256.${e}" || continue %{__install} -p -D -m 0644 "%{srcdir}/Resources/Icons/%{pname}-256x256.${e}" "%{buildroot}%{_datadir}/pixmaps/%{name}.${e}" done : %clean rm -rf %{buildroot} || : %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database "%{_datadir}/mime" &>/dev/null || : update-desktop-database &> /dev/null || : /sbin/ldconfig || : %preun # is it a final removal? #if test "$1" = "0" ; #then #fi %postun update-desktop-database &> /dev/null || : if test "$1" = "0" ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database "%{_datadir}/mime" &>/dev/null || : fi /sbin/ldconfig || : %posttrans /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : /usr/bin/update-mime-database "%{_datadir}/mime" &>/dev/null || : %files %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %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 * Thu Sep 06 2018 B Stack 1.22-4 - rebuild rpm