]> git.pld-linux.org Git - packages/xchm.git/blobdiff - xchm.spec
- rebuild with gtk3 and wxWidgets 3.2, rel 5
[packages/xchm.git] / xchm.spec
index 48b822b7942e9efdfdf79a51f8714cb45c8d167e..7d2f9c733569bb8bfaab7d7b89250192045c1d96 100644 (file)
--- a/xchm.spec
+++ b/xchm.spec
@@ -1,35 +1,47 @@
+#
+# 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:       1.2
-Release:       1
-License:       GPL
-Group:         Applications/File
-Source0:       http://dl.sourceforge.net/xchm/%{name}-%{version}.tar.gz
-# Source0-md5: 17f2cda873f61470636dbfeebb4a531d
+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:                %{name}-pl.po-update.patch
+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: gettext-devel >= 0.11
-BuildRequires: wxGTK2-devel >= 2.6.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 wxWidgets.
 
-%description -l pl
-xCHM to przegl±darka plików CHM dla Uniksa, napisana w oparciu o
-CHMLIB Jeda Winga, z u¿yciem wxWidgets.
+%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 -f po/stamp-po
+%{__rm} po/stamp-po
 
 %build
 %{__gettextize}
@@ -38,12 +50,12 @@ rm -f po/stamp-po
 %{__autoheader}
 %{__automake}
 %configure \
-       WX_CONFIG_NAME=/usr/bin/wx-gtk2-ansi-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 \
@@ -52,14 +64,26 @@ install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}}
 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
 
+%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}/*
-%{_desktopdir}/*
-%{_pixmapsdir}/*.xpm
+%doc AUTHORS ChangeLog README %{?with_xmlrpc:README.xmlrpc}
+%attr(755,root,root) %{_bindir}/xchm
+%{_desktopdir}/xchm.desktop
+%{_pixmapsdir}/xchm*.png
+%{_pixmapsdir}/xchm*.xpm
This page took 0.155685 seconds and 4 git commands to generate.