[packages/nomacs] - updated to 2.4.6 - added qt5 bcond
qboosh
qboosh at pld-linux.org
Mon Dec 7 17:50:35 CET 2015
commit cd4112e8c117fb301b09e46945f16b5e0dcd5edf
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Dec 7 17:51:30 2015 +0100
- updated to 2.4.6
- added qt5 bcond
nomacs.spec | 66 +++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 45 insertions(+), 21 deletions(-)
---
diff --git a/nomacs.spec b/nomacs.spec
index e4f254b..767249f 100644
--- a/nomacs.spec
+++ b/nomacs.spec
@@ -1,18 +1,21 @@
-%define qtver 4.7.0
+# TODO: system qpsd (http://sourceforge.net/projects/libqpsd/)
+#
+# Conditional build:
+%bcond_with qt5 # use Qt 5 instead of 4
+#
+%define qt4_ver 4.7.0
Summary: Lightweight image viewer
+Summary(pl.UTF-8): Lekka przeglądarka obrazków
Name: nomacs
-Version: 2.4.4
+Version: 2.4.6
Release: 1
License: GPL v3+
Group: X11/Applications
Source0: http://downloads.sourceforge.net/nomacs/%{name}-%{version}-source.tar.bz2
-# Source0-md5: 88c1e2f9adc37bbd4c2fbbc4b7aabd37
+# Source0-md5: a154966dc5c1fed71279bc70d8078935
Source1: %{name}.appdata.xml
URL: http://nomacs.org/
-BuildRequires: QtCore-devel >= %{qtver}
-BuildRequires: QtGui-devel >= %{qtver}
-BuildRequires: QtNetwork-devel >= %{qtver}
-BuildRequires: cmake
+BuildRequires: cmake >= 2.6
BuildRequires: desktop-file-utils
BuildRequires: dos2unix
BuildRequires: exiv2-devel >= 0.20
@@ -21,14 +24,27 @@ BuildRequires: libtiff-devel
BuildRequires: libwebp-devel >= 0.3.1
BuildRequires: opencv-devel >= 2.1.0
BuildRequires: pkgconfig
-BuildRequires: qt4-build >= %{qtver}
-BuildRequires: qt4-linguist >= %{qtver}
-BuildRequires: qt4-qmake >= %{qtver}
+%if %{with qt5}
+BuildRequires: Qt5Core-devel >= 5
+BuildRequires: Qt5Gui-devel >= 5
+BuildRequires: Qt5Network-devel >= 5
+BuildRequires: qt5-build >= 5
+BuildRequires: qt5-linguist >= 5
+BuildRequires: qt5-qmake >= 5
+BuildRequires: quazip-qt5-devel >= 0.7
+%else
+BuildRequires: QtCore-devel >= %{qt4_ver}
+BuildRequires: QtGui-devel >= %{qt4_ver}
+BuildRequires: QtNetwork-devel >= %{qt4_ver}
+BuildRequires: qt4-build >= %{qt4_ver}
+BuildRequires: qt4-linguist >= %{qt4_ver}
+BuildRequires: qt4-qmake >= %{qt4_ver}
BuildRequires: quazip-devel >= 0.7
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-nomacs is image viewer based on Qt4 library.
+nomacs is image viewer based on Qt 4 library.
nomacs is small, fast and able to handle the most common image
formats. Additionally it is possible to synchronize multiple viewers
@@ -36,36 +52,44 @@ running on the same computer or via LAN is possible. It allows to
compare images and spot the differences e.g. schemes of architects to
show the progress).
+%description -l pl.UTF-8
+nomacs to przeglądarka obrazków oparta na bibliotece Qt 4.
+
+nomacs jest mała, szybka i potrafi obsłużyć większość popularnych
+formatów obrazów. Ponadto możliwa jest synchronizacja wielu
+przeglądarek działających na tym samym komputerze lub poprzez sieć
+lokalną. Przeglądarka pozwala porównywać obrazki i wskazywać różnice,
+np. projekty architektów w celu pokazania postępów.
+
%prep
%setup -q
dos2unix Readme/*
-rm -r 3rdparty/libwebp
-rm -r 3rdparty/quazip-0.7
+%{__rm} -r 3rdparty/libwebp
+%{__rm} -r 3rdparty/quazip-0.7
%build
install -d build
cd build
%cmake \
+ %{?with_qt5:-DENABLE_QT5} \
-DENABLE_RAW=1 \
-DUSE_SYSTEM_WEBP=ON \
-DUSE_SYSTEM_QUAZIP=ON \
..
+# -DUSE_SYSTEM_LIBQPSD=ON
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-# the "als" hack, see below
-cp translations/nomacs_{az,als}.ts
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-# hack - wrong lang code "als" (http://www.nomacs.org/redmine/issues/228)
-# yes, the hack needs to be in make install, not in prep or build
-rm translations/nomacs_als.ts
-rm $RPM_BUILD_ROOT%{_datadir}/%{name}/translations/nomacs_als.qm
+# translation to German "Vorarlbergerisch" dialect - should be de_AT at Vorarlberg?
+# ("als" is wrong code - it's Tosk Albanian in iso-639-3)
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/translations/nomacs_als.qm
desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
@@ -85,9 +109,9 @@ rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(644,root,root,755)
-%doc Readme/[CLR]*
+%doc Readme/{COPYRIGHT,LICENSE.OPENCV,README}
%attr(755,root,root) %{_bindir}/%{name}
-%{_mandir}/man1/%{name}.*
+%{_mandir}/man1/%{name}.1*
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%{_datadir}/appdata/%{name}.appdata.xml
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nomacs.git/commitdiff/cd4112e8c117fb301b09e46945f16b5e0dcd5edf
More information about the pld-cvs-commit
mailing list