%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} Name: luckybackup Version: 0.5.0 Release: 2%{?dist} Summary: A powerful, fast and reliable backup and sync tool License: GPLv3+ URL: http://luckybackup.sourceforge.net/index.html %if !0%{?os2_version} Source0: http://downloads.sourceforge.net/project/%{name}/%{version}/source/%{name}-%{version}.tar.gz %else Source1: %{name}.policy %scm_source github http://github.com/TeLLie/luckybackup-os2 master-os2 %endif %if !0%{?os2_version} BuildRequires: qt-devel Buildrequires: desktop-file-utils %else BuildRequires: qt5-devel %endif Buildrequires: gcc-c++ BuildRequires: make %if !0%{?os2_version} Requires: polkit %endif %description luckyBackup is an application that backs-up and/or synchronizes any directories with the power of rsync. It is simple to use, fast (transfers over only changes made and not all data), safe (keeps your data safe by checking all declared directories before proceeding in any data manipulation ), reliable and fully customizable. %prep %if !0%{?os2_version} %setup -q sed -i 's,/usr/share/doc/luckybackup,%{_pkgdocdir},' luckybackup.pro sed -i 's,/usr/share/doc/luckybackup/license/gpl.html,%{_pkgdocdir}/license/gpl.html,' src/global.h sed -i 's,/usr/share/doc/luckybackup/manual/index.html,%{_pkgdocdir}/manual/index.html,' src/global.h sed -i 's,su-to-root -X -c,/usr/bin/pkexec,' menu/%{name}-gnome-su.desktop sed -i '/Fedora users/d' manual/index.html %else %scm_setup chmod a-x manual/index.html %endif %build %if !0%{?os2_version} %{qmake_qt4} %make_build CFLAGS="$RPM_OPT_FLAGS" %else LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" qmake-qt5 make %{?_smp_mflags} %endif %install #INSTALL_ROOT=%{buildroot} \ %make_install DESTDIR=$RPM_BUILD_ROOT mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_datadir}/translations mkdir -p %{buildroot}%{_mandir}/man8/ cp -p %{name}.exe %{buildroot}%{_bindir}/ cp -p translations/*.qm %{buildroot}%{_datadir}/translations/ cp -p manpage/%{name}.8 %{buildroot}%{_mandir}/man8/ install -m 0755 -d %{buildroot}%{_datadir}/polkit-1/actions/ install -m 0644 -p %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/actions/ # Remove unneeded files rm -rf %{buildroot}%{_datadir}/translations/*.ts rm -rf %{buildroot}%{_datadir}/doc/luckybackup/ rm -rf %{buildroot}%{_datadir}/menu/ %check %if !0%{?os2_version} desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}-kde-su.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}-gnome-su.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %endif %files %doc readme/README readme/changelog %license license/gpl.txt %if !0%{?os2_version} %{_bindir}/%{name} %{_datadir}/%{name} %{_datadir}/menu %{_datadir}/applications/%{name}* %{_datadir}/pixmaps/%{name}* %{_docdir}/%{name} %else %{_bindir}/%{name}.exe %endif %{_datadir}/polkit-1/actions/%{name}.policy %{_datadir}/man/man8/*.8.* %{_datadir}/translations/*.qm %changelog * Wed Oct 04 2023 Elbert Pol - 0.5.0-2 - Put the translations files into the right directories * Sun Mar 14 2021 Elbert Pol - 0.5.0-1 - Updated to latest version - Add os2 definitions to spec file - Update to latest Fedora spec