diff -Naur calibre.orig/src/calibre/linux.py calibre/src/calibre/linux.py --- calibre.orig/src/calibre/linux.py 2010-06-20 00:32:31.000000000 +0000 +++ calibre/src/calibre/linux.py 2010-06-20 19:45:45.000000000 +0000 @@ -288,8 +288,8 @@ def install_man_pages(self): try: from calibre.utils.help2man import create_man_page - if isfreebsd: - manpath = os.path.join(self.opts.staging_root, 'man/man1') + if islinux or isfreebsd: + manpath = os.path.join(self.opts.staging_root, 'usr/man/man1') else: manpath = os.path.join(self.opts.staging_sharedir, 'man/man1') if not os.path.exists(manpath): @@ -304,7 +304,7 @@ continue parser = parser() raw = create_man_page(prog, parser) - if isfreebsd: + if islinux or isfreebsd: manfile = os.path.join(manpath, prog+'.1') else: manfile = os.path.join(manpath, prog+'.1'+__appname__+'.bz2') diff -Naur calibre.orig/src/calibre/utils/help2man.py calibre/src/calibre/utils/help2man.py --- calibre.orig/src/calibre/utils/help2man.py 2010-06-20 00:32:32.000000000 +0000 +++ calibre/src/calibre/utils/help2man.py 2010-06-20 19:52:20.000000000 +0000 @@ -4,7 +4,7 @@ __docformat__ = 'restructuredtext en' import time, bz2 -from calibre.constants import isfreebsd +from calibre.constants import islinux, isfreebsd from calibre.constants import __version__, __appname__, __author__ @@ -58,7 +58,7 @@ lines = [x if isinstance(x, unicode) else unicode(x, 'utf-8', 'replace') for x in lines] - if not isfreebsd: + if not islinux and not isfreebsd: return bz2.compress((u'\n'.join(lines)).encode('utf-8')) else: return (u'\n'.join(lines)).encode('utf-8')