%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: archmage
Version: 0.0.7
Release: 3%{?dist}
Summary: Extensible reader/decompiler of files in CHM format
Group: Development/Tools
License: GPL
URL: http://archmage.sourceforge.net/
Source0: http://dl.sourceforge.net/sourceforge/archmage/archmage-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: python-chm
BuildRequires: python
Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
%description
arCHMage - extensible reader/decompiler of files in CHM format
(Microsoft HTML help, also known as Compiled HTML).
arCHMage is based on chmlib by Jed Wing and is written on python.
%prep
%setup -q
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_mandir}/man1/
install -m644 debian/archmage.1 $RPM_BUILD_ROOT%{_mandir}/man1/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING README
%dir %{_sysconfdir}/archmage/
%config(noreplace) %{_sysconfdir}/archmage/arch.conf
%{_bindir}/archmage
%{python_sitelib}/archmod/
%{_datadir}/archmage/
%{_mandir}/man*/archmage*
%changelog
* Sat Dec 9 2006 Patrice Dumas <pertusus@free.fr> 0.0.7-3
- rebuild for python 2.5
* Tue Sep 12 2006 Patrice Dumas <pertusus@free.fr> 0.0.7-2
- .pyo files added. Bug #205369
- BuildRequires: python and not python-devel since it is noarch
* Mon Mar 20 2006 Patrice Dumas <pertusus@free.fr> 0.0.7-1
- initial release