Blob Blame History Raw
Name:           viewnior
Version:        1.6
Release:        3%{?dist}
Summary:        Elegant image viewer

Group:          User Interface/X
License:        GPLv3+
URL:            http://siyanpanayotov.com/project/viewnior/
Source0:        https://github.com/xsisqox/Viewnior/archive/%{name}-%{version}.tar.gz
Patch0:         viewnior-1.2-dsofix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  pkgconfig(gtk+-2.0) >= 2.20
BuildRequires:  pkgconfig(glib-2.0) >= 2.32
BuildRequires:  pkgconfig(gio-2.0) >= 2.32
BuildRequires:  pkgconfig(shared-mime-info) >= 0.20
BuildRequires:  pkgconfig(gdk-pixbuf-2.0) >= 2.4.0
BuildRequires:  pkgconfig(exiv2) >= 0.21
BuildRequires:  desktop-file-utils
BuildRequires:  gettext intltool
BuildRequires:  gnome-common


%description 
Viewnior is an image viewer program. Created to be simple, fast and elegant. 
It's minimalistic interface provides more screen space for your images. Among 
its features are:

* Fullscreen & Slideshow
* Rotate, flip, save, delete images
* Animation support
* Browse only selected images
* Navigation window
* Simple interface
* Configurable mouse actions


%prep
%setup -qn Viewnior-%{name}-%{version}
#%patch0 -p1 -b .dsofix

# fix spurious executable perms
chmod 0644 AUTHORS ChangeLog-20090517 COPYING NEWS README TODO src/*


%build
./autogen.sh
%configure %{?_with_gnome:--enable-wallpaper}
make %{?_smp_mflags} V=1


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL='install -p'
%find_lang %{name}
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop

# Register as an application to be visible in the software center
#
# NOTE: It would be *awesome* if this file was maintained by the upstream
# project, translated and installed into the right place during `make install`.
#
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 Ryan Lerch <rlerch@redhat.com> -->
<!--
BugReportURL: https://bugs.launchpad.net/viewnior/+bug/1323677
SentUpstream: 2014-09-18
-->
<application>
  <id type="desktop">viewnior.desktop</id>
  <metadata_license>CC0-1.0</metadata_license>
  <summary>Simple image viewer and editor</summary>
  <description>
    <p>
      Viewnior is a simple and elegant image viewer with a minimal interface that
      provides as much screen real estate as possible to view your images.
      It has a wide range of features, including: fullscreen and slideshow modes,
      the ability to rotate, flip and crop images, support for animations (GIF),
      support for reading image metadata, and the ability to configure mouse actions.
    </p>
  </description>
  <url type="homepage">http://siyanpanayotov.com/project/viewnior/</url>
  <screenshots>
    <screenshot type="default">http://siyanpanayotov.com/wp-content/uploads/2014/04/vnr_normal_mode_2.png</screenshot>
    <screenshot>http://siyanpanayotov.com/wp-content/uploads/2014/04/vnr_pref_window.png</screenshot>
    <screenshot>http://siyanpanayotov.com/wp-content/uploads/2014/04/vnr_navigation_window.png</screenshot>
  </screenshots>
</application>
EOF

%clean
rm -rf %{buildroot}


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-desktop-database &> /dev/null || :


%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
update-desktop-database &> /dev/null || :


%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog-20090517 COPYING NEWS README TODO
%{_bindir}/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/%{name}/
%{_mandir}/man*/%{name}.*


%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Dec 29 2015 Christoph Wickert <cwickert@fedoraproject.org> - 1.6-1
- Update to 1.6

* Wed Jun 24 2015 Rex Dieter <rdieter@fedoraproject.org> - 1.5-3
- rebuild (exiv2)

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

* Sat May 02 2015 Christoph Wickert <cwickert@fedoraproject.org> - 1.5-1
- Update to 1.5

* Thu Mar 26 2015 Richard Hughes <rhughes@redhat.com> - 1.4-3
- Add an AppData file for the software center

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Thu Jun 26 2014 Christoph Wickert <cwickert@fedoraproject.org> - 1.4-1
- Update to 1.4
- Fix Source0 URL and website
- Update BuildRequires
- Drop obsolete aarch64 patch
- Fix changelog

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun May 12 2013 Christoph Wickert <cwickert@fedoraproject.org> - 1.3-4
- Add aarch64 support (#926697)

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Feb 27 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.3-1
- Update to 1.3
- Drop BR of GConf2-devel (no longer needed)
- As dep on GConf2-(devel) is obsolet, we can now remove the bcond clause, too

* Sat Feb 25 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.2-1
- Update to 1.2

* Sat Feb 25 2012 Christoph Wickert <cwickert@fedoraproject.org> - 1.1-4
- Fix DSO linking error

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.1-3
- Rebuild for new libpng

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

* Thu Dec 16 2010 Christoph Wickert <cwickert@fedoraproject.org> - 1.1-1
- Update to 1.1
- Remove obsolete DSO patch
- Add new manpage

* Wed Mar 31 2010 Christoph Wickert <cwickert@fedoraproject.org> - 1.0-1
- Update to 1.0

* Tue Feb 16 2010 Christoph Wickert <cwickert@fedoraproject.org> - 0.7-2
- Add patch to fix DSO linking (#565018)
- Switch to %%bcond macro

* Mon Sep 07 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.7-1
- Update to 0.7

* Sat Sep 05 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.6-2
- Spec file cleanups from review.

* Mon Aug 03 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.6-1
- Initial package