Blob Blame History Raw
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           uniconvertor
Version:        1.1.1
Release:        1%{?dist}
Summary:        Universal vector graphics translator

Group:          Applications/Multimedia
License:        LGPLv2+ and GPLv2+ and MIT
URL:            http://sk1project.org/modules.php?name=Products&product=uniconvertor
Source0:        http://sk1project.org/downloads/uniconvertor/%{name}-%{version}.tar.gz
Patch0:         UniConvertor-1.1.0-simplify.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel
Requires:       python-imaging


%description
UniConvertor is a universal vector graphics translator.
It uses sK1 engine to convert one format to another.


%prep
%setup -q -n UniConvertor-%{version}
%patch0 -p1 -b .simplify

# Prepare for inclusion into documentation part
install -p -m644 src/COPYRIGHTS COPYRIGHTS
install -p -m644 src/GNU_GPL_v2 GNU_GPL_v2
install -p -m644 src/GNU_LGPL_v2 GNU_LGPL_v2


%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT 

# Fix permissions
chmod a+x $RPM_BUILD_ROOT%{python_sitearch}/uniconvertor/__init__.py
chmod g-w $RPM_BUILD_ROOT%{python_sitearch}/uniconvertor/app/modules/*.so

# Don't duplicate documentation
rm -f $RPM_BUILD_ROOT%{python_sitearch}/uniconvertor/{COPYRIGHTS,GNU_GPL_v2,GNU_LGPL_v2}

# Satisfy rpmlint claim on debuginfo subpackage
chmod 644 src/modules/*/*.{c,h}

# Rename uniconv script due to conflicts with netatalk
# (https://bugzilla.redhat.com/show_bug.cgi?id=405011)
mv $RPM_BUILD_ROOT%{_bindir}/uniconv $RPM_BUILD_ROOT%{_bindir}/uniconvertor


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README
%doc COPYRIGHTS GNU_GPL_v2 GNU_LGPL_v2
%{_bindir}/uniconvertor
%{python_sitearch}/*


%changelog
* Wed Feb 13 2008 Andy Shevchenko <andy@smile.org.ua> 1.1.1-1
- update to 1.1.1

* Sat Jan 12 2008 Andy Shevchenko <andy@smile.org.ua> 1.1.0-1
- update to 1.1.0

* Thu Nov 29 2007 Andy Shevchenko <andy@smile.org.ua> 1.0.0-5
- fix conflict with netatalk: rename uniconv to uniconvertor (#405011)

* Thu Nov 22 2007 Andy Shevchenko <andy@smile.org.ua> 1.0.0-4
- use python_sitearch and CFLAGS

* Thu Nov 22 2007 Andy Shevchenko <andy@smile.org.ua> 1.0.0-3
- prepare to include to Fedora
  (https://bugzilla.redhat.com/show_bug.cgi?id=393971)

* Tue Nov 20 2007 Andy Shevchenko <andy@smile.org.ua> 1.0.0-2
- adjust License: tag (thanks Tom 'spot' Callaway)

* Thu Nov 15 2007 Andy Shevchenko <andy@smile.org.ua> 1.0.0-1
- initial build