$OpenBSD: patch-setup_py,v 1.3 2012/06/21 20:25:45 gonzalo Exp $
--- setup.py.orig	Wed Jan 18 13:46:01 2012
+++ setup.py	Fri May 18 09:44:41 2012
@@ -81,7 +81,7 @@ def include_file(file):
 def collect_data_files():
 	# Search for data files to be installed in share/
 	data_files = [
-		('share/man/man1', ['man/zim.1']),
+		('man/man1', ['man/zim.1']),
 		('share/applications', ['xdg/zim.desktop']),
 		('share/mime/packages', ['xdg/zim.xml']),
 		('share/pixmaps', ['xdg/hicolor/48x48/apps/zim.png']),
@@ -110,6 +110,12 @@ def collect_data_files():
 			files = [os.path.join(dir, f) for f in files]
 			data_files.append((target, files))
 
+        for dir, dirs, files in os.walk('man'):
+                if files:
+                        target = os.path.join('man', dir[4:])
+                        files = [os.path.join(dir, f) for f in files]
+                        data_files.append((target, files))
+
 	if build_target == 'maemo':
 		# Remove default .desktop files and replace with our set
 		prefix = os.path.join('share', 'zim', 'applications')
@@ -275,7 +281,7 @@ class zim_install_class(install_class):
 
 	def initialize_options(self):
 		install_class.initialize_options(self)
-		self.skip_xdg_cmd = 0
+		self.skip_xdg_cmd = 1
 
 	def run(self):
 		install_class.run(self)
