sergiomb / rpms / nomacs

Forked from rpms/nomacs 5 years ago
Clone
Blob Blame History Raw
Name:		nomacs
Version:	3.0.0
Release:	2%{?dist}
License:	GPLv3+
Url:		http://nomacs.org
Source0:	http://downloads.sourceforge.net/%{name}/%{name}-%{version}-source.tar.bz2
Summary:	Lightweight image viewer
BuildRequires:	cmake, dos2unix, desktop-file-utils
#BuildRequires:	pkgconfig(QtGui) >= 4.7
BuildRequires:	pkgconfig(Qt5Gui)
BuildRequires:	pkgconfig(Qt5Svg)
BuildRequires:	qt5-linguist
# exiv2-devel
BuildRequires:	pkgconfig(exiv2) >= 0.20
# opencv-devel
BuildRequires:	pkgconfig(opencv) >= 2.1.0
# LibRaw-devel
BuildRequires:	pkgconfig(libraw) >= 0.12.0
# libtiff-devel
BuildRequires:	pkgconfig(libtiff-4)
# libwebp-devel >= 0.3.1
BuildRequires:	pkgconfig(libwebp)
# quazip-devel >= 0.7
BuildRequires:	quazip-devel

%description
nomacs is image viewer based on Qt5 library.
nomacs is small, fast and able to handle the most common image formats.
Additionally it is possible to synchronize multiple viewers
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).


%prep
%setup0 -q
dos2unix Readme/*
rm -rf 3rdparty/libwebp
#rm -rf 3rdparty/quazip-0.7


%build
mkdir build
pushd build
# builtin quazip because of qt5
%cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2" -DENABLE_RAW=1 -DUSE_SYSTEM_WEBP=ON -DUSE_SYSTEM_QUAZIP=OFF ..
make %{?_smp_mflags}
popd


%post
/usr/bin/update-desktop-database &> /dev/null || :


%postun
/usr/bin/update-desktop-database &> /dev/null || :


%install
pushd build
make DESTDIR=%{buildroot} install
popd
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
# hack - wrong lang code "als" (http://www.nomacs.org/redmine/issues/228)
rm -f translations/nomacs_als.ts
rm -f %{buildroot}/%{_datadir}/%{name}/translations/nomacs_als.qm

# 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: http://www.nomacs.org/redmine/issues/364
SentUpstream: 2014-09-22
-->
<application>
  <id type="desktop">nomacs.desktop</id>
  <metadata_license>CC0-1.0</metadata_license>
  <summary>View and edit images</summary>
  <description>
    <p>
      Nomacs is a fast image viewer with additional image editing functionality.
      When viewing images, it features fast thumbnail previews, a zoomable grid
      display of thumbnails, a chromeless view, and display of metadata and
      image details with a histogram.
      It also has the ability to edit images, including cropping, resizing,
      rotating and color correction.
    </p>
  </description>
  <url type="homepage">http://nomacs.org</url>
  <screenshots>
    <screenshot type="default">https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/nomacs/a.png</screenshot>
  </screenshots>
</application>
EOF

%find_lang %{name} --with-qt --without-mo


%files -f %{name}.lang
%doc Readme/[CLR]*
%{_bindir}/%{name}
%{_libdir}/libnomacslib.so
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/translations/
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/%{name}.*


%changelog
* Tue Dec 29 2015 Kalev Lember <klember@redhat.com> - 3.0.0-2
- Rebuilt for libwebp soname bump

* Fri Dec 18 2015 TI_Eugene <ti.eugene@gmail.com> 3.0.0-1
- Version bump

* Thu Aug 20 2015 Jon Ciesla <limburgher@gmail.com> - 2.6.4-2
- Rebuild for new LibRaw.

* Thu Aug 20 2015 TI_Eugene <ti.eugene@gmail.com> 2.6.4-1
- Version bump

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

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

* Wed Apr 15 2015 TI_Eugene <ti.eugene@gmail.com> 2.4.4-1
- Version bump

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

* Tue Mar 03 2015 TI_Eugene <ti.eugene@gmail.com> 2.4.2-2
- Version bump.

* Sun Nov 16 2014 TI_Eugene <ti.eugene@gmail.com> 2.2.0-2
- Use system libwebp and quazip.

* Thu Nov 13 2014 TI_Eugene <ti.eugene@gmail.com> 2.2.0-1
- Version bump.

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

* Thu Jul 31 2014 TI_Eugene <ti.eugene@gmail.com> 2.0.2-1
- Version bump.

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

* Fri Feb 21 2014 TI_Eugene <ti.eugene@gmail.com> 1.6.4-1
- Version bump.

* Wed Jan 22 2014 Jon Ciesla <limburgher@gmail.com> 1.6.2-2
- Rebuild for new LibRaw.

* Fri Dec 20 2013 TI_Eugene <ti.eugene@gmail.com> 1.6.2-1
- Version bump.

* Tue Dec 03 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.6.0.2-2
- rebuild (exiv2)

* Wed Oct 23 2013 TI_Eugene <ti.eugene@gmail.com> 1.6.0.2-1
- Version bump (hotfix).

* Wed Oct 16 2013 TI_Eugene <ti.eugene@gmail.com> 1.6.0-1
- Version bump.

* Mon Jul 15 2013 TI_Eugene <ti.eugene@gmail.com> 1.4.0-1
- Version bump.
- BR libtiff-devel added

* Sat Jun 15 2013 TI_Eugene <ti.eugene@gmail.com> 1.2.0-1
- Version bump.
- %%find_lang macro added
- _als translation removed

* Fri May 31 2013 Jon Ciesla <limburgher@gmail.com> 1.0.2-4
- Rebuild for new LibRaw.

* Tue Apr 09 2013 TI_Eugene <ti.eugene@gmail.com> 1.0.2-3
- CXX flags - -O3 only

* Tue Apr 09 2013 TI_Eugene <ti.eugene@gmail.com> 1.0.2-2
- CXX flags added to %%cmake macro

* Sun Apr 07 2013 TI_Eugene <ti.eugene@gmail.com> 1.0.2-1
- next version
- source url fixed
- description update (removed "free", "windows", licensing)
- update-desktop-database added

* Fri Mar 29 2013 TI_Eugene <ti.eugene@gmail.com> 1.0.0-3
- BuildRequires libraries versions defined

* Fri Mar 29 2013 TI_Eugene <ti.eugene@gmail.com> 1.0.0-2
- disabled EL6/CentOS6 build (due qt < 4.7)

* Fri Mar 29 2013 TI_Eugene <ti.eugene@gmail.com> 1.0.0-1
- initial packaging for Fedora