From cc654a123b8b60877fca74308008ff2249a72a06 Mon Sep 17 00:00:00 2001 From: B Stack Date: Sun, 2 Sep 2018 08:43:30 -0400 Subject: add veracrypt --- veracrypt/credits.md | 2 + veracrypt/vc_desktop.patch | 15 +++++ veracrypt/vc_fedora.patch | 35 ++++++++++++ veracrypt/veracrypt.spec | 134 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 veracrypt/credits.md create mode 100644 veracrypt/vc_desktop.patch create mode 100644 veracrypt/vc_fedora.patch create mode 100644 veracrypt/veracrypt.spec diff --git a/veracrypt/credits.md b/veracrypt/credits.md new file mode 100644 index 0000000..cc48934 --- /dev/null +++ b/veracrypt/credits.md @@ -0,0 +1,2 @@ +* Provides variable for wxGTK[23] https://copr-be.cloud.fedoraproject.org/results/scx/veracrypt/fedora-27-x86_64/00657099-veracrypt/veracrypt.spec +* opensuse variant https://build.opensuse.org/package/view_file/home:pmdpalma:bucket/veracrypt/veracrypt.spec?expand=1 diff --git a/veracrypt/vc_desktop.patch b/veracrypt/vc_desktop.patch new file mode 100644 index 0000000..2ba9ccc --- /dev/null +++ b/veracrypt/vc_desktop.patch @@ -0,0 +1,15 @@ +diff -x '*.rej' -x '*.orig' -Naur VeraCrypt_1.22/src/Setup/Linux/veracrypt.desktop VeraCrypt_1.22-1/src/Setup/Linux/veracrypt.desktop +--- VeraCrypt_1.22/src/Setup/Linux/veracrypt.desktop 2018-03-30 07:54:10.000000000 -0400 ++++ VeraCrypt_1.22-1/src/Setup/Linux/veracrypt.desktop 2018-09-02 08:27:55.491897497 -0400 +@@ -2,9 +2,9 @@ + Encoding=UTF-8 + Name=VeraCrypt + GenericName=VeraCrypt +-Comment=VeraCrypt ++Comment=Disk encryption based on TrueCrypt + Exec=/usr/bin/veracrypt + Icon=veracrypt + Terminal=false + Type=Application +-Categories=Encryption;Encryption Tools;Utility; ++Categories=X-Encryption;X-Encryption-Tools;Utility; diff --git a/veracrypt/vc_fedora.patch b/veracrypt/vc_fedora.patch new file mode 100644 index 0000000..fc118d5 --- /dev/null +++ b/veracrypt/vc_fedora.patch @@ -0,0 +1,35 @@ +diff -x '*.rej' -x '*.orig' -Naur VeraCrypt_1.22/src/Common/Dlgcode.c VeraCrypt_1.22-1/src/Common/Dlgcode.c +--- VeraCrypt_1.22/src/Common/Dlgcode.c 2018-03-30 07:54:10.000000000 -0400 ++++ VeraCrypt_1.22-1/src/Common/Dlgcode.c 2018-09-02 08:22:00.007030589 -0400 +@@ -1280,7 +1280,7 @@ + L"This software as a whole:\r\n" + L"Copyright \xA9 2013-2018 IDRIX. All rights reserved.\r\n\r\n" + +- L"An IDRIX Release"); ++ L"A Fedora copr release"); + + return 1; + +diff -x '*.rej' -x '*.orig' -Naur VeraCrypt_1.22/src/Common/Tcdefs.h VeraCrypt_1.22-1/src/Common/Tcdefs.h +--- VeraCrypt_1.22/src/Common/Tcdefs.h 2018-03-30 07:54:10.000000000 -0400 ++++ VeraCrypt_1.22-1/src/Common/Tcdefs.h 2018-09-02 08:23:02.200707158 -0400 +@@ -383,7 +383,7 @@ + #define TC_MAX_PATH 260 /* Includes the null terminator */ + #endif + +-#define TC_STR_RELEASED_BY L"Released by IDRIX on " TC_STR_RELEASE_DATE ++#define TC_STR_RELEASED_BY L"Published for Fedora using IDRIX build " TC_STR_RELEASE_DATE + + #define MAX_URL_LENGTH 2084 /* Internet Explorer limit. Includes the terminating null character. */ + +diff -x '*.rej' -x '*.orig' -Naur VeraCrypt_1.22/src/Main/Forms/AboutDialog.cpp VeraCrypt_1.22-1/src/Main/Forms/AboutDialog.cpp +--- VeraCrypt_1.22/src/Main/Forms/AboutDialog.cpp 2018-03-30 07:54:10.000000000 -0400 ++++ VeraCrypt_1.22-1/src/Main/Forms/AboutDialog.cpp 2018-09-02 08:23:41.447134097 -0400 +@@ -72,6 +72,6 @@ + + L"This software uses wxWidgets library, which is copyright \xA9 1998-2011 Julian Smart, Robert Roebling et al.\n\n" + +- L"An IDRIX Release"); ++ L"A Fedora copr release"); + } + } diff --git a/veracrypt/veracrypt.spec b/veracrypt/veracrypt.spec new file mode 100644 index 0000000..7b6c2df --- /dev/null +++ b/veracrypt/veracrypt.spec @@ -0,0 +1,134 @@ +%global pname VeraCrypt +%global dummy_package 0 +%global tarballdir %{pname}_%{version} +%global srcdir %{tarballdir}/src +%global indocdir %{tarballdir}/doc +%define license_files src/License.txt +%define debug_package %{nil} + +Name: veracrypt +Version: 1.22 +Release: 1 +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 +Patch0: vc_fedora.patch +Patch1: vc_desktop.patch + +Packager: Bgstack15 +BuildRequires: gcc-c++ +BuildRequires: wxGTK3-devel +BuildRequires: fuse-devel +BuildRequires: desktop-file-utils +BuildRequires: ImageMagick +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. + +%prep +%setup -q -c + +%patch0 -p0 +%patch1 -p0 + +%build +#%make_build -C %{tarballdir}/src +pushd %{srcdir} +make %{_smp_mflags} +popd + +%install +#%make_install -C %{tarballdir}/src +%{__install} -d "%{buildroot}%{_bindir}" +%{__install} %{srcdir}/Main/veracrypt "%{buildroot}%{_bindir}" +%{__install} -d "%{buildroot}%{_docdir}/%{name}" +%{__install} -m 0644 %{srcdir}/License.txt "%{buildroot}%{_docdir}/%{name}" +%{__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 + +# 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/ +%{_bindir}/%{name} +#%{_docdir}/%{name} # handled by %doc above? +%{_datadir}/applications/*.desktop +%{_datadir}/pixmaps/* +%{_datadir}/icons/hicolor/*/apps/* + +%changelog +* Sat Sep 1 2018 B Stack 1.22-1 +- Initial rpm built. -- cgit