3 %bcond_with xmlrpc # enable XmlRpc functionality
4 %bcond_without unicode # unicode version of wxGTK2
6 Summary: CHM viewer for UNIX
7 Summary(pl.UTF-8): Przeglądarka CHM dla Uniksów
12 Group: X11/Applications
13 Source0: http://downloads.sourceforge.net/xchm/%{name}-%{version}.tar.gz
14 # Source0-md5: 486d029bd81071a2d04e7181909b1602
15 Source1: %{name}.desktop
16 Patch0: wxWidgets3.patch
17 Patch1: %{name}-pl.po-update.patch
18 URL: http://xchm.sourceforge.net/
19 BuildRequires: autoconf >= 2.50
20 BuildRequires: automake
21 BuildRequires: chmlib-devel
22 BuildRequires: gettext-tools >= 0.14.3
23 BuildRequires: wxGTK2-%{?with_unicode:unicode-}devel >= 2.8.0
26 BuildRequires: openssl-devel
27 BuildRequires: xmlrpc++-devel
29 Requires(post,postun): desktop-file-utils
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 xCHM is a CHM viewer for UNIX, based on Jed Wing's CHMLIB and written
36 %description -l pl.UTF-8
37 xCHM to przeglądarka plików CHM dla Uniksa, napisana w oparciu o
38 CHMLIB Jeda Winga, z użyciem wxWidgets.
54 %{?with_xmlrpc:--enable-xmlrpc} \
55 WX_CONFIG_NAME=%{_bindir}/wx-gtk2-%{!?with_unicode:ansi}%{?with_unicode:unicode}-config
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
63 DESTDIR=$RPM_BUILD_ROOT
65 install art/xchm-48.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/xchm.xpm
66 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
68 # unify to short code pt=pt_PT
69 %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{pt_PT,pt}
70 # fix Greek language code
71 %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{gr,el}
76 rm -rf $RPM_BUILD_ROOT
79 %update_desktop_database
82 %update_desktop_database_postun
84 %files -f %{name}.lang
85 %defattr(644,root,root,755)
86 %doc AUTHORS ChangeLog README %{?with_xmlrpc:README.xmlrpc}
87 %attr(755,root,root) %{_bindir}/xchm
88 %{_desktopdir}/xchm.desktop
89 %{_pixmapsdir}/xchm*.png
90 %{_pixmapsdir}/xchm*.xpm