summaryrefslogtreecommitdiff
path: root/freefilesync
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2018-08-29 23:01:46 -0400
committerB Stack <bgstack15@gmail.com>2018-08-29 23:01:46 -0400
commitc58ae6782fe347dc206adcb5450d4ce57cd528ea (patch)
treeb9b8246b853abf1ef3334ef539554fa83de89e2a /freefilesync
parentinitial commit (diff)
downloadstackrpms-c58ae6782fe347dc206adcb5450d4ce57cd528ea.tar.gz
stackrpms-c58ae6782fe347dc206adcb5450d4ce57cd528ea.tar.bz2
stackrpms-c58ae6782fe347dc206adcb5450d4ce57cd528ea.zip
add freefilesync
Diffstat (limited to 'freefilesync')
-rw-r--r--freefilesync/FreeFileSync.desktop12
-rw-r--r--freefilesync/RealTimeSync.desktop12
-rw-r--r--freefilesync/credits.md4
-rw-r--r--freefilesync/ffs_fedora.patch12
-rw-r--r--freefilesync/ffs_include_lz.patch24
-rw-r--r--freefilesync/ffs_no_check_updates.patch57
-rw-r--r--freefilesync/ffs_no_wx311.patch27
-rw-r--r--freefilesync/freefilesync.spec136
8 files changed, 284 insertions, 0 deletions
diff --git a/freefilesync/FreeFileSync.desktop b/freefilesync/FreeFileSync.desktop
new file mode 100644
index 0000000..534dd79
--- /dev/null
+++ b/freefilesync/FreeFileSync.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=FreeFileSync
+GenericName=File synchronization
+GenericName[pt_BR]=Sincronização de arquivos
+Comment=Backup software to synchronize files and folders
+Comment[pt_BR]=Aplicação de backup para sincronizar arquivos e diretórios
+Exec=FreeFileSync
+Icon=freefilesync
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=GTK;Utility;
diff --git a/freefilesync/RealTimeSync.desktop b/freefilesync/RealTimeSync.desktop
new file mode 100644
index 0000000..dc1cfdf
--- /dev/null
+++ b/freefilesync/RealTimeSync.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=RealTimeSync
+GenericName=Automated Synchronization
+GenericName[pt_BR]=Sincronização Automatizada
+Comment=Real time synchronization
+Comment[pt_BR]=Sincronização em tempo real
+Exec=RealTimeSync
+Icon=RealTimeSync
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=GTK;Utility;
diff --git a/freefilesync/credits.md b/freefilesync/credits.md
new file mode 100644
index 0000000..8a92965
--- /dev/null
+++ b/freefilesync/credits.md
@@ -0,0 +1,4 @@
+This package, freefilesync, is made possible by the concerted efforts of many people and groups
+* Zenju, author of the upstream project [FreeFileSync](http://freefilesync.org)
+* [PhantomX](https://github.com/PhantomX/)/chinforpms [freefilesync spec](https://github.com/PhantomX/chinforpms/tree/master/freefilesync)
+* My [original freefilesync spec](https://gitlab.com/bgstack15/freefilesync-rpm/)
diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch
new file mode 100644
index 0000000..9a62974
--- /dev/null
+++ b/freefilesync/ffs_fedora.patch
@@ -0,0 +1,12 @@
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp
+--- 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-07 05:03:34.000000000 -0400
++++ 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-29 22:13:40.240595334 -0400
+@@ -106,6 +106,8 @@
+ L" x64";
+ #endif
+
++ build +=
++ L" for Fedora";
+
+ GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
+
diff --git a/freefilesync/ffs_include_lz.patch b/freefilesync/ffs_include_lz.patch
new file mode 100644
index 0000000..d647fd7
--- /dev/null
+++ b/freefilesync/ffs_include_lz.patch
@@ -0,0 +1,24 @@
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/Makefile 10.3-2/FreeFileSync/Source/Makefile
+--- 10.3-0/FreeFileSync/Source/Makefile 2018-08-07 05:03:33.000000000 -0400
++++ 10.3-2/FreeFileSync/Source/Makefile 2018-08-15 22:25:06.694355202 -0400
+@@ -9,7 +9,7 @@
+ -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
+ -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
+
+-LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread
++LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread
+
+ #Gtk - support recycler/icon loading/no button border/grid scrolling
+ CXXFLAGS += `pkg-config --cflags gtk+-2.0`
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/RealTimeSync/Makefile 10.3-2/FreeFileSync/Source/RealTimeSync/Makefile
+--- 10.3-0/FreeFileSync/Source/RealTimeSync/Makefile 2018-08-07 05:03:33.000000000 -0400
++++ 10.3-2/FreeFileSync/Source/RealTimeSync/Makefile 2018-08-15 22:25:15.968461418 -0400
+@@ -6,7 +6,7 @@
+ -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
+ -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
+
+-LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread
++LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -lz -pthread
+
+ #Gtk - support "no button border"
+ CXXFLAGS += `pkg-config --cflags gtk+-2.0`
diff --git a/freefilesync/ffs_no_check_updates.patch b/freefilesync/ffs_no_check_updates.patch
new file mode 100644
index 0000000..99f0c8f
--- /dev/null
+++ b/freefilesync/ffs_no_check_updates.patch
@@ -0,0 +1,57 @@
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/ui/main_dlg.cpp 10.3-2/FreeFileSync/Source/ui/main_dlg.cpp
+--- 10.3-0/FreeFileSync/Source/ui/main_dlg.cpp 2018-08-07 05:03:34.000000000 -0400
++++ 10.3-2/FreeFileSync/Source/ui/main_dlg.cpp 2018-08-08 18:50:50.455078387 -0400
+@@ -5004,7 +5004,7 @@
+ globalCfg_.gui.lastUpdateCheck = 0; //reset to GlobalSettings.xml default value!
+
+ m_menuItemCheckVersionAuto->Check(updateCheckActive(globalCfg_.gui.lastUpdateCheck));
+-
++ /*
+ if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck))
+ {
+ flashStatusInformation(_("Searching for program updates..."));
+@@ -5012,6 +5012,7 @@
+ automaticUpdateCheckEval(this, globalCfg_.gui.lastUpdateCheck, globalCfg_.gui.lastOnlineVersion,
+ automaticUpdateCheckRunAsync(automaticUpdateCheckPrepare().get()).get());
+ }
++ */
+ }
+
+
+@@ -5019,7 +5020,7 @@
+ {
+ //execute just once per startup!
+ Disconnect(wxEVT_IDLE, wxIdleEventHandler(MainDialog::OnRegularUpdateCheck), nullptr, this);
+-
++ /*
+ if (shouldRunAutomaticUpdateCheck(globalCfg_.gui.lastUpdateCheck))
+ {
+ flashStatusInformation(_("Searching for program updates..."));
+@@ -5033,6 +5034,7 @@
+ resultAsync.get()); //run on main thread:
+ });
+ }
++ */
+ }
+
+
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/ui/version_check_impl.h 10.3-2/FreeFileSync/Source/ui/version_check_impl.h
+--- 10.3-0/FreeFileSync/Source/ui/version_check_impl.h 2018-08-07 05:03:34.000000000 -0400
++++ 10.3-2/FreeFileSync/Source/ui/version_check_impl.h 2018-08-08 18:50:50.458078415 -0400
+@@ -14,7 +14,7 @@
+
+ namespace fff
+ {
+-inline
++
+ time_t getVersionCheckInactiveId()
+ {
+ //use current version to calculate a changing number for the inactive state near UTC begin, in order to always check for updates after installing a new version
+@@ -38,7 +38,6 @@
+ }
+
+
+-inline
+ time_t getVersionCheckCurrentTime()
+ {
+ return std::time(nullptr);
diff --git a/freefilesync/ffs_no_wx311.patch b/freefilesync/ffs_no_wx311.patch
new file mode 100644
index 0000000..04df827
--- /dev/null
+++ b/freefilesync/ffs_no_wx311.patch
@@ -0,0 +1,27 @@
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp
+--- 10.3-0/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-07 05:03:34.000000000 -0400
++++ 10.3-2/FreeFileSync/Source/ui/small_dlgs.cpp 2018-08-08 19:16:54.026727623 -0400
+@@ -984,7 +984,8 @@
+ //setMainInstructionFont(*m_staticTextMain);
+
+ m_bitmapActivation->SetBitmap(getResourceImage(L"website"));
+- m_textCtrlOfflineActivationKey->ForceUpper();
++ // Fedora 27 does not have wxWidgets 3.1.1 yet. https://github.com/wxWidgets/wxWidgets/commit/69b66e9e2e2b8e49e3816acdde079686ce9b0da1
++ //m_textCtrlOfflineActivationKey->ForceUpper();
+
+ m_textCtrlLastError ->ChangeValue(lastErrorMsg);
+ m_textCtrlManualActivationUrl ->ChangeValue(manualActivationUrl);
+diff -Naur -x '*.orig' -x '*.rej' 10.3-0/wx+/grid.cpp 10.3-2/wx+/grid.cpp
+--- 10.3-0/wx+/grid.cpp 2018-08-07 05:03:34.000000000 -0400
++++ 10.3-2/wx+/grid.cpp 2018-08-08 19:24:56.849445102 -0400
+@@ -1176,7 +1176,9 @@
+ {
+ if (overlapPix != 0)
+ {
+- const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec]
++ // Fedora 28 does not have wxGTK 3.1.1 yet. This probably breaks HiDPI usage
++ //const double scrollSpeed = wnd_.ToDIP(overlapPix) * mouseDragSpeedIncScrollU; //unit: [scroll units / sec]
++ const double scrollSpeed = overlapPix * mouseDragSpeedIncScrollU; //unit: [scroll units / sec]
+ toScroll += scrollSpeed * deltaSecs;
+ }
+ else
diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec
new file mode 100644
index 0000000..dad3c74
--- /dev/null
+++ b/freefilesync/freefilesync.spec
@@ -0,0 +1,136 @@
+%global pkgname FreeFileSync
+%global prog2name RealTimeSync
+%global dummy_package 0
+Name: freefilesync
+Version: 10.3
+Release: 3%{?dist}
+Summary: A file synchronization utility
+
+Group: Applications/File
+License: GPLv3
+URL: http://www.freefilesync.org/
+Source0: http://www.freefilesync.org/download/%{pkgname}_%{version}_Source.zip
+Source1: %{pkgname}.desktop
+Source2: %{prog2name}.desktop
+Patch0: ffs_include_lz.patch
+Patch1: ffs_no_check_updates.patch
+Patch2: ffs_no_wx311.patch
+Patch3: ffs_fedora.patch
+
+Packager: B Stack <bgstack15@gmail.com>
+BuildRequires: boost-devel
+BuildRequires: compat-wxGTK3-gtk2-devel
+BuildRequires: gcc-c++
+BuildRequires: desktop-file-utils
+BuildRequires: ImageMagick
+BuildRequires: pkgconfig(gtk+-2.0)
+BuildRequires: pkgconfig(libselinux)
+BuildRequires: pkgconfig(zlib)
+Requires: hicolor-icon-theme
+
+%description
+FreeFileSync is a free Open Source software that helps you synchronize
+files and synchronize folders for Windows, Linux and macOS. It is
+designed to save your time setting up and running backup jobs while
+having nice visual feedback along the way.
+
+%prep
+%setup -c -n %{pkgname}-%{version}
+
+# fix text file line endings and permissions to unix
+find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \
+ -exec %{__sed} -i -r -e 's/\r$//' {} +
+
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+# custom build parameters for packaging application in rpm
+%{__sed} \
+ -e 's|-O3 -DNDEBUG|-DNDEBUG -D"warn_static(arg)= " -DZEN_LINUX %{build_cxxflags}|g' \
+ -e '/LINKFLAGS/s|-s|%{__global_ldflags}|g' \
+ -i %{pkgname}/Source/Makefile %{pkgname}/Source/%{prog2name}/Makefile
+
+%build
+%if !%{dummy_package}
+%make_build -C %{pkgname}/Source
+%make_build -C %{pkgname}/Source/%{prog2name}
+%endif
+
+%install
+%if !%{dummy_package}
+%make_install -C %{pkgname}/Source
+%make_install -C %{pkgname}/Source/%{prog2name}
+%endif
+
+# WORKHERE not sure why this is needed especially if we did it in the %prep
+find %{buildroot}%{_datadir}/%{pkgname} -type f -exec chmod -x '{}' \; || :
+
+# desktop files
+mkdir -p %{buildroot}%{_datadir}/applications
+desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE1}
+desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE2}
+
+# application start script
+# none
+
+# man pages
+# none
+
+# mimetypes
+# none
+
+# icons
+unzip %{pkgname}/Build/Resources.zip %{pkgname}.png %{prog2name}.png
+
+for res in 16 22 24 32 48 64 96 128 256 ;do
+ dir=%{buildroot}%{_datadir}/icons/hicolor/${res}x${res}/apps
+ mkdir -p ${dir}
+ for icon in %{pkgname} %{prog2name} ;do
+ convert ${icon}.png -filter Lanczos -resize ${res}x${res} \
+ ${dir}/${icon}.png
+ done
+done
+
+%clean
+%{__rm} -rf %{buildroot} || :
+
+%post
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+update-desktop-database &> /dev/null || :
+
+%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 || :
+fi
+
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%files
+%license %attr(444, -, -) License.txt
+%doc %attr(444, -, -) Changelog.txt
+%{_bindir}/%{pkgname}
+%{_bindir}/%{prog2name}
+%{_datadir}/applications/*.desktop
+%{_datadir}/icons/hicolor/*x*/apps/*.png
+%{_datadir}/%{pkgname}
+%{_defaultdocdir}/%{pkgname}
+%ghost %config %attr(666, -, -) %{_datadir}/%{pkgname}/GlobalSettings.xml
+
+%changelog
+* Wed Aug 29 2018 B Stack <bgstack15@gmail.com> - 10.3-3
+- forked from phantomx release
+
+* Fri Aug 17 2018 Phantom X <megaphantomx at bol dot com dot br> - 10.3-1
+- 10.3
bgstack15