]> git.pld-linux.org Git - packages/nomacs.git/blob - nomacs.spec
update BR
[packages/nomacs.git] / nomacs.spec
1 %define qtver   4.7.0
2 Summary:        Lightweight image viewer
3 Name:           nomacs
4 Version:        2.4.4
5 Release:        1
6 License:        GPL v3+
7 Group:          X11/Applications
8 Source0:        http://downloads.sourceforge.net/nomacs/%{name}-%{version}-source.tar.bz2
9 # Source0-md5:  88c1e2f9adc37bbd4c2fbbc4b7aabd37
10 Source1:        %{name}.appdata.xml
11 URL:            http://nomacs.org/
12 BuildRequires:  QtCore-devel >= %{qtver}
13 BuildRequires:  QtGui-devel >= %{qtver}
14 BuildRequires:  QtNetwork-devel >= %{qtver}
15 BuildRequires:  cmake
16 BuildRequires:  desktop-file-utils
17 BuildRequires:  dos2unix
18 BuildRequires:  exiv2-devel >= 0.20
19 BuildRequires:  libraw-devel >= 0.12.0
20 BuildRequires:  libtiff-devel
21 BuildRequires:  libwebp-devel >= 0.3.1
22 BuildRequires:  opencv-devel >= 2.1.0
23 BuildRequires:  pkgconfig
24 BuildRequires:  qt4-build >= %{qtver}
25 BuildRequires:  qt4-linguist >= %{qtver}
26 BuildRequires:  qt4-qmake >= %{qtver}
27 BuildRequires:  quazip-devel >= 0.7
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 nomacs is image viewer based on Qt4 library.
32
33 nomacs is small, fast and able to handle the most common image
34 formats. Additionally it is possible to synchronize multiple viewers
35 running on the same computer or via LAN is possible. It allows to
36 compare images and spot the differences e.g. schemes of architects to
37 show the progress).
38
39 %prep
40 %setup -q
41
42 dos2unix Readme/*
43
44 rm -r 3rdparty/libwebp
45 rm -r 3rdparty/quazip-0.7
46
47 %build
48 install -d build
49 cd build
50 %cmake \
51         -DENABLE_RAW=1 \
52         -DUSE_SYSTEM_WEBP=ON \
53         -DUSE_SYSTEM_QUAZIP=ON \
54         ..
55 %{__make}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 # the "als" hack, see below
60 cp translations/nomacs_{az,als}.ts
61
62 %{__make} -C build install \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 # hack - wrong lang code "als" (http://www.nomacs.org/redmine/issues/228)
66 # yes, the hack needs to be in make install, not in prep or build
67 rm translations/nomacs_als.ts
68 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/translations/nomacs_als.qm
69
70 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
71
72 install -d $RPM_BUILD_ROOT%{_datadir}/appdata
73 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
74
75 %find_lang %{name} --with-qm --without-mo
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 %update_desktop_database
82
83 %postun
84 %update_desktop_database
85
86 %files -f %{name}.lang
87 %defattr(644,root,root,755)
88 %doc Readme/[CLR]*
89 %attr(755,root,root) %{_bindir}/%{name}
90 %{_mandir}/man1/%{name}.*
91 %dir %{_datadir}/%{name}
92 %dir %{_datadir}/%{name}/translations
93 %{_datadir}/appdata/%{name}.appdata.xml
94 %{_desktopdir}/%{name}.desktop
95 %{_pixmapsdir}/%{name}.png
This page took 0.102 seconds and 3 git commands to generate.