a56c72d
# these don't seem to be defined on f16+
367432a
%global _icons16dir    %{_datadir}/icons/hicolor/16x16/apps
367432a
%global _icons22dir    %{_datadir}/icons/hicolor/22x22/apps
367432a
%global _icons24dir    %{_datadir}/icons/hicolor/24x24/apps
367432a
%global _icons32dir    %{_datadir}/icons/hicolor/32x32/apps
a56c72d
%global _icons48dir    %{_datadir}/icons/hicolor/48x48/apps
a56c72d
%global _iconsscaldir  %{_datadir}/icons/hicolor/scalable/apps
a56c72d
a56c72d
Name:         snap
367432a
Version:      0.6
0c67646
Release:      14%{?dist}
a56c72d
Summary:      A modular system backup/restore utility
a56c72d
a56c72d
Group:       Applications/System
a56c72d
License:     GPLv3
a56c72d
URL:         http://projects.morsi.org/snap
367432a
Source0:     http://mo.morsi.org/files/snap/snap-0.6.tgz
a56c72d
a56c72d
BuildArch:      noarch
a56c72d
BuildRequires:  desktop-file-utils
a56c72d
%if 0%{?with_python3}
a56c72d
BuildRequires:  python3-devel
a56c72d
%else
a56c72d
BuildRequires:  python2-devel
a56c72d
%endif # if with_python3
21e829e
Requires:  python2-crypto
a56c72d
a56c72d
%description
a56c72d
Snap! is a system snapshot utility which uses the underlying package
a56c72d
management system and native tooling to take and restore system snapshots.
a56c72d
a56c72d
It provides a very simple command line and graphical interface as well as
a56c72d
an API which can be easily extended to take snapshots of any custom system
a56c72d
entity (support for repositories, packages, files, and various services are
a56c72d
provided right out of the box)
a56c72d
a56c72d
%package gtk
a56c72d
Summary: Snap! GUI interface
a56c72d
Group:   Applications/System
a56c72d
License: GPLv3
a56c72d
Requires: %{name} = %{version}-%{release}
a56c72d
Requires: pygtk2
a56c72d
%if 0%{?with_python3}
21e829e
Requires: python2-gobject
a56c72d
%else
a56c72d
Requires: pygobject2
a56c72d
%endif
a56c72d
a56c72d
%description gtk
a56c72d
Provides gsnap a GTK frontend to the Snap! system snapshotter
a56c72d
a56c72d
%prep
a56c72d
%setup -q
a56c72d
a56c72d
%build
a56c72d
make %{?_smp_mflags}
a56c72d
a56c72d
# due to how snap works this currently needs to be run as sudo / root
a56c72d
#%%check
a56c72d
#%%{__python} test/run.py
a56c72d
a56c72d
%install
367432a
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1  \
a56c72d
         $RPM_BUILD_ROOT%{_iconsscaldir} \
367432a
         $RPM_BUILD_ROOT%{_icons16dir}   \
367432a
         $RPM_BUILD_ROOT%{_icons22dir}   \
367432a
         $RPM_BUILD_ROOT%{_icons24dir}   \
367432a
         $RPM_BUILD_ROOT%{_icons32dir}   \
367432a
         $RPM_BUILD_ROOT%{_icons48dir}   \
367432a
         $RPM_BUILD_ROOT%{_datadir}/pixmaps
a56c72d
make install DESTDIR=$RPM_BUILD_ROOT
a56c72d
desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications resources/snap.desktop
a56c72d
cp resources/gsnap.svg    $RPM_BUILD_ROOT/%{_iconsscaldir}/gsnap.svg
367432a
cp resources/gsnap-16.png $RPM_BUILD_ROOT/%{_icons16dir}/gsnap.png
367432a
cp resources/gsnap-22.png $RPM_BUILD_ROOT/%{_icons22dir}/gsnap.png
367432a
cp resources/gsnap-24.png $RPM_BUILD_ROOT/%{_icons24dir}/gsnap.png
367432a
cp resources/gsnap-32.png $RPM_BUILD_ROOT/%{_icons32dir}/gsnap.png
a56c72d
cp resources/gsnap-48.png $RPM_BUILD_ROOT/%{_icons48dir}/gsnap.png
367432a
cp resources/gsnap-16.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps/gsnap.png
a56c72d
a56c72d
pushd $RPM_BUILD_ROOT/%{_mandir}/man1
a56c72d
ln -s snap.1.gz snaptool.1.gz
a56c72d
a56c72d
%files
5416d65
%{python2_sitelib}/snap/
a56c72d
%{_bindir}/snaptool
a56c72d
%config(noreplace) %{_sysconfdir}/snap.conf
a56c72d
%{_datadir}/snap
a56c72d
%{_mandir}/man1/snap.1.gz
a56c72d
%{_mandir}/man1/snaptool.1.gz
5416d65
%{python2_sitelib}/snap*.egg-info
a56c72d
%doc CHANGELOG LICENSE README
a56c72d
a56c72d
%files gtk
a56c72d
%{_bindir}/gsnap
a56c72d
%{_datadir}/applications/snap.desktop
367432a
%{_datadir}/pixmaps/gsnap.png
a56c72d
%{_iconsscaldir}/gsnap.svg
367432a
%{_icons16dir}/gsnap.png
367432a
%{_icons22dir}/gsnap.png
367432a
%{_icons24dir}/gsnap.png
367432a
%{_icons32dir}/gsnap.png
a56c72d
%{_icons48dir}/gsnap.png
a56c72d
a56c72d
%changelog
0c67646
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-14
0c67646
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0c67646
21e829e
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.6-13
21e829e
- Update Python 2 dependency declarations to new packaging standards
21e829e
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
21e829e
a6694f7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-12
a6694f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a6694f7
4a546a6
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-11
4a546a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4a546a6
da4246d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-10
da4246d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
da4246d
720b6c4
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-9
720b6c4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
720b6c4
0e5b4b1
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-8
0e5b4b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0e5b4b1
0ff2dd5
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-7
0ff2dd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0ff2dd5
5bcde15
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-6
5bcde15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5bcde15
69ef9b9
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-5
69ef9b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
69ef9b9
220ca90
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-4
220ca90
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
220ca90
8a1c066
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-3
8a1c066
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8a1c066
ff75bd0
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
ff75bd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ff75bd0
367432a
* Mon Dec 19 2011 Mo Morsi <mo@morsi.org> 0.6-1
367432a
- new upstream release
367432a
367432a
* Sat Dec 10 2011 Mo Morsi <mo@morsi.org> 0.5-8
367432a
- include additional sized icons
367432a
- include pixmap file
367432a
a56c72d
* Thu Dec 08 2011 Mo Morsi <mo@morsi.org> 0.5-7
a56c72d
- more updates to conform to fedora guidelines
a56c72d
- conditionalize python2/3-devel dependency
a56c72d
- include upstream fix in release tarball
a56c72d
a56c72d
* Thu Dec 08 2011 Mo Morsi <mo@morsi.org> 0.5-6
a56c72d
- more updates to conform to fedora guidelines
a56c72d
- include docs in files section
a56c72d
a56c72d
* Wed Dec 07 2011 Mo Morsi <mo@morsi.org> 0.5-5
a56c72d
- more updates to conform to fedora guidelines
a56c72d
- source0 now matches upstream release
a56c72d
- fix long lines, shorted symbollic links,
a56c72d
  conditionalize pygobject2/3 dependency
a56c72d
a56c72d
* Tue Nov 22 2011 Mo Morsi <mo@morsi.org> 0.5-4
a56c72d
- add missing pyobject3 dependency
a56c72d
- added 48x48 icon and icon macros for F16+
a56c72d
a56c72d
* Tue Nov 22 2011 Mo Morsi <mo@morsi.org> 0.5-3
a56c72d
- More updates to conform to Fedora guidelines
a56c72d
- add desktop file and icon, reduce line lengths,
a56c72d
- escape macros in comments, make config file as such,
a56c72d
- added missing dependencies
a56c72d
- create gtk subpackage
a56c72d
a56c72d
* Tue Nov 22 2011 Mo Morsi <mo@morsi.org> 0.5-2
a56c72d
- Updates to conform to Fedora guidelines
a56c72d
- remove tabs in spec, rename snap.man to snap.1
a56c72d
a56c72d
* Tue Oct 25 2011 Mo Morsi <mo@morsi.org> 0.5-1
a56c72d
- Initial package