| 1 | %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|---|
| 2 | Name: luckybackup
|
|---|
| 3 | Version: 0.5.0
|
|---|
| 4 | Release: 1%{?dist}
|
|---|
| 5 | Summary: A powerful, fast and reliable backup and sync tool
|
|---|
| 6 |
|
|---|
| 7 | License: GPLv3+
|
|---|
| 8 | URL: http://luckybackup.sourceforge.net/index.html
|
|---|
| 9 | %if !0%{?os2_version}
|
|---|
| 10 | Source0: http://downloads.sourceforge.net/project/%{name}/%{version}/source/%{name}-%{version}.tar.gz
|
|---|
| 11 | %else
|
|---|
| 12 | Source1: %{name}.policy
|
|---|
| 13 | %scm_source github http://github.com/TeLLie/luckybackup-os2 master-os2
|
|---|
| 14 | %endif
|
|---|
| 15 |
|
|---|
| 16 | %if !0%{?os2_version}
|
|---|
| 17 | BuildRequires: qt-devel
|
|---|
| 18 | Buildrequires: desktop-file-utils
|
|---|
| 19 | %else
|
|---|
| 20 | BuildRequires: qt5-devel
|
|---|
| 21 | %endif
|
|---|
| 22 | Buildrequires: gcc-c++
|
|---|
| 23 | BuildRequires: make
|
|---|
| 24 | %if !0%{?os2_version}
|
|---|
| 25 | Requires: polkit
|
|---|
| 26 | %endif
|
|---|
| 27 |
|
|---|
| 28 | %description
|
|---|
| 29 | luckyBackup is an application that backs-up and/or synchronizes any
|
|---|
| 30 | directories with the power of rsync.
|
|---|
| 31 |
|
|---|
| 32 | It is simple to use, fast (transfers over only changes made and not all data),
|
|---|
| 33 | safe (keeps your data safe by checking all declared directories before
|
|---|
| 34 | proceeding in any data manipulation ), reliable and fully customizable.
|
|---|
| 35 |
|
|---|
| 36 | %prep
|
|---|
| 37 | %if !0%{?os2_version}
|
|---|
| 38 | %setup -q
|
|---|
| 39 | sed -i 's,/usr/share/doc/luckybackup,%{_pkgdocdir},' luckybackup.pro
|
|---|
| 40 | sed -i 's,/usr/share/doc/luckybackup/license/gpl.html,%{_pkgdocdir}/license/gpl.html,' src/global.h
|
|---|
| 41 | sed -i 's,/usr/share/doc/luckybackup/manual/index.html,%{_pkgdocdir}/manual/index.html,' src/global.h
|
|---|
| 42 | sed -i 's,su-to-root -X -c,/usr/bin/pkexec,' menu/%{name}-gnome-su.desktop
|
|---|
| 43 | sed -i '/Fedora users/d' manual/index.html
|
|---|
| 44 | %else
|
|---|
| 45 | %scm_setup
|
|---|
| 46 | chmod a-x manual/index.html
|
|---|
| 47 | %endif
|
|---|
| 48 |
|
|---|
| 49 | %build
|
|---|
| 50 | %if !0%{?os2_version}
|
|---|
| 51 | %{qmake_qt4}
|
|---|
| 52 | %make_build CFLAGS="$RPM_OPT_FLAGS"
|
|---|
| 53 | %else
|
|---|
| 54 | LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 55 | qmake-qt5 PREFIX=/@unixroot/usr
|
|---|
| 56 | make %{?_smp_mflags}
|
|---|
| 57 | %endif
|
|---|
| 58 |
|
|---|
| 59 | %install
|
|---|
| 60 | #INSTALL_ROOT=%{buildroot} \
|
|---|
| 61 | # make install DESTDIR=%{buildroot}
|
|---|
| 62 | %make_install INSTALL_ROOT=%{buildroot}
|
|---|
| 63 | install -m 0755 -d %{buildroot}%{_datadir}/polkit-1/actions/
|
|---|
| 64 | install -m 0644 -p %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/actions/
|
|---|
| 65 |
|
|---|
| 66 | # Remove unneeded files
|
|---|
| 67 | rm -rf %{buildroot}%{_bindir}/translations/*.ts
|
|---|
| 68 | rm -rf %{buildroot}%{_datadir}/doc/luckybackup/
|
|---|
| 69 | rm -rf %{buildroot}%{_datadir}/menu/
|
|---|
| 70 |
|
|---|
| 71 | %check
|
|---|
| 72 | %if !0%{?os2_version}
|
|---|
| 73 | desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}-kde-su.desktop
|
|---|
| 74 | desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}-gnome-su.desktop
|
|---|
| 75 | desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|---|
| 76 | %endif
|
|---|
| 77 |
|
|---|
| 78 | %files
|
|---|
| 79 | %doc readme/README readme/changelog
|
|---|
| 80 | %license license/gpl.txt
|
|---|
| 81 | %if !0%{?os2_version}
|
|---|
| 82 | %{_bindir}/%{name}
|
|---|
| 83 | %{_datadir}/applications/%{name}*
|
|---|
| 84 | %{_datadir}/%{name}
|
|---|
| 85 | %{_datadir}/menu
|
|---|
| 86 | %{_datadir}/pixmaps/%{name}*
|
|---|
| 87 | %{_docdir}/%{name}
|
|---|
| 88 | %else
|
|---|
| 89 | %{_bindir}/%{name}.exe
|
|---|
| 90 | %{_bindir}/translations/*.qm
|
|---|
| 91 | %{_datadir}/polkit-1/actions/%{name}.policy
|
|---|
| 92 | %{_datadir}/man/man8/*.8.*
|
|---|
| 93 | %endif
|
|---|
| 94 |
|
|---|
| 95 | %changelog
|
|---|
| 96 | * Sun Mar 14 2021 Elbert Pol <elbert.pol@gmail.com> - 0.5.0-1
|
|---|
| 97 | - Updated to latest version
|
|---|
| 98 | - Add os2 definitions to spec file
|
|---|
| 99 | - Update to latest Fedora spec
|
|---|