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