$NetBSD: patch-aa,v 1.2 2009/11/18 17:41:20 wiz Exp $

--- src/calibre/linux.py.orig	2009-09-28 23:23:41.000000000 +0000
+++ src/calibre/linux.py
@@ -184,7 +184,7 @@ class PostInstall:
             if os.path.exists(bc):
                 f = os.path.join(bc, 'calibre')
             else:
-                f = os.path.join(self.opts.staging_etc, 'bash_completion.d/calibre')
+                f = os.path.join(self.opts.staging_root, 'share/bash_completion.d/calibre')
             if not os.path.exists(os.path.dirname(f)):
                 os.makedirs(os.path.dirname(f))
             self.manifest.append(f)
@@ -319,7 +319,7 @@ class PostInstall:
     def install_man_pages(self):
         try:
             from calibre.utils.help2man import create_man_page
-            manpath = os.path.join(self.opts.staging_sharedir, 'man/man1')
+            manpath = os.path.join(self.opts.staging_root, 'man/man1')
             if not os.path.exists(manpath):
                 os.makedirs(manpath)
             self.info('Installing MAN pages...')
@@ -332,7 +332,7 @@ class PostInstall:
                     continue
                 parser = parser()
                 raw = create_man_page(prog, parser)
-                manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2')
+                manfile = os.path.join(manpath, prog+'.1')
                 self.info('\tInstalling MAN page for', prog)
                 open(manfile, 'wb').write(raw)
                 self.manifest.append(manfile)
