diff --git a/.cvsignore b/.cvsignore index 091c276..399e242 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -mypaint-0.5.1.tar.bz2 +mypaint-0.7.1.tar.bz2 diff --git a/mypaint-mypaint.patch b/mypaint-mypaint.patch deleted file mode 100644 index ea0ebc6..0000000 --- a/mypaint-mypaint.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- mypaint-0.5.1/mypaint 2008-03-09 04:43:38.000000000 +0900 -+++ mypaint.orig 2008-11-04 20:28:06.000000000 +0900 -@@ -12,6 +12,7 @@ - #psyco.full() - - import gtk, sys, os, os.path -+from distutils.sysconfig import get_python_lib - gdk = gtk.gdk - - # autodetect prefix -@@ -19,7 +20,10 @@ - - #standard values - data='/share/mypaint' --lib='/lib/python%d.%d/site-packages/mypaint/' % (sys.version_info[0], sys.version_info[1]) -+lib = get_python_lib(1) -+lib = lib.strip('/usr') -+lib = '/'+ lib + 's' + '/mypaint/' -+#lib='/lib/python%d.%d/site-packages/mypaint/' % (sys.version_info[0], sys.version_info[1]) - pwd=os.getcwd() - curdir=os.path.dirname(sys.argv[0]) - diff --git a/mypaint.spec b/mypaint.spec index fdc8bed..dfae767 100644 --- a/mypaint.spec +++ b/mypaint.spec @@ -1,73 +1,113 @@ -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + Name: mypaint -Version: 0.5.1 -Release: 5%{?dist} -Summary: A simple paint program +Version: 0.7.1 +Release: 1%{?dist} +Summary: A fast and easy graphics application for digital painters Group: Applications/Multimedia -License: GPLv2+ +# MyPaint is GPLv2+, brush library LGPLv2+ +License: GPLv2+ and LGPLv2+ URL: http://mypaint.intilinux.com/ -Source0: http://ee-staff.ethz.ch/%7Emrenold/%{name}/%{name}-%{version}.tar.bz2 -Patch0: %{name}-%{name}.patch +Source0: http://download.gna.org/mypaint/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel, desktop-file-utils, gtk2-devel, pygtk2-devel +BuildRequires: numpy, scons, swig Requires: gtk2, pygtk2, python %description -Mypaint is a fast and easy/simple painter app focused on the painter, -so you can only focus on the art and not the program itself. -Currently MyPaint does not have a layer system, also mypaint is -using pygtk with C extensions. +MyPaint is a fast and easy graphics application for digital painters. It lets +you focus on the art instead of the program. You work on your canvas with +minimum distractions, bringing up the interface only when you need it. + %prep %setup -q -%patch0 -p1 -/bin/chmod -x html/generate.py +# the Options class is deprecated; use the Variables class instead +sed -i 's|PathOption|PathVariable|g' SConstruct +sed -i 's|Options|Variables|g' SConstruct +# for 64 bit +sed -i 's|lib/mypaint|%{_lib}/mypaint|g' SConstruct mypaint.in.py +# fix menu icon +sed -i 's|mypaint_48|mypaint|g' desktop/%{name}.desktop + %build -%configure --disable-static --enable-shared -make %{?_smp_mflags} +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +scons prefix=%{_prefix} %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT +scons prefix=$RPM_BUILD_ROOT%{_prefix} install -desktop-file-install --vendor="fedora" --delete-original \ +desktop-file-install --vendor="fedora" \ + --delete-original \ + --remove-key="Encoding" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' -#following is needed for mydrawwidget.so module so that it can be readily -#accessible to other people trying to import it. -touch $RPM_BUILD_ROOT%{_datadir}/mypaint/python/__init__.py +chmod 755 $RPM_BUILD_ROOT%{_libdir}/mypaint/_mypaintlib.so -#rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so -#rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so.0 -#mv $RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so.0.0.0 \ -#$RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so +# desktop integration +for size in 16x16 22x22 24x24 32x32 48x48; do + ( + mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$size/apps + ln -s ../../../../%{name}/desktop/$size/%{name}.png \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$size/apps/%{name}.png + ) +done +mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps +ln -s ../../../../%{name}/desktop/scalable/%{name}.svg \ + $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg + +# we don't need these +rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/desktop/mypaint.{desktop,ico} +rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/desktop/{svg,mypaint_48.png} -rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so -rm -f $RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so.0 -mv $RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so.0.0.0 \ -$RPM_BUILD_ROOT%{python_sitearch}/%{name}/mydrawwidget.so %clean rm -rf $RPM_BUILD_ROOT + +%post +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +update-desktop-database &> /dev/null || : + + +%postun +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi +update-desktop-database &> /dev/null || : + + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + %files %defattr(-,root,root,-) -%doc README PLAN COPYING html/ +%doc changelog COPYING LICENSE README doc/ %{_bindir}/%{name} %{_datadir}/%{name}/ -%{_datadir}/pixmaps/%{name}* +%{_datadir}/icons/hicolor/*/apps/mypaint.* %{_datadir}/applications/fedora-%{name}.desktop -%dir %{python_sitearch}/%{name} -%{python_sitearch}/%{name}/mydrawwidget.so +%dir %{_libdir}/mypaint/ +%{_libdir}/mypaint/_mypaintlib.so %changelog +* Wed Nov 25 2009 Christoph Wickert - 0.7.1-1 +- Update to 0.7.1 +- Move private python modules to a private location +- Add scriptlets for gtk-update-icon-cache and update-desktop-database +- Fix License and Source0 tags + * Sat Jul 25 2009 Fedora Release Engineering - 0.5.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 701c2ba..da47f96 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e1fba553c5ef82edabf760c3206c31f5 mypaint-0.5.1.tar.bz2 +c9e6c70cddce60330ea7aff36fe5a59f mypaint-0.7.1.tar.bz2