diff --git a/epydoc-2.1-nohashbang.patch b/epydoc-2.1-nohashbang.patch
new file mode 100644
index 0000000..094db95
--- /dev/null
+++ b/epydoc-2.1-nohashbang.patch
@@ -0,0 +1,40 @@
+diff -Naupr epydoc-2.1.orig/epydoc/cli.py epydoc-2.1/epydoc/cli.py
+--- epydoc-2.1.orig/epydoc/cli.py 2004-02-09 21:56:07.000000000 +0100
++++ epydoc-2.1/epydoc/cli.py 2007-06-19 14:04:32.000000000 +0200
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ #
+ # objdoc: epydoc command-line interface
+ # Edward Loper
+diff -Naupr epydoc-2.1.orig/epydoc/gui.py epydoc-2.1/epydoc/gui.py
+--- epydoc-2.1.orig/epydoc/gui.py 2004-03-19 20:01:37.000000000 +0100
++++ epydoc-2.1/epydoc/gui.py 2007-06-19 14:06:22.000000000 +0200
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ #
+ # objdoc: epydoc command-line interface
+ # Edward Loper
+diff -Naupr epydoc-2.1.orig/epydoc/imports.py epydoc-2.1/epydoc/imports.py
+--- epydoc-2.1.orig/epydoc/imports.py 2003-09-08 01:54:51.000000000 +0200
++++ epydoc-2.1/epydoc/imports.py 2007-06-19 14:04:23.000000000 +0200
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ #
+ # import: module import support for epydoc
+ # Edward Loper
+diff -Naupr epydoc-2.1.orig/epydoc/latex.py epydoc-2.1/epydoc/latex.py
+--- epydoc-2.1.orig/epydoc/latex.py 2004-03-09 06:07:02.000000000 +0100
++++ epydoc-2.1/epydoc/latex.py 2007-06-19 14:04:38.000000000 +0200
+@@ -1,4 +1,3 @@
+-#!/usr/bin/python2.2
+ #
+ # epydoc.py: latex output
+ # Edward Loper
+diff -Naupr epydoc-2.1.orig/epydoc/man.py epydoc-2.1/epydoc/man.py
+--- epydoc-2.1.orig/epydoc/man.py 2003-07-18 17:46:19.000000000 +0200
++++ epydoc-2.1/epydoc/man.py 2007-06-19 14:04:28.000000000 +0200
+@@ -1,4 +1,3 @@
+-#!/usr/bin/python2.2
+ #
+ # epydoc.py: manpage-style text output
+ # Edward Loper
diff --git a/epydoc.spec b/epydoc.spec
index 31f5c9f..85a685a 100644
--- a/epydoc.spec
+++ b/epydoc.spec
@@ -1,14 +1,15 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
Summary: Automatic API documentation generation tool for Python
Name: epydoc
Version: 2.1
-Release: 7%{?dist}
+Release: 8%{?dist}
Group: Development/Tools
License: MIT
URL: http://epydoc.sourceforge.net/
Source0: http://dl.sf.net/epydoc/epydoc-%{version}.tar.gz
Source1: epydocgui.desktop
+Patch0: epydoc-2.1-nohashbang.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: tkinter
BuildRequires: python-devel, desktop-file-utils
@@ -26,6 +27,7 @@ ReStructuredText, Javadoc, and plaintext.
%prep
%setup -q
+%patch0 -p1 -b .nohashbang
%build
@@ -37,15 +39,14 @@ ReStructuredText, Javadoc, and plaintext.
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
desktop-file-install \
- --vendor=fedora \
+ --vendor="" \
--dir=%{buildroot}%{_datadir}/applications \
- --mode=644 \
- --add-category=X-Fedora \
+ --mode=0644 \
%{SOURCE1}
# Also install the man pages
-%{__install} -Dpm 644 man/epydoc.1 %{buildroot}%{_mandir}/man1/epydoc.1
-%{__install} -Dpm 644 man/epydocgui.1 %{buildroot}%{_mandir}/man1/epydocgui.1
+%{__mkdir_p} %{buildroot}%{_mandir}/man1
+%{__install} -p -m 0644 man/*.1 %{buildroot}%{_mandir}/man1/
%clean
@@ -53,17 +54,20 @@ desktop-file-install \
%files
-%defattr(-, root, root, 0755)
+%defattr(-,root,root,-)
%doc LICENSE.TXT README.TXT doc/
%{_bindir}/epydoc
%{_bindir}/epydocgui
%{python_sitelib}/epydoc/
-%{_datadir}/applications/*epydocgui.desktop
-%{_mandir}/man1/epydoc.1*
-%{_mandir}/man1/epydocgui.1*
+%{_datadir}/applications/epydocgui.desktop
+%{_mandir}/man1/*.1*
%changelog
+* Tue Jun 19 2007 Matthias Saou 2.1-8
+- Remove desktop file prefix and X-Fedora category.
+- Include patch to remove #! python from files only meant to be included.
+
* Mon Dec 11 2006 Matthias Saou 2.1-7
- Rebuild against python 2.5.
- Remove no longer needed explicit python-abi requirement.