%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 %global license_files src/License.txt %global version_nominal 1.24.4 %global version_file 1.24-Update4 %global version_file_lc %(echo %{version_file} | tr 'A-Z' 'a-z') Name: veracrypt Version: %{version_nominal} Release: 0%{?dist}.1sunshine Group: File tools #License: Microsoft Public License #License: Apache License 2.0 License: ASL 2.0 or TrueCrypt License Summary: Disk encryption software #URL: https://veracrypt.codeplex.com URL: https://www.veracrypt.fr/en/Home.html #Source0: https://github.com/veracrypt/VeraCrypt/archive/VeraCrypt-VeraCrypt_%%{version}.tar.gz Source0: https://launchpad.net/veracrypt/trunk/%{version_file_lc}/+download/VeraCrypt_%{version_file}_Source.tar.bz2 #Source0: https://launchpad.net/veracrypt/trunk/%%{version}/+download/VeraCrypt_%%{version}_Source.tar.bz2 Patch1: veracrypt-1.24-no-makeself.patch Patch2: veracrypt-1.0f-2-desktop.patch #BuildRequires: wxGTK3-devel %if "%{?wx_toolkit}" != "" BuildRequires: compat-wxGTK%{?wx_name_postfix}-%{wx_toolkit}-devel %else BuildRequires: wxGTK%{?wx_name_postfix}-devel %endif BuildRequires: gcc gcc-c++ BuildRequires: nasm BuildRequires: fuse-devel BuildRequires: ImageMagick BuildRequires: gzip BuildRequires: bzip2 BuildRequires: yasm %if 0%{?fedora} BuildRequires: ghostscript-core %else BuildRequires: ghostscript %endif %description Free disk encryption software based on TrueCrypt. %prep # for 1.19: #setup -qn "VeraCrypt-VeraCrypt_%{version}" # for 1.21+: %setup -q -c %patch1 -p1 %patch2 -p1 %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 pushd src export CXXFLAGS="%{optflags}" export TC_EXTRA_CXXFLAGS="$CXXFLAGS" export CFLAGS="%{optflags}" export TC_EXTRA_CFLAGS="$CFLAGS" export LFLAGS="%{build_ldflags}" make WX_CONFIG="${WXCONFIG}" NOSTRIP=1 %{?_smp_mflags} popd pushd src/Resources/Icons for s in {16,48,128,256} ; do convert "VeraCrypt-${s}x${s}.xpm" "VeraCrypt-${s}x${s}.png" done popd find "doc/chm" -xtype f \( -iname '*.pdf' -o -iname '*.chm' \) -print0 | while IFS= read -r -d $'\0' file ; do d="$( dirname "${file}" )" f="$( basename "${file}" )" g="$( sed -re 's/[[:blank:]]/_/g' <<< "${f}" )" if [[ "${f}" != "${g}" ]]; then mv "${file}" "${d}/${g}" fi done %install install -p -D -m 0644 "src/Setup/Linux/veracrypt.desktop" "%{buildroot}%{_datadir}/applications/%{name}.desktop" || : install -p -D -m 0755 "src/Main/veracrypt" "%{buildroot}%{_bindir}/%{name}" || : for s in {16,48,128,256} ; do install -p -D -m 0644 "src/Resources/Icons/VeraCrypt-${s}x${s}.png" "%{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png" done for e in {xpm,png} ; do install -p -D -m 0644 "src/Resources/Icons/VeraCrypt-256x256.${e}" "%{buildroot}%{_datadir}/pixmaps/%{name}.${e}" done %post /bin/touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null || : /usr/bin/update-mime-database "%{_datadir}/mime" &>/dev/null || : update-desktop-database &>/dev/null || : /sbin/ldconfig %postun if [[ "${1}" -eq "0" ]] ; then /bin/touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : /usr/bin/update-mime-database "%{_datadir}/mime" &>/dev/null || : fi update-desktop-database &>/dev/null || : /sbin/ldconfig %posttrans /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : /usr/bin/update-mime-database %{?update_mime_database_n:-n} %{_datadir}/mime &>/dev/null || : %files %{!?_licensedir:%global license %%doc} %license %{license_files} %doc README.md doc/chm/VeraCrypt_User_Guide.chm doc/EFI-DCS/ doc/html/ %{_bindir}/%{name} #%%{_datadir}/%%{name} %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/* %{_datadir}/icons/hicolor/*/apps/* %changelog * Fri Jan 24 2020 Moritz Barsnick 1.24.4-0.1sunshine - update to 1.24-Update4 * Tue Jan 7 2020 Moritz Barsnick 1.24.3-0.1sunshine - update to 1.24-Update3 - drop upstreamed patches - simplify ghostscript BR conditions - simplify %%license fallback * Tue Dec 3 2019 Moritz Barsnick 1.24.1-0.1sunshine - update to 1.24-Hotfix1 * Tue Oct 8 2019 Moritz Barsnick 1.24-0.1sunshine - update to 1.24 - don't suppress debug package during build, and ensure binaries are not stripped - rebase the no-makeself patch - pass standard build flags to make - drop outdated use of %%{__make} vs. make - drop some file existence checks, to make sure the installs really happen * Tue Sep 25 2018 Moritz Barsnick 1.23-0.1sunshine - update to 1.23 - drop patches from 1.22-0.3sunshine which were upstreamed * Tue Jul 17 2018 Moritz Barsnick 1.22-0.3sunshine - add BR: gcc gcc-c++ - use major/minor patch from upstream instead of self-crafted version - add a crash patch from upstream * Mon Jul 09 2018 Moritz Barsnick 1.22-0.2sunshine - add a patch for modern glibc's (>= 2.26) moval of major/minor definitions * Mon Jul 09 2018 Moritz Barsnick 1.22-0.1sunshine - update to 1.22 - drop the dumpfullversion patch, it's upstream - drop the dumpfullversion hacks * Thu Nov 02 2017 Tomasz Tomasik - 1.21-3 - Add additional macros for wxGTK - Add post, postun and posttrans sections - Rebuild for EL7 * Tue Oct 24 2017 Tomasz Tomasik - 1.21-2 - Fix for Fedora < 26 - Rebuild for EL7 * Tue Oct 24 2017 Tomasz Tomasik - 1.21-1 - Update to version 1.21 - Update License and URL - Change source - Backport patch from GitHub: https://github.com/veracrypt/VeraCrypt/issues/198 - Rewrite prep, build and install sections - Use doc and license macro - Rebuild for EL7 * Mon Oct 23 2017 Tomasz Tomasik - 1.19-5 - Update changelog - Rebuild for EL7 * Mon Apr 24 2017 Tomasz Tomasik - 1.19-4 - Update requirements - Rewrite build and install sections - Rebuilt for EL7 * Thu Nov 17 2016 Huaren Zhong - 1.19 - Rebuild for Fedora * Tue Oct 18 2016 Denis Silakov - 1.19-1 - (9623fad) Merge pull request #4 from tremod/veracrypt:rosa2016.1 - (9623fad) Update to 1.19 * Sun Oct 18 2015 Denis Silakov - 1.16-1 - (eac346d) Updated to 1.16