summaryrefslogtreecommitdiff
path: root/freefilesync/freefilesync.spec
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync/freefilesync.spec')
-rw-r--r--freefilesync/freefilesync.spec86
1 files changed, 69 insertions, 17 deletions
diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec
index 3ae7f2d..adb5949 100644
--- a/freefilesync/freefilesync.spec
+++ b/freefilesync/freefilesync.spec
@@ -1,35 +1,62 @@
%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.8
-Release: 1%{?dist}
+Version: 10.9
+Release: 2%{?dist}
Summary: A file synchronization utility
Group: Applications/File
License: GPLv3
URL: http://www.freefilesync.org/
# upstream does not provide easy automatic downloads of the source, so use the mirror
-#Source0: http://www.freefilesync.org/download/%{pkgname}_%{version}_Source.zip
+#Source0: http://www.freefilesync.org/download/%%{pkgname}_%%{version}_Source.zip
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
+Patch3: ffs_sftp.patch
+Patch4: ffs_fedora.patch
+Patch5: ffs_el.patch
Packager: B Stack <bgstack15@gmail.com>
-BuildRequires: boost-devel
# WARNING: the build will FAIL if you have wxGTK3-devel installed. Only wxGTK2-devel should be on the build system.
+BuildRequires: boost-devel
BuildRequires: compat-wxGTK3-gtk2-devel
-BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
+BuildRequires: gcc-c++
BuildRequires: ImageMagick
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
@@ -48,27 +75,48 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%if 0%{?el6}%{?el7}
+# use the el patch
+%patch5 -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
%if !%{dummy_package}
-%make_install -C %{pkgname}/Source
-%make_install -C %{pkgname}/Source/%{prog2name}
+# removed by upstream!
+#%%make_install -C %%{pkgname}/Source
+#%%make_install -C %%{pkgname}/Source/%%{prog2name}
+pushd %{pkgname}/Build
+install -d %{buildroot}%{_bindir} %{buildroot}%{_datadir}/%{name}
+install -Dm 0755 -t %{buildroot}%{_bindir} Bin/%{pkgname} Bin/%{prog2name}
+cp -pr Languages %{buildroot}%{_datadir}/%{name}
+install -Dm 0644 ding.wav gong.wav harp.wav Resources.zip styles.gtk_rc %{buildroot}%{_datadir}/%{name}
+popd
%endif
# make extra sure the files are not marked with executable
-find %{buildroot}%{_datadir}/%{pkgname} -type f -exec chmod -x '{}' \; || :
+find %{buildroot}%{_datadir}/%{name} -type f -exec chmod -x '{}' \; || :
# desktop files
mkdir -p %{buildroot}%{_datadir}/applications
@@ -127,11 +175,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_bindir}/%{prog2name}
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*x*/apps/*.png
-%{_datadir}/%{pkgname}
-%{_defaultdocdir}/%{pkgname}
-%ghost %config %attr(666, -, -) %{_datadir}/%{pkgname}/GlobalSettings.xml
+%{_datadir}/%{name}
+%ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml
%changelog
+* Tue Feb 12 2019 B Stack <bgstack15@gmail.com> - 10.9-1
+- version bump
+- add manual install that is now absent from upstream
+- move datadir to lowercase name instead of camelcase
+
* Thu Jan 17 2019 B Stack <bgstack15@gmail.com> - 10.8-1
- version bump
bgstack15