]> git.pld-linux.org Git - packages/nomacs.git/blob - nomacs.spec
- release 3 (by relup.sh)
[packages/nomacs.git] / nomacs.spec
1 # TODO: system qpsd (http://sourceforge.net/projects/libqpsd/)
2 #
3 # Conditional build:
4 %bcond_with     qt5     # use Qt 5 instead of 4
5 #
6 %define qt4_ver 4.7.0
7 Summary:        Lightweight image viewer
8 Summary(pl.UTF-8):      Lekka przeglądarka obrazków
9 Name:           nomacs
10 Version:        2.4.6
11 Release:        3
12 License:        GPL v3+
13 Group:          X11/Applications
14 Source0:        http://downloads.sourceforge.net/nomacs/%{name}-%{version}-source.tar.bz2
15 # Source0-md5:  a154966dc5c1fed71279bc70d8078935
16 Source1:        %{name}.appdata.xml
17 URL:            http://nomacs.org/
18 BuildRequires:  cmake >= 2.6
19 BuildRequires:  desktop-file-utils
20 BuildRequires:  dos2unix
21 BuildRequires:  exiv2-devel >= 0.20
22 BuildRequires:  libraw-devel >= 0.12.0
23 BuildRequires:  libtiff-devel
24 BuildRequires:  libwebp-devel >= 0.3.1
25 BuildRequires:  opencv-devel >= 2.1.0
26 BuildRequires:  pkgconfig
27 %if %{with qt5}
28 BuildRequires:  Qt5Core-devel >= 5
29 BuildRequires:  Qt5Gui-devel >= 5
30 BuildRequires:  Qt5Network-devel >= 5
31 BuildRequires:  qt5-build >= 5
32 BuildRequires:  qt5-linguist >= 5
33 BuildRequires:  qt5-qmake >= 5
34 BuildRequires:  quazip-qt5-devel >= 0.7
35 %else
36 BuildRequires:  QtCore-devel >= %{qt4_ver}
37 BuildRequires:  QtGui-devel >= %{qt4_ver}
38 BuildRequires:  QtNetwork-devel >= %{qt4_ver}
39 BuildRequires:  qt4-build >= %{qt4_ver}
40 BuildRequires:  qt4-linguist >= %{qt4_ver}
41 BuildRequires:  qt4-qmake >= %{qt4_ver}
42 BuildRequires:  quazip-devel >= 0.7
43 %endif
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 nomacs is image viewer based on Qt 4 library.
48
49 nomacs is small, fast and able to handle the most common image
50 formats. Additionally it is possible to synchronize multiple viewers
51 running on the same computer or via LAN is possible. It allows to
52 compare images and spot the differences e.g. schemes of architects to
53 show the progress).
54
55 %description -l pl.UTF-8
56 nomacs to przeglądarka obrazków oparta na bibliotece Qt 4.
57
58 nomacs jest mała, szybka i potrafi obsłużyć większość popularnych
59 formatów obrazów. Ponadto możliwa jest synchronizacja wielu
60 przeglądarek działających na tym samym komputerze lub poprzez sieć
61 lokalną. Przeglądarka pozwala porównywać obrazki i wskazywać różnice,
62 np. projekty architektów w celu pokazania postępów.
63
64 %prep
65 %setup -q
66
67 dos2unix Readme/*
68
69 %{__rm} -r 3rdparty/libwebp
70 %{__rm} -r 3rdparty/quazip-0.7
71
72 %build
73 install -d build
74 cd build
75 %cmake \
76         %{?with_qt5:-DENABLE_QT5} \
77         -DENABLE_RAW=1 \
78         -DUSE_SYSTEM_WEBP=ON \
79         -DUSE_SYSTEM_QUAZIP=ON \
80         ..
81 # -DUSE_SYSTEM_LIBQPSD=ON
82 %{__make}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %{__make} -C build install \
88         DESTDIR=$RPM_BUILD_ROOT
89
90 # translation to German "Vorarlbergerisch" dialect - should be de_AT@Vorarlberg?
91 # ("als" is wrong code - it's Tosk Albanian in iso-639-3)
92 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/translations/nomacs_als.qm
93
94 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
95
96 install -d $RPM_BUILD_ROOT%{_datadir}/appdata
97 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
98
99 %find_lang %{name} --with-qm --without-mo
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post
105 %update_desktop_database
106
107 %postun
108 %update_desktop_database
109
110 %files -f %{name}.lang
111 %defattr(644,root,root,755)
112 %doc Readme/{COPYRIGHT,LICENSE.OPENCV,README}
113 %attr(755,root,root) %{_bindir}/%{name}
114 %{_mandir}/man1/%{name}.1*
115 %dir %{_datadir}/%{name}
116 %dir %{_datadir}/%{name}/translations
117 %{_datadir}/appdata/%{name}.appdata.xml
118 %{_desktopdir}/%{name}.desktop
119 %{_pixmapsdir}/%{name}.png
This page took 0.093118 seconds and 3 git commands to generate.