Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 3a8ffa2fc8f1db1a296bfe235e8dad13 > files > 5

pida-0.5.1-13.fc15.src.rpm

%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Summary:	A Python IDE written in Python and GTK
Name:		pida
Version:	0.5.1
Release:	13%{?dist}
License:	MIT
Group:		Development/Tools
URL:		http://pida.co.uk/
Source0:	http://pida.co.uk/files/releases/PIDA-%{version}.tar.gz
Source1:	%{name}.desktop
Source2:	%{name}.1

Patch0:		%{name}-%{version}-remove-emacs.patch

BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires:	PyXML
Requires:	gamin-python
Requires:	gnome-python2-gconf
Requires:	gnome-python2-gtkhtml2
Requires:	hicolor-icon-theme
Requires:	pygtk2-libglade
Requires:	python-kiwi
Requires:	vim-X11

BuildRequires:	desktop-file-utils
BuildRequires:	dos2unix
BuildRequires:	gtk2-devel
BuildRequires:	pygtk2-devel

%description
PIDA is an IDE. PIDA is different from other IDEs in that it will use the
tools you already have available rather than attempting to reinvent each one.
PIDA is written in Python with the PyGTK toolkit, and although is designed to
be used to program in any language, PIDA has fancy Python IDE features.

%prep
%setup -q -n PIDA-%{version}
%patch0 -p1

# Suppress rpmlint error.
dos2unix ./docs/html/handbook.html

%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1

# Installs zero-length service.pida files necessary for proper behaviour.
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

# icon
install -p -m644 %{name}/resources/pixmaps/%{name}-icon.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
install -p -m644 %{name}/resources/pixmaps/%{name}-icon.svg \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps

desktop-file-install %{?_remove_encoding} --vendor fedora \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE1}

# man page
install -p -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1

# Files containing shebangs need to have the executable bits.
chmod 755 $RPM_BUILD_ROOT%{python_sitearch}/%{name}/utils/feedparser.py
chmod 755 $RPM_BUILD_ROOT%{python_sitearch}/%{name}/utils/rpdb2.py
chmod 755 $RPM_BUILD_ROOT%{python_sitearch}/%{name}/utils/launchpadder/lpreport.py

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ -x %{_bindir}/update-desktop-database ]; then
  update-desktop-database &> /dev/null || :
fi

touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
if [ -x %{_bindir}/update-desktop-database ]; then
  update-desktop-database &> /dev/null || :
fi

touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%files
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG COPYING docs
%{_bindir}/%{name}
%{_bindir}/%{name}-remote
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}-icon.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}-icon.svg
%{_mandir}/man1/%{name}.1.gz
%{python_sitearch}/moo_stub.so

%{python_sitearch}/%{name}/
%{python_sitearch}/PIDA-*.egg-info

%changelog
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jul 31 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.5.1-12
- use python_sitearch again (or fails to build on 64bit)
- change %%files a bit

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.1-11
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Nov 30 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5.1-8
- Fix locations for Python 2.6

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.5.1-7
- Rebuild for Python 2.6

* Mon Feb 18 2008 Debarshi Ray <rishi@fedoraproject.org> - 0.5.1-6
- Fixed usage of _remove_encoding to prevent failure on Fedora 7.
- Provided Egg on all distributions starting from Fedora 9.
- Removed 'BuildRequires: python-setuptools'.

* Tue Nov 13 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.5.1-5
- Preserved timestamps using 'install -p'.
- Removed Encoding from Desktop Entry for all distributions, except Fedora 7.

* Sat Oct 27 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.5.1-4
- Retain CHANGELOG spelling.
- Removed 'Requires: emacs' and Emacs support.
- Removed 'Requires: gazpacho'.
- Added 'Requires: PyXML'.
- Added 'Requires: gamin-python'.
- Added 'Requires: gnome-python2-gconf'.
- Added 'Requires: gnome-python2-gtkhtml2'.
- Added 'Requires: pygtk2-libglade'.

* Thu Oct 04 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.5.1-3
- Added comment about empty service.pida files.
- Added 'Requires: emacs'.
- Added 'Requires: vim-X11'.

* Sun Sep 09 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.5.1-2
- Use platform specific python_sitelib.
- Added 'BuildRequires: dos2unix' to suppress rpmlint error.
- Added 'BuildRequires: gtk2-devel'.

* Sun Aug 05 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.5.1-1
- Version bump to 0.5.1.
- Moved the online manual page from Patch0 to Source2.
- Removed 'BuildArch: noarch'.

* Wed Jun 30 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.4.4-3
- Moved the .desktop file from Patch1 to Source1.
- Removed X-Fedora from Categories.

* Wed Jun 28 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.4.4-2
- Added desktop-file-utils to BuildRequires.
- Removed 'BuildRequires: python-devel'.

* Wed Jun 27 2007 Debarshi Ray <rishi@fedoraproject.org> - 0.4.4-1
- Initial build.
- Added online manual page from Debian.
- Added a .desktop file.
- Fixed problem in finding meld modules.