diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 06319c3..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -viewnior-0.7.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..46afdea --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +viewnior-1.0.tar.gz +/viewnior-1.1.tar.gz +/viewnior-1.2.tar.gz +/viewnior-1.3.tar.gz +/viewnior-1.4.tar.gz +/viewnior-1.5.tar.gz +/viewnior-1.6.tar.gz +/viewnior-1.7.tar.gz +/viewnior-1.8.tar.gz diff --git a/0001-Fix-build-with-exiv2-0.28.0-raise-minimum-to-0.27.0.patch b/0001-Fix-build-with-exiv2-0.28.0-raise-minimum-to-0.27.0.patch new file mode 100644 index 0000000..c8ed300 --- /dev/null +++ b/0001-Fix-build-with-exiv2-0.28.0-raise-minimum-to-0.27.0.patch @@ -0,0 +1,100 @@ +From 8767bc47c2cc9591745ee2b3214fff38eaab114f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Sat, 11 Nov 2023 18:17:04 +0100 +Subject: [PATCH] Fix build with >=exiv2-0.28.0, raise minimum to 0.27.0 + +- enables use of EXIV2_TEST_VERSION macro +- add compatibility for exiv2-0.28.0 +--- + meson.build | 2 +- + src/uni-exiv2.cpp | 21 +++++++++++++++------ + 2 files changed, 16 insertions(+), 7 deletions(-) + +diff --git a/meson.build b/meson.build +index 8f91fb5..9ef9f09 100644 +--- a/meson.build ++++ b/meson.build +@@ -28,7 +28,7 @@ viewnior_deps = [ + dependency('gio-2.0', version: glib_ver), + dependency('shared-mime-info', version: '>= 0.20'), + dependency('gdk-pixbuf-2.0', version: '>= 0.21'), +- dependency('exiv2', version: '>= 0.21'), ++ dependency('exiv2', version: '>= 0.27'), + ] + # + +diff --git a/src/uni-exiv2.cpp b/src/uni-exiv2.cpp +index 0d14b9f..d03edd7 100644 +--- a/src/uni-exiv2.cpp ++++ b/src/uni-exiv2.cpp +@@ -22,12 +22,21 @@ + + #include + #include ++#include + + #include "uni-exiv2.hpp" + ++#if EXIV2_TEST_VERSION(0,28,0) ++ typedef Exiv2::Error Exiv2Error; ++ typedef Exiv2::Image::UniquePtr ImagePtr; ++#else ++ typedef Exiv2::AnyError Exiv2Error; ++ typedef Exiv2::Image::AutoPtr ImagePtr; ++#endif ++ + #define ARRAY_SIZE(array) (sizeof array/sizeof(array[0])) + +-static Exiv2::Image::AutoPtr cached_image; ++static ImagePtr cached_image; + + extern "C" + void +@@ -35,7 +44,7 @@ uni_read_exiv2_map(const char *uri, void (*callback)(const char*, const char*, v + { + Exiv2::LogMsg::setLevel(Exiv2::LogMsg::mute); + try { +- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(uri); ++ ImagePtr image = Exiv2::ImageFactory::open(uri); + if ( image.get() == 0 ) { + return; + } +@@ -80,7 +89,7 @@ uni_read_exiv2_map(const char *uri, void (*callback)(const char*, const char*, v + } + } + } +- } catch (Exiv2::AnyError& e) { ++ } catch (Exiv2Error& e) { + std::cerr << "Exiv2: '" << e << "'\n"; + } + } +@@ -103,7 +112,7 @@ uni_read_exiv2_to_cache(const char *uri) + } + + cached_image->readMetadata(); +- } catch (Exiv2::AnyError& e) { ++ } catch (Exiv2Error& e) { + std::cerr << "Exiv2: '" << e << "'\n"; + } + +@@ -121,7 +130,7 @@ uni_write_exiv2_from_cache(const char *uri) + } + + try { +- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(uri); ++ ImagePtr image = Exiv2::ImageFactory::open(uri); + if ( image.get() == 0 ) { + return 2; + } +@@ -133,7 +142,7 @@ uni_write_exiv2_from_cache(const char *uri) + cached_image.reset(NULL); + + return 0; +- } catch (Exiv2::AnyError& e) { ++ } catch (Exiv2Error& e) { + std::cerr << "Exiv2: '" << e << "'\n"; + } + +-- +2.41.0 + diff --git a/Makefile b/Makefile deleted file mode 100644 index 21176ed..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: viewnior -# $Id: Makefile,v 1.1 2009/09/24 04:24:48 kevin Exp $ -NAME := viewnior -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/changelog b/changelog new file mode 100644 index 0000000..867ab73 --- /dev/null +++ b/changelog @@ -0,0 +1,138 @@ +* Sat Jan 22 2022 Fedora Release Engineering - 1.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sat Dec 11 2021 Mukundan Ragavan - 1.8-1 +- Update to 1.8 + +* Fri Jul 23 2021 Fedora Release Engineering - 1.7-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 1.7-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.7-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 1.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Dec 05 2019 Kalev Lember - 1.7-7 +- Use upstream appdata file + +* Sat Jul 27 2019 Fedora Release Engineering - 1.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 1.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 30 2019 Rex Dieter - 1.7-4 +- rebuild (exiv2) + +* Mon Jul 16 2018 Mukundan Ragavan - 1.7-3 +- Add gcc-c++ as BR + +* Sat Jul 14 2018 Fedora Release Engineering - 1.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon May 14 2018 Mukundan Ragavan - 1.7-1 +- Update to 1.7 +- Update spec to use meson build system + +* Fri Feb 09 2018 Fedora Release Engineering - 1.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 18 2018 Igor Gnatenko - 1.6-7 +- Remove obsolete scriptlets + +* Thu Aug 03 2017 Fedora Release Engineering - 1.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue May 02 2017 Rex Dieter - 1.6-4 +- rebuild (exiv2) + +* Sat Feb 11 2017 Fedora Release Engineering - 1.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 1.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Dec 29 2015 Christoph Wickert - 1.6-1 +- Update to 1.6 + +* Wed Jun 24 2015 Rex Dieter - 1.5-3 +- rebuild (exiv2) + +* Fri Jun 19 2015 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Christoph Wickert - 1.5-1 +- Update to 1.5 + +* Thu Mar 26 2015 Richard Hughes - 1.4-3 +- Add an AppData file for the software center + +* Mon Aug 18 2014 Fedora Release Engineering - 1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jun 26 2014 Christoph Wickert - 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 - 1.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 1.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sun May 12 2013 Christoph Wickert - 1.3-4 +- Add aarch64 support (#926697) + +* Fri Feb 15 2013 Fedora Release Engineering - 1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Feb 27 2012 Christoph Wickert - 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 - 1.2-1 +- Update to 1.2 + +* Sat Feb 25 2012 Christoph Wickert - 1.1-4 +- Fix DSO linking error + +* Tue Dec 06 2011 Adam Jackson - 1.1-3 +- Rebuild for new libpng + +* Mon Feb 07 2011 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Dec 16 2010 Christoph Wickert - 1.1-1 +- Update to 1.1 +- Remove obsolete DSO patch +- Add new manpage + +* Wed Mar 31 2010 Christoph Wickert - 1.0-1 +- Update to 1.0 + +* Tue Feb 16 2010 Christoph Wickert - 0.7-2 +- Add patch to fix DSO linking (#565018) +- Switch to %%bcond macro + +* Mon Sep 07 2009 Christoph Wickert - 0.7-1 +- Update to 0.7 + +* Sat Sep 05 2009 Christoph Wickert - 0.6-2 +- Spec file cleanups from review. + +* Mon Aug 03 2009 Christoph Wickert - 0.6-1 +- Initial package diff --git a/import.log b/import.log deleted file mode 100644 index fb97fdc..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -viewnior-0_7-1_fc11:HEAD:viewnior-0.7-1.fc11.src.rpm:1253782866 diff --git a/sources b/sources index 5fc9a04..d461460 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c4db1ca78ea048c35e904a6a162d489b viewnior-0.7.tar.gz +SHA512 (viewnior-1.8.tar.gz) = 0f9698801172ef6b8f5df4132526b2e605e9aa9fd69cf41a091a3623de9b2e84ca857e625aaa9e83f29df318f70a13fb458bac0df11ae46837b78ef257a00bee diff --git a/viewnior-0.7-dsofix.patch b/viewnior-0.7-dsofix.patch deleted file mode 100644 index a50c89d..0000000 --- a/viewnior-0.7-dsofix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- viewnior-0.7.orig/src/Makefile.in 2009-09-06 10:26:22.000000000 +0200 -+++ viewnior-0.7/src/Makefile.in 2010-02-17 00:43:15.000000000 +0100 -@@ -134,7 +134,7 @@ - INTLTOOL_PERL = @INTLTOOL_PERL@ - INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ - LD = @LD@ --LDFLAGS = @LDFLAGS@ -+LDFLAGS = @LDFLAGS@ -lm - LIBOBJS = @LIBOBJS@ - LIBS = @LIBS@ - LIBTOOL = @LIBTOOL@ diff --git a/viewnior.spec b/viewnior.spec index 9d41e13..1432277 100644 --- a/viewnior.spec +++ b/viewnior.spec @@ -1,31 +1,30 @@ -# We don't build with Gnome support by default to avoid a GConf dependency. -# If you would like to set the Gnome background image with Viewnior, rebuild -# the srpm with: -# rpmbuild --rebuild viewnior-*-src.rpm --with gnome -# or use bcond_without to change the defaul -%bcond_with gnome - Name: viewnior -Version: 0.7 -Release: 1%{?dist} +Version: 1.8 +Release: %autorelease Summary: Elegant image viewer -Group: User Interface/X -License: GPLv3+ -URL: http://xsisqox.github.com/Viewnior -Source0: http://cloud.github.com/downloads/xsisqox/Viewnior/%{name}-%{version}.tar.gz -Patch0: viewnior-0.7-dsofix.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: gtk2-devel desktop-file-utils gettext intltool shared-mime-info -%if %{with gnome} -BuildRequires: GConf2-devel -%endif +License: GPL-3.0-or-later +URL: http://siyanpanayotov.com/project/viewnior/ +Source: https://github.com/hellosiyan/Viewnior/archive/%{name}-%{version}.tar.gz +Patch: 0001-Fix-build-with-exiv2-0.28.0-raise-minimum-to-0.27.0.patch +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 +BuildRequires: meson +BuildRequires: gnome-common +BuildRequires: gcc-c++ +BuildRequires: libappstream-glib +Requires: webp-pixbuf-loader %description Viewnior is an image viewer program. Created to be simple, fast and elegant. -It's minimalistic interface provides more screenspace for your images. Among +It's minimalistic interface provides more screen space for your images. Among its features are: * Fullscreen & Slideshow @@ -38,68 +37,33 @@ its features are: %prep -%setup -q -%patch0 -p1 -b .dsofix -# fix spurious executable perms -chmod 0644 AUTHORS ChangeLog COPYING NEWS README TODO src/* - +%autosetup -n Viewnior-%{name}-%{version} -p1 %build -%configure \ -%if %{with gnome} - --enable-wallpaper -%endif - -make %{?_smp_mflags} V=1 +%meson +%meson_build %install -rm -rf %{buildroot} -make install DESTDIR=%{buildroot} INSTALL='install -p' +%meson_install + %find_lang %{name} + desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop - -%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 || : +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.metainfo.xml %files -f %{name}.lang -%defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING NEWS README TODO +%license COPYING +%doc AUTHORS NEWS TODO %{_bindir}/%{name} +%{_metainfodir}/%{name}.metainfo.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/%{name}/ +%{_mandir}/man*/%{name}* %changelog -* Tue Feb 16 2010 Christoph Wickert - 0.7-2 -- Add patch to fix DSO linking (#565018) -- Switch to %%bcond macro - -* Mon Sep 07 2009 Christoph Wickert - 0.7-1 -- Update to 0.7 - -* Sat Sep 05 2009 Christoph Wickert - 0.6-2 -- Spec file cleanups from review. - -* Mon Aug 01 2009 Christoph Wickert - 0.6-1 -- Initial package +%autochangelog