[uniconvertor] First attempt packaging 2.0 version. Igor Novikov said in mail it is almost ready.

Pavel Alexeev hubbitus at fedoraproject.org
Mon Aug 26 20:37:19 UTC 2013


commit da0db5f0be2556a63fc22b8e2847b360c7205c65
Author: Pavel Alexeev (aka Pahan-Hubbitus) <pahan at hubbitus.info>
Date:   Tue Aug 27 00:37:05 2013 +0400

    First attempt packaging 2.0 version. Igor Novikov said in mail it is almost ready.
    
    - New build with hope to fix compatability with python-pillow instead of PIL (by author mail)
    - Add BR lcms2-devel
    - Add script to get tarball from svn.
    - Replace $RPM_BUILD_ROOT by %{buildroot}
    - Add BR pycairo-devel, python-pillow-devel
    - Add require python-pillow
    - Drop 1.x branch patches.
    - Spec cleanup.

 UniConvertor-1.1.0-simplify.patch       |   34 -------------
 UniConvertor-1.1.1-rename-in-help.patch |   21 --------
 UniConvertor-1.1.1-use-exec.patch       |   11 ----
 uniconvertor.get.tarball.svn            |   14 +++++
 uniconvertor.spec                       |   82 +++++++++++--------------------
 5 files changed, 42 insertions(+), 120 deletions(-)
---
diff --git a/uniconvertor.get.tarball.svn b/uniconvertor.get.tarball.svn
new file mode 100755
index 0000000..1075966
--- /dev/null
+++ b/uniconvertor.get.tarball.svn
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+APP=uniconvertor
+VER=2.0
+
+rm -rf $APP-$VER
+#REV=$( svn export svn://svn.code.sf.net/p/tora/code/trunk/tora $APP | tail -n 1 | grep -Po '\d+' )
+# Preserve .svn as it needed for not released build
+REV=$( svn checkout http://uniconvertor.googlecode.com/svn/trunk/ $APP-$VER | tail -n 1 | grep -Po '\d+' )
+echo REV=$REV
+
+TARF=$APP-${VER}svn${REV}.tar.xz
+tar -cJf $TARF $APP-$VER
+echo "[$TARF] created"
diff --git a/uniconvertor.spec b/uniconvertor.spec
index cc283aa..b3aaee2 100644
--- a/uniconvertor.spec
+++ b/uniconvertor.spec
@@ -1,82 +1,56 @@
 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
+%global SVN 340
+
 Name:           uniconvertor
-Version:        1.1.4
-Release:        8%{?dist}
+Version:        2.0
+Release:        0.1%{?SVN:.svn%{SVN}}%{?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/v%{version}/%{name}-%{version}.tar.gz
-# Upstream notified via forum: http://sk1project.org/forum/topic.php?forum=2&topic=19
-Patch0:         UniConvertor-1.1.0-simplify.patch
-# Upstream notified via forum: http://sk1project.org/forum/topic.php?forum=2&topic=11
-Patch1:         UniConvertor-1.1.1-rename-in-help.patch
-Patch2:         UniConvertor-1.1.1-use-exec.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# Script to reproduce given tarball from source0
+Source1:        %{name}.get.tarball.svn
+Source0:        %{name}-%{version}svn%{SVN}.tar.xz
 
-BuildRequires:  python-devel
-Requires:       python-imaging
-Requires:       python-reportlab
+BuildRequires:  python-devel, pycairo-devel, python-pillow-devel, lcms2-devel
+Requires:       python-imaging, python-reportlab, python-pillow
 
 
 %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
-%patch1 -p1 -b .rename-in-help
-%patch2 -p1 -b .use-exec
-
-# 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
-
+%setup -q
 
 %build
-CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
-
+CFLAGS="$RPM_OPT_FLAGS -I/usr/include/python2.7/Imaging" 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)
-# Upstream notified via forum:
-#   http://sk1project.org/forum/topic.php?forum=2&topic=11
-#   http://sk1project.org/forum/topic.php?forum=2&topic=33
-mv $RPM_BUILD_ROOT%{_bindir}/uniconv $RPM_BUILD_ROOT%{_bindir}/uniconvertor
-
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
+python setup.py install --skip-build --root %{buildroot}
 
 %files
-%defattr(-,root,root,-)
-%doc README
-%doc COPYRIGHTS GNU_GPL_v2 GNU_LGPL_v2
-%{_bindir}/uniconvertor
+%doc README LICENSE GPLv3.txt
+%{_bindir}/%{name}
 %{python_sitearch}/*
-
+%{_datarootdir}/mime-info/sk1project.keys
+%{_datarootdir}/mime-info/sk1project.mime
+%{_datarootdir}/mime/packages/vnd.sk1project.pdxf-graphics.xml
 
 %changelog
+* Sat Aug 24 2013 Pavel Alexeev <Pahan at Hubbitus.info> - 2.0-0.1.svn340
+- First attempt packaging 2.0 version. Igor Novikov said in mail it is almost ready.
+- New build with hope to fix compatability with python-pillow instead of PIL (by author mail)
+- Add BR lcms2-devel
+- Add script to get tarball from svn.
+- Replace $RPM_BUILD_ROOT by %%{buildroot}
+- Add BR pycairo-devel, python-pillow-devel
+- Add require python-pillow
+- Drop 1.x branch patches.
+- Spec cleanup.
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.4-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list