patch-install_py 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. $OpenBSD: patch-install_py,v 1.4 2014/04/06 21:10:30 sthen Exp $
  2. install files in the right place, and don't try to run
  3. update-mime-database and gconftool-2, will be done in fake.
  4. --- install.py.orig Sat Feb 14 11:09:21 2009
  5. +++ install.py Sun Apr 6 18:22:10 2014
  6. @@ -35,7 +35,8 @@ TRANSLATIONS = ('ca', 'cs', 'es', 'fr', 'hr', 'hu', 'i
  7. # 'de', 'it', 'nl', 'el', 'fa'
  8. # Files to be installed, as (source file, destination directory)
  9. -FILES = (('src/about.py', 'share/comix/src'),
  10. +FILES = (('comix', 'bin'),
  11. + ('src/about.py', 'share/comix/src'),
  12. ('src/about.pyc', 'share/comix/src'),
  13. ('src/archive.py', 'share/comix/src'),
  14. ('src/archive.pyc', 'share/comix/src'),
  15. @@ -123,7 +124,7 @@ FILES = (('src/about.py', 'share/comix/src'),
  16. ('images/tango-archive.png', 'share/comix/images'),
  17. ('images/tango-enhance-image.png', 'share/comix/images'),
  18. ('images/tango-image.png', 'share/comix/images'),
  19. - ('comix.1.gz', 'share/man/man1'),
  20. + ('comix.1', 'man/man1'),
  21. ('comix.desktop', 'share/applications'),
  22. ('images/16x16/comix.png', 'share/icons/hicolor/16x16/apps'),
  23. ('images/22x22/comix.png', 'share/icons/hicolor/22x22/apps'),
  24. @@ -132,12 +133,9 @@ FILES = (('src/about.py', 'share/comix/src'),
  25. ('images/48x48/comix.png', 'share/icons/hicolor/48x48/apps'),
  26. ('images/comix.svg', 'share/icons/hicolor/scalable/apps'))
  27. -# Symlinks to be created, as (target, symlink)
  28. -LINKS = (('../share/comix/src/comix.py', 'bin/comix'),)
  29. -
  30. # Mime files to be installed, as (source file, destination directory)
  31. MIME_FILES = (('mime/comicthumb', 'bin'),
  32. - ('mime/comicthumb.1.gz', 'share/man/man1'),
  33. + ('mime/comicthumb.1', 'man/man1'),
  34. ('mime/comix.xml', 'share/mime/packages'),
  35. ('mime/icons/16x16/application-x-cbz.png',
  36. 'share/icons/hicolor/16x16/mimetypes'),
  37. @@ -240,7 +238,7 @@ def check_dependencies():
  38. print ' !!! PyGTK .................... Not found'
  39. required_found = False
  40. try:
  41. - import Image
  42. + from PIL import Image
  43. assert Image.VERSION >= '1.1.5'
  44. print ' Python Imaging Library ....... OK'
  45. except ImportError:
  46. @@ -304,26 +302,11 @@ if args == ['install']:
  47. for lang in TRANSLATIONS:
  48. install(os.path.join('messages', lang, 'LC_MESSAGES/comix.mo'),
  49. os.path.join('share/locale/', lang, 'LC_MESSAGES'))
  50. - for src, link in LINKS:
  51. - make_link(src, link)
  52. if install_mime:
  53. for src, dst in MIME_FILES:
  54. install(src, dst)
  55. for src, link in MIME_LINKS:
  56. make_link(src, link)
  57. - os.popen('update-mime-database "%s"' %
  58. - os.path.join(install_dir, 'share/mime'))
  59. - print '\nUpdated mime database (added .cbz, .cbr and .cbt file types.)'
  60. - schema = os.path.join(source_dir, 'mime/comicbook.schemas')
  61. - os.popen('GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source) '
  62. - 'gconftool-2 --makefile-install-rule "%s" 2>/dev/null' %
  63. - schema)
  64. - print '\nRegistered comic archive thumbnailer in gconf (if available).'
  65. - print 'The thumbnailer is only supported by some file managers,',
  66. - print 'such as Nautilus'
  67. - print 'and Thunar.'
  68. - print 'You might have to restart the file manager for the thumbnailer',
  69. - print 'to be activated.'
  70. os.utime(os.path.join(install_dir, 'share/icons/hicolor'), None)
  71. # ---------------------------------------------------------------------------
  72. # Uninstall Comix.