summaryrefslogtreecommitdiff
path: root/freefilesync/freefilesync.spec
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync/freefilesync.spec')
-rw-r--r--freefilesync/freefilesync.spec136
1 files changed, 136 insertions, 0 deletions
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