]>
Commit | Line | Data |
---|---|---|
cd4112e8 JB |
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 | |
baec5b45 | 7 | Summary: Lightweight image viewer |
cd4112e8 | 8 | Summary(pl.UTF-8): Lekka przeglądarka obrazków |
baec5b45 | 9 | Name: nomacs |
cd4112e8 | 10 | Version: 2.4.6 |
83ef27d4 | 11 | Release: 3 |
baec5b45 ER |
12 | License: GPL v3+ |
13 | Group: X11/Applications | |
14 | Source0: http://downloads.sourceforge.net/nomacs/%{name}-%{version}-source.tar.bz2 | |
cd4112e8 | 15 | # Source0-md5: a154966dc5c1fed71279bc70d8078935 |
8861805b | 16 | Source1: %{name}.appdata.xml |
baec5b45 | 17 | URL: http://nomacs.org/ |
cd4112e8 | 18 | BuildRequires: cmake >= 2.6 |
baec5b45 ER |
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 | |
8861805b | 26 | BuildRequires: pkgconfig |
cd4112e8 JB |
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} | |
baec5b45 | 42 | BuildRequires: quazip-devel >= 0.7 |
cd4112e8 | 43 | %endif |
baec5b45 ER |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %description | |
cd4112e8 | 47 | nomacs is image viewer based on Qt 4 library. |
baec5b45 ER |
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 | ||
cd4112e8 JB |
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 | ||
baec5b45 ER |
64 | %prep |
65 | %setup -q | |
66 | ||
67 | dos2unix Readme/* | |
68 | ||
cd4112e8 JB |
69 | %{__rm} -r 3rdparty/libwebp |
70 | %{__rm} -r 3rdparty/quazip-0.7 | |
baec5b45 ER |
71 | |
72 | %build | |
73 | install -d build | |
74 | cd build | |
75 | %cmake \ | |
cd4112e8 | 76 | %{?with_qt5:-DENABLE_QT5} \ |
baec5b45 ER |
77 | -DENABLE_RAW=1 \ |
78 | -DUSE_SYSTEM_WEBP=ON \ | |
79 | -DUSE_SYSTEM_QUAZIP=ON \ | |
80 | .. | |
cd4112e8 | 81 | # -DUSE_SYSTEM_LIBQPSD=ON |
baec5b45 ER |
82 | %{__make} |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
baec5b45 ER |
86 | |
87 | %{__make} -C build install \ | |
88 | DESTDIR=$RPM_BUILD_ROOT | |
89 | ||
cd4112e8 JB |
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 | |
baec5b45 ER |
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) | |
cd4112e8 | 112 | %doc Readme/{COPYRIGHT,LICENSE.OPENCV,README} |
baec5b45 | 113 | %attr(755,root,root) %{_bindir}/%{name} |
cd4112e8 | 114 | %{_mandir}/man1/%{name}.1* |
baec5b45 ER |
115 | %dir %{_datadir}/%{name} |
116 | %dir %{_datadir}/%{name}/translations | |
117 | %{_datadir}/appdata/%{name}.appdata.xml | |
118 | %{_desktopdir}/%{name}.desktop | |
119 | %{_pixmapsdir}/%{name}.png |