X-Git-Url: https://git.pld-linux.org/?p=packages%2Fxchm.git;a=blobdiff_plain;f=xchm.spec;h=7d2f9c733569bb8bfaab7d7b89250192045c1d96;hp=07bf95741f7a5fa103557189f0b8fd68bd8da839;hb=HEAD;hpb=33b3e78b3b580acfd10790286e2dff79e38f2f14 diff --git a/xchm.spec b/xchm.spec index 07bf957..7d2f9c7 100644 --- a/xchm.spec +++ b/xchm.spec @@ -1,50 +1,89 @@ +# +# Conditional build: +%bcond_with xmlrpc # enable XmlRpc functionality +# Summary: CHM viewer for UNIX -Summary(pl): Przegl±darka CHM dla uniksów +Summary(pl.UTF-8): Przeglądarka CHM dla Uniksów Name: xchm -Version: 0.8.2 -Release: 1 -License: GPL -Group: Applications/File -Source0: http://dl.sourceforge.net/xchm/%{name}-%{version}.tar.gz -# Source0-md5: acd889c5416042ea56cc3bd3d8bbc0bd +Version: 1.23 +Release: 5 +License: GPL v2+ +Group: X11/Applications +Source0: http://downloads.sourceforge.net/xchm/%{name}-%{version}.tar.gz +# Source0-md5: 486d029bd81071a2d04e7181909b1602 +Source1: %{name}.desktop +Patch0: wxWidgets3.patch +Patch1: %{name}-pl.po-update.patch URL: http://xchm.sourceforge.net/ -BuildRequires: autoconf +BuildRequires: autoconf >= 2.50 BuildRequires: automake BuildRequires: chmlib-devel -BuildRequires: wxGTK2-devel >= 2.4.0 +BuildRequires: gettext-tools >= 0.14.3 +BuildRequires: wxGTK3-unicode-devel >= 2.8.0 +%if %{with xmlrpc} +# for configure check +BuildRequires: openssl-devel +BuildRequires: xmlrpc++-devel +%endif +Requires(post,postun): desktop-file-utils BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -XCHM is a CHM viewer for UNIX, based on Jed Wing's CHMLIB and written -with wxWindows. +xCHM is a CHM viewer for UNIX, based on Jed Wing's CHMLIB and written +with wxWidgets. -%description -l pl -XCHM to przegl±darka plików CHM dla uniksa, napisana w oparciu o -CHMLIB Jeda Winga, z u¿yciem wxWindows. +%description -l pl.UTF-8 +xCHM to przeglądarka plików CHM dla Uniksa, napisana w oparciu o +CHMLIB Jeda Winga, z użyciem wxWidgets. %prep %setup -q +%patch0 -p1 +%patch1 -p1 + +%{__rm} po/stamp-po %build +%{__gettextize} %{__aclocal} %{__autoconf} %{__autoheader} %{__automake} %configure \ - WX_CONFIG_NAME=/usr/bin/wxgtk2-2.4-config - + %{?with_xmlrpc:--enable-xmlrpc} \ + WX_CONFIG_NAME=%{_bindir}/wx-gtk3-unicode-config %{__make} %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +install art/xchm-48.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/xchm.xpm +install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} + +# unify to short code pt=pt_PT +%{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{pt_PT,pt} +# fix Greek language code +%{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{gr,el} + +%find_lang %{name} + %clean rm -rf $RPM_BUILD_ROOT -%files +%post +%update_desktop_database + +%postun +%update_desktop_database_postun + +%files -f %{name}.lang %defattr(644,root,root,755) -%doc AUTHORS ChangeLog README -%attr(755,root,root) %{_bindir}/* +%doc AUTHORS ChangeLog README %{?with_xmlrpc:README.xmlrpc} +%attr(755,root,root) %{_bindir}/xchm +%{_desktopdir}/xchm.desktop +%{_pixmapsdir}/xchm*.png +%{_pixmapsdir}/xchm*.xpm