summaryrefslogtreecommitdiff
path: root/freefilesync
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-02-19 14:57:13 +0000
committerB Stack <bgstack15@gmail.com>2019-02-19 14:57:13 +0000
commitd40d95ecb66387e4c9c0c2a2020eccf5fb46ef14 (patch)
treeb462c777984dcd461c2d230e703fcf3db1fe03ba /freefilesync
parentFreeFileSync 10.9 rpm and dpkg (diff)
parentFreeFileSync 10.9-2 for CentOS 7 and Fedora 28-30 (diff)
downloadstackrpms-d40d95ecb66387e4c9c0c2a2020eccf5fb46ef14.tar.gz
stackrpms-d40d95ecb66387e4c9c0c2a2020eccf5fb46ef14.tar.bz2
stackrpms-d40d95ecb66387e4c9c0c2a2020eccf5fb46ef14.zip
Merge branch 'freefilesync-c7' into 'master'
FreeFileSync 10.9-2 for CentOS7 and Fedora 28-30 This is the successful release candidate for FreeFileSync on CentOS7 and Fedora 28-30 from the same spec file. On CentOS 7, the package build and install dependencies include libcurl 7.64.0, libssh2 1.8.0, openssl 1.1.0 (openssl-freefilesync), which are available in the [bgstack15/FreeFileSync](https://copr.fedorainfracloud.org/coprs/bgstack15/FreeFileSync) copr. See merge request bgstack15/stackrpms!38
Diffstat (limited to 'freefilesync')
-rw-r--r--freefilesync/.gitignore1
-rw-r--r--freefilesync/README-freefilesync.md25
-rw-r--r--freefilesync/credits.md4
-rw-r--r--freefilesync/ffs_el.patch107
-rw-r--r--freefilesync/ffs_fedora.patch45
-rw-r--r--freefilesync/ffs_makefile.patch32
-rw-r--r--freefilesync/ffs_old_libcurl.patch13
-rw-r--r--freefilesync/ffs_sftp.patch2
-rw-r--r--freefilesync/freefilesync.spec62
9 files changed, 227 insertions, 64 deletions
diff --git a/freefilesync/.gitignore b/freefilesync/.gitignore
new file mode 100644
index 0000000..10d00b5
--- /dev/null
+++ b/freefilesync/.gitignore
@@ -0,0 +1 @@
+*.gz
diff --git a/freefilesync/README-freefilesync.md b/freefilesync/README-freefilesync.md
new file mode 100644
index 0000000..02d0505
--- /dev/null
+++ b/freefilesync/README-freefilesync.md
@@ -0,0 +1,25 @@
+# Summary for CentOS 7 compilation of freefilesync
+
+### Dependencies to build FreeFileSync on CentOS 7
+All of the packages in the next section, and also
+* devtoolset-7 [Software Collections (SCL)][3]
+* custom patches provided in this repo.
+
+### Sources of the bgstack15/FreeFileSync copr packages
+Custom packages:
+* openssl: [bgstack15][1]
+* libssh2: [city-fan][2]
+* curl: city-fan
+* libmetalink: city-fan
+* libpsl: city-fan
+
+# Credits
+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/)
+
+# References
+[1][https://bgstack15.wordpress.com]
+[2][http://www.city-fan.org/ftp/contrib/yum-repo/]
+[3][https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/]
diff --git a/freefilesync/credits.md b/freefilesync/credits.md
deleted file mode 100644
index 8a92965..0000000
--- a/freefilesync/credits.md
+++ /dev/null
@@ -1,4 +0,0 @@
-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_el.patch b/freefilesync/ffs_el.patch
new file mode 100644
index 0000000..0763296
--- /dev/null
+++ b/freefilesync/ffs_el.patch
@@ -0,0 +1,107 @@
+The cstddef discovery is from https://stackoverflow.com/questions/52567517/freefilesync-c-error-byte-is-not-a-member-of-std
+Some changes just make the application work better in an installed setting (e.g., the hard-coded resouce path).
+Tricking the wxWidgets ABI version comes from https://stackoverflow.com/questions/45123664/wxwidgets-runtime-error-mismatch-version/47822976#47822976
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/FreeFileSync/Source/base/ffs_paths.cpp 10.9-1.el7/FreeFileSync/Source/base/ffs_paths.cpp
+--- 10.9-0/FreeFileSync/Source/base/ffs_paths.cpp 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1.el7/FreeFileSync/Source/base/ffs_paths.cpp 2019-02-17 10:43:22.286986341 -0500
+@@ -59,7 +59,7 @@
+ ZEN_ON_SCOPE_EXIT(wxTheApp->SetAppName(appName));
+
+ //if (isPortableVersion())
+- return appendSeparator(getExeFolderParentPath());
++ return appendSeparator("/usr") + appendSeparator("share") + appendSeparator("freefilesync");
+ //else //use OS' standard paths
+ // return appendSeparator(utfTo<Zstring>(wxStandardPathsBase::Get().GetResourcesDir()));
+ }
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/FreeFileSync/Source/Makefile 10.9-1.el7/FreeFileSync/Source/Makefile
+--- 10.9-0/FreeFileSync/Source/Makefile 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1.el7/FreeFileSync/Source/Makefile 2019-02-17 10:50:27.282820639 -0500
+@@ -1,10 +1,10 @@
+-EXENAME = FreeFileSync_$(shell arch)
++EXENAME = FreeFileSync
+
+ CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
+ -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
+- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
++ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread
+
+-LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread
++LINKFLAGS = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -no-pie `wx-config --version=3.0 --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread
+
+
+ CXXFLAGS += `pkg-config --cflags openssl`
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/FreeFileSync/Source/RealTimeSync/Makefile 10.9-1.el7/FreeFileSync/Source/RealTimeSync/Makefile
+--- 10.9-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1.el7/FreeFileSync/Source/RealTimeSync/Makefile 2019-02-17 10:50:43.699007372 -0500
+@@ -1,10 +1,10 @@
+-EXENAME = RealTimeSync_$(shell arch)
++EXENAME = RealTimeSync
+
+ CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
+ -Wall -Wfatal-errors -Wmissing-include-dirs -Wswitch-enum -Wcast-align -Wshadow -Wnon-virtual-dtor \
+- -O3 -DNDEBUG `wx-config --cxxflags --debug=no` -pthread
++ -O3 -DNDEBUG -fPIC `wx-config --version=3.0 --cxxflags --debug=no` -pthread
+
+-LINKFLAGS = -s -no-pie `wx-config --libs std, aui --debug=no` -pthread
++LINKFLAGS = -s -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -no-pie `wx-config --version=3.0 --cxxflags --libs std, aui --debug=no | sed -r -e 's/-[^[:space:]]+web[^[:space:]]+//;'` -lz -pthread
+
+ #Gtk - support "no button border"
+ CXXFLAGS += `pkg-config --cflags gtk+-2.0`
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/FreeFileSync/Source/ui/small_dlgs.cpp 10.9-1.el7/FreeFileSync/Source/ui/small_dlgs.cpp
+--- 10.9-0/FreeFileSync/Source/ui/small_dlgs.cpp 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1.el7/FreeFileSync/Source/ui/small_dlgs.cpp 2019-02-17 10:42:29.741388638 -0500
+@@ -115,6 +115,8 @@
+ L" x64";
+ #endif
+
++ build +=
++ L" for CentOS 7";
+
+ GetSizer()->SetSizeHints(this); //~=Fit() + SetMinSize()
+
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/zen/ring_buffer.h 10.9-1.el7/zen/ring_buffer.h
+--- 10.9-0/zen/ring_buffer.h 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1.el7/zen/ring_buffer.h 2019-02-17 09:53:10.907818287 -0500
+@@ -9,6 +9,7 @@
+
+ #include <cassert>
+ #include "scope_guard.h"
++#include <cstddef>
+
+
+ namespace zen
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/zen/serialize.h 10.9-1.el7/zen/serialize.h
+--- 10.9-0/zen/serialize.h 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1.el7/zen/serialize.h 2019-02-17 09:53:06.701772057 -0500
+@@ -9,6 +9,7 @@
+
+ #include <functional>
+ #include <cstdint>
++#include <cstddef>
+ #include "string_base.h"
+ //keep header clean from specific stream implementations! (e.g.file_io.h)! used by abstract.h!
+
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/wx+/app_main.h 10.9-1/wx+/app_main.h
+--- 10.9-0/wx+/app_main.h 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1/wx+/app_main.h 2019-02-16 13:51:32.437266070 -0500
+@@ -7,6 +7,8 @@
+ #ifndef APP_MAIN_H_08215601837818347575856
+ #define APP_MAIN_H_08215601837818347575856
+
++#define __GXX_ABI_VERSION 1002
++
+ #include <wx/window.h>
+ #include <wx/app.h>
+
+diff -Naur -x '*.orig' -x '*.rej' -x '*.swp' 10.9-0/FreeFileSync/Source/RealTimeSync/application.h 10.9-1.el7/FreeFileSync/Source/RealTimeSync/application.h
+--- 10.9-0/FreeFileSync/Source/RealTimeSync/application.h 2019-02-13 16:05:15.000000000 -0500
++++ 10.9-1.el7/FreeFileSync/Source/RealTimeSync/application.h 2019-02-18 08:53:14.017850931 -0500
+@@ -7,6 +7,8 @@
+ #ifndef APPLICATION_H_18506781708176342677
+ #define APPLICATION_H_18506781708176342677
+
++#define __GXX_ABI_VERSION 1002
++
+ #include <wx/app.h>
+
+
diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_fedora.patch
index 1fc0a50..02caceb 100644
--- a/freefilesync/ffs_fedora.patch
+++ b/freefilesync/ffs_fedora.patch
@@ -1,3 +1,4 @@
+Upstream uses a libcurl more current than Fedora 29.
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
@@ -22,3 +23,47 @@ diff -Naur 10.6-0/FreeFileSync/Source/base/ffs_paths.cpp 10.6-1/FreeFileSync/Sou
//else //use OS' standard paths
// return appendSeparator(utfTo<Zstring>(wxStandardPathsBase::Get().GetResourcesDir()));
}
+diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/Makefile 10.9-1/FreeFileSync/Source/Makefile
+--- 10.3-0/FreeFileSync/Source/Makefile 2019-02-10 22:01:42.138160180 -0500
++++ 10.9-1/FreeFileSync/Source/Makefile 2019-02-11 21:48:19.729739859 -0500
+@@ -1,10 +1,10 @@
+-EXENAME = FreeFileSync_$(shell arch)
++EXENAME = FreeFileSync
+
+ CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
+ -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
+
+
+ CXXFLAGS += `pkg-config --cflags openssl`
+diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/RealTimeSync/Makefile 10.9-1/FreeFileSync/Source/RealTimeSync/Makefile
+--- 10.3-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-02-10 22:01:42.141160214 -0500
++++ 10.9-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-02-11 21:48:22.504771344 -0500
+@@ -1,10 +1,10 @@
+-EXENAME = RealTimeSync_$(shell arch)
++EXENAME = RealTimeSync
+
+ CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
+ -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 -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/fs/libcurl/curl_wrap.h 10.9-1/FreeFileSync/Source/fs/libcurl/curl_wrap.h
+--- 10.9-0/FreeFileSync/Source/fs/libcurl/curl_wrap.h 2019-02-10 16:42:29.124040824 -0500
++++ 10.9-1/FreeFileSync/Source/fs/libcurl/curl_wrap.h 2019-02-10 20:57:30.758315345 -0500
+@@ -75,7 +75,7 @@
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50);
+- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51);
++ //ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING);
+ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
diff --git a/freefilesync/ffs_makefile.patch b/freefilesync/ffs_makefile.patch
deleted file mode 100644
index 79a8233..0000000
--- a/freefilesync/ffs_makefile.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/Makefile 10.9-1/FreeFileSync/Source/Makefile
---- 10.3-0/FreeFileSync/Source/Makefile 2019-02-10 22:01:42.138160180 -0500
-+++ 10.9-1/FreeFileSync/Source/Makefile 2019-02-11 21:48:19.729739859 -0500
-@@ -1,10 +1,10 @@
--EXENAME = FreeFileSync_$(shell arch)
-+EXENAME = FreeFileSync
-
- CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -DLIBSSH2_OPENSSL -I../.. -I../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
- -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
-
-
- CXXFLAGS += `pkg-config --cflags openssl`
-diff -Naur -x '*.orig' -x '*.rej' 10.9-0/FreeFileSync/Source/RealTimeSync/Makefile 10.9-1/FreeFileSync/Source/RealTimeSync/Makefile
---- 10.3-0/FreeFileSync/Source/RealTimeSync/Makefile 2019-02-10 22:01:42.141160214 -0500
-+++ 10.9-1/FreeFileSync/Source/RealTimeSync/Makefile 2019-02-11 21:48:22.504771344 -0500
-@@ -1,10 +1,10 @@
--EXENAME = RealTimeSync_$(shell arch)
-+EXENAME = RealTimeSync
-
- CXXFLAGS = -std=c++17 -pipe -DWXINTL_NO_GETTEXT_MACRO -I../../.. -I../../../zenXml -include "zen/i18n.h" -include "zen/warn_static.h" \
- -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_old_libcurl.patch b/freefilesync/ffs_old_libcurl.patch
deleted file mode 100644
index e13f1bb..0000000
--- a/freefilesync/ffs_old_libcurl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream uses a libcurl more current than Fedora 29.
-diff -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/fs/libcurl/curl_wrap.h 10.9-1/FreeFileSync/Source/fs/libcurl/curl_wrap.h
---- 10.9-0/FreeFileSync/Source/fs/libcurl/curl_wrap.h 2019-02-10 16:42:29.124040824 -0500
-+++ 10.9-1/FreeFileSync/Source/fs/libcurl/curl_wrap.h 2019-02-10 20:57:30.758315345 -0500
-@@ -75,7 +75,7 @@
- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION);
- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50);
-- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51);
-+ //ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51);
- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION);
- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING);
- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
diff --git a/freefilesync/ffs_sftp.patch b/freefilesync/ffs_sftp.patch
index 34dc9ad..056cf91 100644
--- a/freefilesync/ffs_sftp.patch
+++ b/freefilesync/ffs_sftp.patch
@@ -1,3 +1,5 @@
+The upstream author observed that some of the values he uses are not in the libssh2 public headers. I don't know where he uses them from, but I had to replace them here to get this to compile.
+https://github.com/libssh2/libssh2/issues/90
diff -x '*.orig' -x '*.swp' -x '*.rej' -Naur 10.9-0/FreeFileSync/Source/fs/sftp.cpp 10.9-1/FreeFileSync/Source/fs/sftp.cpp
--- 10.9-0/FreeFileSync/Source/fs/sftp.cpp 2019-02-10 16:42:29.139040980 -0500
+++ 10.9-1/FreeFileSync/Source/fs/sftp.cpp 2019-02-10 21:28:00.030732089 -0500
diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec
index 591adbf..adb5949 100644
--- a/freefilesync/freefilesync.spec
+++ b/freefilesync/freefilesync.spec
@@ -1,9 +1,21 @@
%global pkgname FreeFileSync
%global prog2name RealTimeSync
%global dummy_package 0
+%define min_libcurl %{nil}
+%define min_libssh2 %{nil}
+%define min_openssl %{nil}
+%define scl_env %{nil}
+%define scl_buildreq coreutils
+%if 0%{?el6}%{?el7}
+ %define scl_env devtoolset-7
+ %define scl_buildreq devtoolset-7-toolchain
+ %define min_libcurl >= 7.64.0
+ %define min_libssh2 >= 1.8.0
+ %define min_openssl >= 1.1.0h
+%endif
Name: freefilesync
Version: 10.9
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A file synchronization utility
Group: Applications/File
@@ -14,13 +26,12 @@ URL: http://www.freefilesync.org/
Source0: https://gitlab.com/opensource-tracking/%{pkgname}/-/archive/%{version}/%{pkgname}-%{version}.tar.gz
Source1: %{pkgname}.desktop
Source2: %{prog2name}.desktop
-Patch0: ffs_makefile.patch
+Patch0: ffs_allow_parallel_ops.patch
Patch1: ffs_no_check_updates.patch
Patch2: ffs_no_wx311.patch
-Patch3: ffs_fedora.patch
-Patch4: ffs_allow_parallel_ops.patch
-Patch5: ffs_old_libcurl.patch
-Patch6: ffs_sftp.patch
+Patch3: ffs_sftp.patch
+Patch4: ffs_fedora.patch
+Patch5: ffs_el.patch
Packager: B Stack <bgstack15@gmail.com>
# WARNING: the build will FAIL if you have wxGTK3-devel installed. Only wxGTK2-devel should be on the build system.
@@ -29,13 +40,23 @@ BuildRequires: compat-wxGTK3-gtk2-devel
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: ImageMagick
-BuildRequires: libcurl-devel
-BuildRequires: libssh2-devel
-BuildRequires: openssl-devel
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(zlib)
+BuildRequires: libcurl-devel %{min_libcurl}
+BuildRequires: libssh2-devel %{min_libssh2}
+%if 0%{?el6}%{?el7}
+BuildRequires: wxGTK-devel
+BuildRequires: %{scl_buildreq}
+BuildRequires: openssl-%{name}-devel %{min_openssl}
+Requires: libcurl %{min_libcurl}
+Requires: libssh2 %{min_libssh2}
+Requires: openssl-%{name}-libs %{min_openssl}
+%else
+BuildRequires: openssl-devel
+%endif
Requires: hicolor-icon-theme
+Requires: xdg-utils
%description
FreeFileSync is a free Open Source software that helps you synchronize
@@ -54,20 +75,31 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
+%if 0%{?el6}%{?el7}
+# use the el patch
%patch5 -p1
-%patch6 -p1
+%else
+# use the fedora patch
+%patch4 -p1
+%endif
# custom build parameters for packaging application in rpm
+# fedora provides build_cxxflags, which is really just optflags
%{__sed} \
- -e 's|-O3 -DNDEBUG|-DNDEBUG -D"warn_static(arg)= " -DZEN_LINUX %{build_cxxflags}|g' \
- -e '/LINKFLAGS/s|-s|%{__global_ldflags}|g' \
+ -e 's|-O3 -DNDEBUG|-DNDEBUG -D"warn_static(arg)= " -DZEN_LINUX %{?build_cxxflags:%{build_cxxflags}}%{!?build_cxxflags:%{optflags}}|g' \
+ -e '/LINKFLAGS/s|-s|%{__global_ldflags}|;' \
-i %{pkgname}/Source/Makefile %{pkgname}/Source/%{prog2name}/Makefile
%build
%if !%{dummy_package}
-%make_build -C %{pkgname}/Source
-%make_build -C %{pkgname}/Source/%{prog2name}
+ %if "%{?scl_env}" != ""
+ scl enable %{scl_env} /bin/bash << EOF
+ %endif
+ %make_build -C %{pkgname}/Source
+ %make_build -C %{pkgname}/Source/%{prog2name}
+ %if "%{?scl_env}" != ""
+EOF
+ %endif
%endif
%install
bgstack15