rendered paste body%define name skencil
%define version 0.6.17
%define pyimgversion 1.1.2
Name: %name
Summary: Drawing tool
Version: %version
Release: %mkrel 2
Source0: http://download.sourceforge.net/sketch/%{name}-%{version}.tar.bz2
Source2: sketch.menu.bz2
Patch1: sketch-0.6.15-tk-include-path.patch.bz2
Group: Graphics
BuildRequires: XFree86-devel tcl tcl-devel tix tix-devel tk tk-devel
# required for sys.lib
BuildRequires: python-devel >= 2.4-1mdk
BuildRequires: python-imaging-devel
License: GPL
BuildRoot: %_tmppath/%name-%realversion-%release-root
Requires: python-imaging tkinter
Requires: python-pyxml
Provides: sketch = %version
Obsoletes: sketch
URL: http://www.skencil.org/
%description
Drawing tool written in Python, using Bezier curves. Need to install tkinter.
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1 -b .tk-include-path
%build
./setup.py configure --with-nls
./setup.py build
%install
rm -fr %buildroot
./setup.py install --prefix=$RPM_BUILD_ROOT%{_prefix}
# (fg) Install program is shitty to say the least, we have to substitute all
# occurences of RPM_BUILD_{ROOT,DIR} to void :(
# Geoff says that the following is too disgusting to watch and harmful
# for your health.
set +x
(
cd $RPM_BUILD_ROOT
for i in `find -type f`; do
perl -pi -e "s|$RPM_BUILD_ROOT||" $i;
perl -pi -e "s|$RPM_BUILD_DIR||" $i;
done
)
set -x
# Now correct all the bugs the install script introduces:
cp Sketch/Modules/*so $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/Sketch/Modules
cp Filter/*so Pax/*so $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/Lib/
#install menu
mkdir -p $RPM_BUILD_ROOT%{_menudir}
bzcat %{SOURCE2} > $RPM_BUILD_ROOT%{_menudir}/%name
%find_lang --all-name %name.lang
%post
%update_menus
%postun
%clean_menus
%clean
rm -fr %buildroot
%files -f %name.lang
%defattr(-,root,root,0755)
%doc Doc/*
%{_libdir}/%{name}-%{version}
%{_bindir}/*
%{_menudir}/%name
%changelog
* Wed May 10 2006 Jerome Soyer <saispo@mandriva.org> 0.6.17-2mdk
- Ooops, fix BuildRequires
* Wed May 10 2006 Jerome Soyer <saispo@mandriva.org> 0.6.17-1mdk
- New release 0.6.17
- Remove unneeded patch
- Clean spec
- Close and fix bug #20673
* Tue Jan 03 2006 Oden Eriksson <oeriksson@mandriva.com> 0.6.16-5mdk
- rebuilt against soname aware deps (tcl/tk)
- fix deps