]> git.pld-linux.org Git - packages/xchm.git/blobdiff - xchm.spec
- up to 1.16
[packages/xchm.git] / xchm.spec
index 2ca96afe4d8b2c719c9bc2d328e203b8c86449b6..7254977486d802abe6fe58e0314858937f7c613c 100644 (file)
--- a/xchm.spec
+++ b/xchm.spec
@@ -1,30 +1,40 @@
+#
+# Conditional build:
+%bcond_with    xmlrpc          # Enable XmlRpc functionality
+%bcond_without unicode         # unicode version of wxGTK2
+#
 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.9.3
+Version:       1.16
 Release:       1
 License:       GPL
-Group:         Applications/File
+Group:         X11/Applications
 Source0:       http://dl.sourceforge.net/xchm/%{name}-%{version}.tar.gz
-# Source0-md5: 9ed409d501a00d78fd32e1582fca2e34
+# Source0-md5: bf3449c26ea2177edea056a75534e04b
+Source1:       %{name}.desktop
+Patch0:                %{name}-inttypes.patch
 URL:           http://xchm.sourceforge.net/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: chmlib-devel
-BuildRequires: gettext-devel >= 0.11
-BuildRequires: wxGTK2-devel >= 2.4.0
+BuildRequires: gettext-devel >= 0.14.3
+BuildRequires: wxGTK2-%{?with_unicode:unicode-}devel >= 2.6.0
+%{?with_xmlrpc:BuildRequires:  xmlrpc++-devel}
+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
 
 %build
 %{__gettextize}
@@ -33,22 +43,40 @@ CHMLIB Jeda Winga, z u
 %{__autoheader}
 %{__automake}
 %configure \
-       WX_CONFIG_NAME=/usr/bin/wxgtk2-2.4-config
-
+       %{?with_xmlrpc:--enable-xmlrpc} \
+       WX_CONFIG_NAME=%{_bindir}/wx-gtk2-%{!?with_unicode:ansi}%{?with_unicode: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}
+
+mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{pt_PT,pt}
+
 %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}/*
+%if %{with xmlrpc}
+%doc README.xmlrpc
+%endif
+%attr(755,root,root) %{_bindir}/xchm
+%{_desktopdir}/xchm.desktop
+%{_pixmapsdir}/*.xpm
This page took 0.102406 seconds and 4 git commands to generate.