]> git.pld-linux.org Git - packages/nomacs.git/blob - nomacs.spec
cflags hack not needed in pld
[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         -DENABLE_RAW=1 \
45         -DUSE_SYSTEM_WEBP=ON \
46         -DUSE_SYSTEM_QUAZIP=ON \
47         ..
48 %{__make}
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 # the "als" hack, see below
53 cp translations/nomacs_{az,als}.ts
54
55 %{__make} -C build install \
56         DESTDIR=$RPM_BUILD_ROOT
57
58 # hack - wrong lang code "als" (http://www.nomacs.org/redmine/issues/228)
59 # yes, the hack needs to be in make install, not in prep or build
60 rm translations/nomacs_als.ts
61 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/translations/nomacs_als.qm
62
63 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
64
65 install -d $RPM_BUILD_ROOT%{_datadir}/appdata
66 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
67
68 %find_lang %{name} --with-qm --without-mo
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %post
74 %update_desktop_database
75
76 %postun
77 %update_desktop_database
78
79 %files -f %{name}.lang
80 %defattr(644,root,root,755)
81 %doc Readme/[CLR]*
82 %attr(755,root,root) %{_bindir}/%{name}
83 %{_mandir}/man1/%{name}.*
84 %dir %{_datadir}/%{name}
85 %dir %{_datadir}/%{name}/translations
86 %{_datadir}/appdata/%{name}.appdata.xml
87 %{_desktopdir}/%{name}.desktop
88 %{_pixmapsdir}/%{name}.png
This page took 0.118294 seconds and 3 git commands to generate.