]>
Commit | Line | Data |
---|---|---|
0737485d SS |
1 | # |
2 | # Conditional build: | |
54c8bc28 | 3 | %bcond_with xmlrpc # enable XmlRpc functionality |
15c4ea6e | 4 | %bcond_without unicode # unicode version of wxGTK2 |
0737485d | 5 | # |
2c36c409 | 6 | Summary: CHM viewer for UNIX |
197b693a | 7 | Summary(pl.UTF-8): Przeglądarka CHM dla Uniksów |
2c36c409 | 8 | Name: xchm |
3ebfd479 | 9 | Version: 1.20 |
2c2f21ec | 10 | Release: 1 |
54c8bc28 | 11 | License: GPL v2+ |
15c4ea6e | 12 | Group: X11/Applications |
54c8bc28 | 13 | Source0: http://downloads.sourceforge.net/xchm/%{name}-%{version}.tar.gz |
3ebfd479 | 14 | # Source0-md5: 85943645d20af536704a20b58ebd5849 |
7f2fd160 | 15 | Source1: %{name}.desktop |
3ebfd479 | 16 | Patch0: %{name}-pl.po-update.patch |
2c36c409 | 17 | URL: http://xchm.sourceforge.net/ |
643c0d3b JB |
18 | BuildRequires: autoconf |
19 | BuildRequires: automake | |
2c36c409 | 20 | BuildRequires: chmlib-devel |
ff7c3131 | 21 | BuildRequires: gettext-devel >= 0.14.3 |
54c8bc28 JB |
22 | BuildRequires: wxGTK2-%{?with_unicode:unicode-}devel >= 2.8.0 |
23 | %if %{with xmlrpc} | |
24 | # for configure check | |
25 | BuildRequires: openssl-devel | |
26 | BuildRequires: xmlrpc++-devel | |
27 | %endif | |
15c4ea6e | 28 | Requires(post,postun): desktop-file-utils |
2c36c409 | 29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
3b0e2068 MC |
32 | xCHM is a CHM viewer for UNIX, based on Jed Wing's CHMLIB and written |
33 | with wxWidgets. | |
643c0d3b | 34 | |
8a169a41 JR |
35 | %description -l pl.UTF-8 |
36 | xCHM to przeglądarka plików CHM dla Uniksa, napisana w oparciu o | |
37 | CHMLIB Jeda Winga, z użyciem wxWidgets. | |
2c36c409 | 38 | |
39 | %prep | |
643c0d3b | 40 | %setup -q |
3ebfd479 JB |
41 | %patch0 -p1 |
42 | ||
43 | %{__rm} po/stamp-po | |
2c36c409 | 44 | |
45 | %build | |
731860bf | 46 | %{__gettextize} |
2c36c409 | 47 | %{__aclocal} |
48 | %{__autoconf} | |
49 | %{__autoheader} | |
50 | %{__automake} | |
643c0d3b | 51 | %configure \ |
0737485d | 52 | %{?with_xmlrpc:--enable-xmlrpc} \ |
2f238a7e | 53 | WX_CONFIG_NAME=%{_bindir}/wx-gtk2-%{!?with_unicode:ansi}%{?with_unicode:unicode}-config |
2c36c409 | 54 | %{__make} |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
7f2fd160 | 58 | install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} |
59 | ||
643c0d3b JB |
60 | %{__make} install \ |
61 | DESTDIR=$RPM_BUILD_ROOT | |
2c36c409 | 62 | |
7f2fd160 | 63 | install art/xchm-48.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/xchm.xpm |
64 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} | |
65 | ||
dda56b94 JB |
66 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{pt_PT,pt} |
67 | ||
731860bf JB |
68 | %find_lang %{name} |
69 | ||
2c36c409 | 70 | %clean |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
15c4ea6e MB |
73 | %post |
74 | %update_desktop_database | |
75 | ||
76 | %postun | |
77 | %update_desktop_database_postun | |
78 | ||
731860bf | 79 | %files -f %{name}.lang |
2c36c409 | 80 | %defattr(644,root,root,755) |
54c8bc28 | 81 | %doc AUTHORS ChangeLog README %{?with_xmlrpc:README.xmlrpc} |
15c4ea6e MB |
82 | %attr(755,root,root) %{_bindir}/xchm |
83 | %{_desktopdir}/xchm.desktop | |
54c8bc28 | 84 | %{_pixmapsdir}/xchm*.xpm |