Blob Blame History Raw
Name:            backintime
Version:         1.1.12
Release:         1%{?dist}
Summary:         Simple backup tool inspired from the Flyback project and TimeVault

License:         GPLv2+
URL:             http://%{name}.le-web.org
Source0:         %{url}/download/%{name}/%{name}-%{version}.tar.gz
BuildArch:       noarch

BuildRequires:   desktop-file-utils
BuildRequires:   gettext
BuildRequires:   python3-devel

BuildRequires:   systemd
Requires(post):  systemd
Requires(preun): systemd
Requires(postun): systemd

# we place additional icons
Requires:        hicolor-icon-theme

%description
Back In Time is a simple backup system for Linux inspired from 
“flyback project” and “TimeVault”. The backup is done by taking 
snapshots of a specified set of directories.

%package         common
Summary:         Common files for the %{name}, a simple backup tool
Requires:        cronie
Requires:        openssh-clients
Requires:        python3-keyring
Requires:        python3-dbus
Requires:        fuse-sshfs
Requires:        fuse-encfs
Requires:        bindfs

# support of gnome is gone in recent version
Obsoletes:       %{name}-gnome

%description     common
Back In Time is a simple backup system for Linux inspired from 
"flyback project" and "TimeVault". The backup is done by taking 
snapshots of a specified set of directories.

This package contains non GUI files used by different GUI frontends.

%package         qt4
Summary:         Qt4 frontend for %{name}
Requires:        %{name}-common = %{version}-%{release}
Requires:        libnotify
Requires:        polkit
Requires:        python3-PyQt4
Requires:        python3-SecretStorage
Requires:        python3-keyring
Requires:        xorg-x11-utils

%description     qt4
BackInTime is a simple backup system for Linux inspired from 
"flyback project" and "TimeVault". The backup is done by taking 
snapshots of a specified set of directories.

This package contains the Qt4 frontend of BackInTime.


%prep
%setup -q


%build
# Fix documentation directories.
sed -i -e "s|'%{name}-common'|'%{name}'|g" common/config.py
sed -i -e "s|%{name}-common|%{name}|g" common/configure qt4/configure

# Fix icon name.
sed -i 's/Icon=document-save/Icon=%{name}/g' qt4/%{name}-qt4.desktop
sed -i 's/Icon=document-save/Icon=%{name}/g' qt4/%{name}-qt4-root.desktop

pushd common
# general configure macro does not work with all the options
./configure --no-fuse-group --python3
%make_build
popd
pushd qt4
./configure --python3
%make_build
popd


%install
#Force Python 3 to be used for byte compilation:
%global __python %{__python3}

pushd common
%make_install
popd
pushd qt4
%make_install
popd
%find_lang %{name}

desktop-file-install \
        --dir=%{buildroot}%{_datadir}/applications \
        %{buildroot}%{_datadir}/applications/%{name}-qt4.desktop
desktop-file-install \
        --dir=%{buildroot}%{_datadir}/applications/ \
        --add-category="Settings;" \
        %{buildroot}%{_datadir}/applications/%{name}-qt4-root.desktop

rm -r %{buildroot}%{_datadir}/doc/qt

mkdir -p %{buildroot}%{_sbindir}
cp -p %{buildroot}%{_bindir}/%{name}-qt4 \
      %{buildroot}%{_sbindir}/%{name}-qt4-root

ln -s consolehelper \
      %{buildroot}%{_bindir}/%{name}-qt4-root

mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps/
cat << EOF > %{buildroot}%{_sysconfdir}/security/console.apps/%{name}-qt4-root
USER=root
PROGRAM=%{_sbindir}/%{name}-qt4-root
SESSION=true
EOF

mkdir -p %{buildroot}%{_sysconfdir}/pam.d
cat << EOF > %{buildroot}%{_sysconfdir}/pam.d/%{name}-qt4-root
#%PAM-1.0
auth            include         config-util
account         include         config-util
session         include         config-util
EOF


%post common
%systemd_post %{name}.service
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun common
%systemd_preun %{name}.service
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans common
%systemd_postun_with_restart %{name}.service
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files common -f %{name}.lang
%license LICENSE
%doc %{_datadir}/doc/%{name}/

%{_bindir}/%{name}*

%{_datadir}/%{name}/
%exclude %{_datadir}/%{name}/qt4/
%exclude %{_datadir}/%{name}/plugins/qt4plugin*
%exclude %{_datadir}/%{name}/plugins/__pycache__/*plugin*
%{_datadir}/%{name}/plugins/__pycache__/user*

%{_mandir}/man1/%{name}*

%{_datadir}/icons/hicolor/*/actions/*.svg
%{_datadir}/polkit-1/actions/*.policy
%{_datadir}/dbus-1/system-services/*.service
%{_datadir}/bash-completion/completions/%{name}

%exclude %{_sysconfdir}/xdg/autostart/%{name}.desktop
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/*.conf


%files qt4
%doc %{_datadir}/doc/%{name}-qt4/

%{_bindir}/%{name}-qt4*
%{_sbindir}/%{name}-qt4-root

%{_datadir}/applications/%{name}-qt4*.desktop
%{_datadir}/%{name}/qt4/
%{_datadir}/%{name}/plugins/qt4*
%{_datadir}/%{name}/plugins/__pycache__/qt4*
%{_datadir}/%{name}/plugins/__pycache__/notify*

%config(noreplace) %{_sysconfdir}/pam.d/%{name}-qt4-root
%config %{_sysconfdir}/security/console.apps/%{name}-qt4-root


%changelog
* Sun Feb 28 2016 Raphael Groner <projects.rg@smart.ms> - 1.1.12-1
- new version

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.36-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue Aug 12 2014 Christopher Meng <rpm@cicku.me> - 1.0.36-1
- Update to 1.0.36

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.34-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Dec 22 2013 Christopher Meng <rpm@cicku.me> - 1.0.34-1
- Update to 1.0.34(BZ#1043054)
- Switch to kdesu(BZ#1038893)

* Sun Nov 24 2013 Christopher Meng <rpm@cicku.me> - 1.0.28-2
- Enable notify plugin, separate plugins into different subpackages.
- Add missing python-SecretStorage dependency(BZ#1031403).
- Remove fuse group check(BZ#1010728).
- python-keyring incompatibility fix(BZ#1026542).

* Mon Oct 21 2013 Christopher Meng <rpm@cicku.me> - 1.0.28-1
- Update to 1.0.28(BZ#1021192) with fixes(BZ#1014293),(BZ#1014976).

* Thu Sep 12 2013 Christopher Meng <rpm@cicku.me> - 1.0.26-2
- Add missing python-keyring dependency(BZ#1007315).

* Wed Sep 11 2013 Christopher Meng <rpm@cicku.me> - 1.0.26-1
- Update to 1.0.26(BZ#1003304),(BZ#951248).
- Fix Bugs(BZ#999935),(BZ#922534).

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Oct 09 2011 Tim Jackson <rpm@timj.co.uk> - 1.0.8-2
- Add missing dependency on gnome-python2-gnome (rhbz#720577)

* Sun Oct 09 2011 Tim Jackson <rpm@timj.co.uk> - 1.0.8-1
- Update to version 1.0.8

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Feb 03 2011 Tim Jackson <rpm@timj.co.uk> - 1.0.6-3
- Fix bad ownership of language files (RHBZ #569407)

* Wed Feb 02 2011 Tim Jackson <rpm@timj.co.uk> - 1.0.6-2
- Fix error if notify-python is not installed (RHBZ #630969)

* Wed Feb 02 2011 Tim Jackson <rpm@timj.co.uk> - 1.0.6-1
- Update to version 1.0.6

* Wed Aug 11 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.26-4
- recompiling .py files against Python 2.7 (rhbz#623275)

* Wed Sep 02 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.26-3
- Add patch0 to secure backups

-* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sat May 23 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.26-1
- New upstream release
- Drop 'removecheck'-patch

* Sun May 17 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.24-3
- Fix sammries, RHBZ #501085

* Tue May 12 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.24-2
- fix doc issues, LP #375113

* Thu May 07 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.24-1
- New upstream release

* Sat Apr 25 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.22-2
- Remove Patch for desktop-files and do the changes in spec-file
- Change description of gnome package to "Gnome frontend for NAME" 
- Change description of kde package to "KDE frontend for NAME"
- Add TRANSLATIONS to DOC of common package
- Mark _DATADIR/gnome/help/NAME as DOC
- Mark _DATADIR/doc/kde4/HTML/en/NAME as DOC
- Use cp -p when copying from bindir to sbindir

* Wed Apr 22 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.22-1
- New upstream release
- Add Patch to remove the Desktopchecks in configure

* Mon Apr 06 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.20-1
- New upstream release
- Add consolehelperstuff for root-access

* Tue Mar 17 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.16.1-1
- New upstream release

* Tue Mar 10 2009 Simon Wesp <cassmodiah@fedoraproject.org> - 0.9.14-1
- Initial Package build