src/setup.py
changeset 2991 75e616731cc3
parent 2928 71a6862183d8
child 3026 5e62d70bdfaa
equal deleted inserted replaced
2990:2cc6693a7d83 2991:75e616731cc3
   128 sysrepo_cache_dir = 'var/cache/pkg/sysrepo'
   128 sysrepo_cache_dir = 'var/cache/pkg/sysrepo'
   129 depot_dir = 'etc/pkg/depot'
   129 depot_dir = 'etc/pkg/depot'
   130 depot_conf_dir = 'etc/pkg/depot/conf.d'
   130 depot_conf_dir = 'etc/pkg/depot/conf.d'
   131 depot_logs_dir = 'var/log/pkg/depot'
   131 depot_logs_dir = 'var/log/pkg/depot'
   132 depot_cache_dir = 'var/cache/pkg/depot'
   132 depot_cache_dir = 'var/cache/pkg/depot'
   133 autostart_dir = 'etc/xdg/autostart'
       
   134 desktop_dir = 'usr/share/applications'
       
   135 gconf_dir = 'etc/gconf/schemas'
       
   136 help_dir = 'usr/share/gnome/help/package-manager'
       
   137 omf_dir = 'usr/share/omf/package-manager'
       
   138 startpage_dir = 'usr/share/package-manager/data/startpagebase'
       
   139 um_lib_dir = 'usr/lib/update-manager'
       
   140 um_share_dir = 'usr/share/update-manager'
       
   141 pm_share_dir = 'usr/share/package-manager'
       
   142 locale_dir = 'usr/share/locale'
   133 locale_dir = 'usr/share/locale'
   143 mirror_logs_dir = 'var/log/pkg/mirror'
   134 mirror_logs_dir = 'var/log/pkg/mirror'
   144 mirror_cache_dir = 'var/cache/pkg/mirror'
   135 mirror_cache_dir = 'var/cache/pkg/mirror'
   145 
   136 
   146 
   137 
   160                 ['util/publish/pkgmogrify.py', 'pkgmogrify'],
   151                 ['util/publish/pkgmogrify.py', 'pkgmogrify'],
   161                 ['util/publish/pkgsurf.py', 'pkgsurf'],
   152                 ['util/publish/pkgsurf.py', 'pkgsurf'],
   162                 ['publish.py', 'pkgsend'],
   153                 ['publish.py', 'pkgsend'],
   163                 ['pull.py', 'pkgrecv'],
   154                 ['pull.py', 'pkgrecv'],
   164                 ['sign.py', 'pkgsign'],
   155                 ['sign.py', 'pkgsign'],
   165                 ['packagemanager.py', 'packagemanager'],
       
   166                 ['updatemanager.py', 'pm-updatemanager'],
       
   167                 ],
   156                 ],
   168         lib_dir: [
   157         lib_dir: [
   169                 ['depot.py', 'pkg.depotd'],
   158                 ['depot.py', 'pkg.depotd'],
   170                 ['checkforupdates.py', 'pm-checkforupdates'],
       
   171                 ['updatemanagernotifier.py', 'updatemanagernotifier'],
       
   172                 ['launch.py', 'pm-launch'],
       
   173                 ['sysrepo.py', 'pkg.sysrepo'],
   159                 ['sysrepo.py', 'pkg.sysrepo'],
   174                 ['depot-config.py', "pkg.depot-config"]
   160                 ['depot-config.py', "pkg.depot-config"]
   175                 ],
   161                 ],
   176         um_lib_dir: [
       
   177                 ['um/update-refresh.sh', 'update-refresh.sh'],
       
   178         ],
       
   179         svc_method_dir: [
   162         svc_method_dir: [
   180                 ['svc/svc-pkg-depot', 'svc-pkg-depot'],
   163                 ['svc/svc-pkg-depot', 'svc-pkg-depot'],
   181                 ['svc/svc-pkg-mdns', 'svc-pkg-mdns'],
   164                 ['svc/svc-pkg-mdns', 'svc-pkg-mdns'],
   182                 ['svc/svc-pkg-mirror', 'svc-pkg-mirror'],
   165                 ['svc/svc-pkg-mirror', 'svc-pkg-mirror'],
   183                 ['svc/svc-pkg-repositories-setup',
   166                 ['svc/svc-pkg-repositories-setup',
   184                     'svc-pkg-repositories-setup'],
   167                     'svc-pkg-repositories-setup'],
   185                 ['svc/svc-pkg-server', 'svc-pkg-server'],
   168                 ['svc/svc-pkg-server', 'svc-pkg-server'],
   186                 ['svc/svc-pkg-sysrepo', 'svc-pkg-sysrepo'],
   169                 ['svc/svc-pkg-sysrepo', 'svc-pkg-sysrepo'],
   187                 ['svc/svc-pkg-update', 'svc-pkg-update'],
       
   188                 ],
   170                 ],
   189         svc_share_dir: [
   171         svc_share_dir: [
   190                 ['svc/pkg5_include.sh', 'pkg5_include.sh'],
   172                 ['svc/pkg5_include.sh', 'pkg5_include.sh'],
   191                 ],
   173                 ],
   192         }
   174         }
   235         "aix" : scripts_other_unix,
   217         "aix" : scripts_other_unix,
   236         "unknown": scripts_sunos,
   218         "unknown": scripts_sunos,
   237         }
   219         }
   238 
   220 
   239 man1_files = [
   221 man1_files = [
   240         'man/packagemanager.1',
       
   241         'man/pkg.1',
   222         'man/pkg.1',
   242         'man/pkgdepend.1',
   223         'man/pkgdepend.1',
   243         'man/pkgdiff.1',
   224         'man/pkgdiff.1',
   244         'man/pkgfmt.1',
   225         'man/pkgfmt.1',
   245         'man/pkglint.1',
   226         'man/pkglint.1',
   248         'man/pkgsend.1',
   229         'man/pkgsend.1',
   249         'man/pkgsign.1',
   230         'man/pkgsign.1',
   250         'man/pkgsurf.1',
   231         'man/pkgsurf.1',
   251         'man/pkgrecv.1',
   232         'man/pkgrecv.1',
   252         'man/pkgrepo.1',
   233         'man/pkgrepo.1',
   253         'man/pm-updatemanager.1',
       
   254         ]
   234         ]
   255 man1m_files = [
   235 man1m_files = [
   256         'man/pkg.depotd.1m',
   236         'man/pkg.depotd.1m',
   257         'man/pkg.depot-config.1m',
   237         'man/pkg.depot-config.1m',
   258         'man/pkg.sysrepo.1m'
   238         'man/pkg.sysrepo.1m'
   260 man5_files = [
   240 man5_files = [
   261         'man/pkg.5'
   241         'man/pkg.5'
   262         ]
   242         ]
   263 
   243 
   264 man1_ja_files = [
   244 man1_ja_files = [
   265         'man/ja_JP/packagemanager.1',
       
   266         'man/ja_JP/pkg.1',
   245         'man/ja_JP/pkg.1',
   267         'man/ja_JP/pkgdepend.1',
   246         'man/ja_JP/pkgdepend.1',
   268         'man/ja_JP/pkgdiff.1',
   247         'man/ja_JP/pkgdiff.1',
   269         'man/ja_JP/pkgfmt.1',
   248         'man/ja_JP/pkgfmt.1',
   270         'man/ja_JP/pkglint.1',
   249         'man/ja_JP/pkglint.1',
   272         'man/ja_JP/pkgmogrify.1',
   251         'man/ja_JP/pkgmogrify.1',
   273         'man/ja_JP/pkgsend.1',
   252         'man/ja_JP/pkgsend.1',
   274         'man/ja_JP/pkgsign.1',
   253         'man/ja_JP/pkgsign.1',
   275         'man/ja_JP/pkgrecv.1',
   254         'man/ja_JP/pkgrecv.1',
   276         'man/ja_JP/pkgrepo.1',
   255         'man/ja_JP/pkgrepo.1',
   277         'man/ja_JP/pm-updatemanager.1',
       
   278         ]
   256         ]
   279 man1m_ja_files = [
   257 man1m_ja_files = [
   280         'man/ja_JP/pkg.depotd.1m',
   258         'man/ja_JP/pkg.depotd.1m',
   281         'man/ja_JP/pkg.sysrepo.1m'
   259         'man/ja_JP/pkg.sysrepo.1m'
   282         ]
   260         ]
   283 man5_ja_files = [
   261 man5_ja_files = [
   284         'man/ja_JP/pkg.5'
   262         'man/ja_JP/pkg.5'
   285         ]
   263         ]
   286 
   264 
   287 man1_zh_CN_files = [
   265 man1_zh_CN_files = [
   288         'man/zh_CN/packagemanager.1',
       
   289         'man/zh_CN/pkg.1',
   266         'man/zh_CN/pkg.1',
   290         'man/zh_CN/pkgdepend.1',
   267         'man/zh_CN/pkgdepend.1',
   291         'man/zh_CN/pkgdiff.1',
   268         'man/zh_CN/pkgdiff.1',
   292         'man/zh_CN/pkgfmt.1',
   269         'man/zh_CN/pkgfmt.1',
   293         'man/zh_CN/pkglint.1',
   270         'man/zh_CN/pkglint.1',
   295         'man/zh_CN/pkgmogrify.1',
   272         'man/zh_CN/pkgmogrify.1',
   296         'man/zh_CN/pkgsend.1',
   273         'man/zh_CN/pkgsend.1',
   297         'man/zh_CN/pkgsign.1',
   274         'man/zh_CN/pkgsign.1',
   298         'man/zh_CN/pkgrecv.1',
   275         'man/zh_CN/pkgrecv.1',
   299         'man/zh_CN/pkgrepo.1',
   276         'man/zh_CN/pkgrepo.1',
   300         'man/zh_CN/pm-updatemanager.1',
       
   301         ]
   277         ]
   302 man1m_zh_CN_files = [
   278 man1m_zh_CN_files = [
   303         'man/zh_CN/pkg.depotd.1m',
   279         'man/zh_CN/pkg.depotd.1m',
   304         'man/zh_CN/pkg.sysrepo.1m'
   280         'man/zh_CN/pkg.sysrepo.1m'
   305         ]
   281         ]
   314         'pkg.client',
   290         'pkg.client',
   315         'pkg.client.linkedimage',
   291         'pkg.client.linkedimage',
   316         'pkg.client.transport',
   292         'pkg.client.transport',
   317         'pkg.file_layout',
   293         'pkg.file_layout',
   318         'pkg.flavor',
   294         'pkg.flavor',
   319         'pkg.gui',
       
   320         'pkg.lint',
   295         'pkg.lint',
   321         'pkg.portable',
   296         'pkg.portable',
   322         'pkg.publish',
   297         'pkg.publish',
   323         'pkg.server'
   298         'pkg.server'
   324         ]
   299         ]
   333         'pkg.client.plandesc',
   308         'pkg.client.plandesc',
   334         'pkg.client.printengine',
   309         'pkg.client.printengine',
   335         'pkg.client.progress',
   310         'pkg.client.progress',
   336         'pkg.misc',
   311         'pkg.misc',
   337         'pkg.pipeutils',
   312         'pkg.pipeutils',
   338         'checkforupdates',
       
   339         ]
   313         ]
   340 
   314 
   341 web_files = []
   315 web_files = []
   342 for entry in os.walk("web"):
   316 for entry in os.walk("web"):
   343         web_dir, dirs, files = entry
   317         web_dir, dirs, files = entry
   363         'svc/pkg-mdns.xml',
   337         'svc/pkg-mdns.xml',
   364         'svc/pkg-mirror.xml',
   338         'svc/pkg-mirror.xml',
   365         'svc/pkg-repositories-setup.xml',
   339         'svc/pkg-repositories-setup.xml',
   366         'svc/pkg-server.xml',
   340         'svc/pkg-server.xml',
   367         'svc/pkg-system-repository.xml',
   341         'svc/pkg-system-repository.xml',
   368         'svc/pkg-update.xml',
       
   369         'svc/zoneproxy-client.xml',
   342         'svc/zoneproxy-client.xml',
   370         'svc/zoneproxyd.xml'
   343         'svc/zoneproxyd.xml'
   371         ]
   344         ]
   372 resource_files = [
   345 resource_files = [
   373         'util/opensolaris.org.sections',
   346         'util/opensolaris.org.sections',
   402 # The apache-based depot includes an shtml file we add to the resource dir
   375 # The apache-based depot includes an shtml file we add to the resource dir
   403 web_files.append((os.path.join(resource_dir, "web"),
   376 web_files.append((os.path.join(resource_dir, "web"),
   404     ["util/apache2/depot/repos.shtml"]))
   377     ["util/apache2/depot/repos.shtml"]))
   405 execattrd_files = [
   378 execattrd_files = [
   406         'util/misc/exec_attr.d/package:pkg',
   379         'util/misc/exec_attr.d/package:pkg',
   407         'util/misc/exec_attr.d/package:pkg:package-manager'
       
   408 ]
   380 ]
   409 authattrd_files = ['util/misc/auth_attr.d/package:pkg']
   381 authattrd_files = ['util/misc/auth_attr.d/package:pkg']
   410 userattrd_files = ['util/misc/user_attr.d/package:pkg']
   382 userattrd_files = ['util/misc/user_attr.d/package:pkg']
   411 autostart_files = [
       
   412         'um/data/updatemanagernotifier.desktop',
       
   413 ]
       
   414 desktop_files = [
       
   415         'gui/data/addmoresoftware.desktop',
       
   416         'gui/data/packagemanager.desktop',
       
   417         'um/data/updatemanager.desktop',
       
   418 ]
       
   419 gconf_files = [
       
   420         'gui/data/packagemanager-preferences.schemas',
       
   421         'um/data/updatemanager-preferences.schemas',
       
   422 ]
       
   423 intl_files = [
       
   424         'gui/data/addmoresoftware.desktop.in',
       
   425         'gui/data/packagemanager-info.xml.in',
       
   426         'gui/data/packagemanager-preferences.schemas.in',
       
   427         'gui/data/packagemanager.desktop.in',
       
   428         'um/data/updatemanager-preferences.schemas.in',
       
   429         'um/data/updatemanager.desktop.in',
       
   430         'um/data/updatemanagernotifier.desktop.in',
       
   431 ]
       
   432 help_locales = \
       
   433     'C ar ca cs de es fr hu id it ja ko pl pt_BR ru sv zh_CN zh_HK zh_TW'.split()
       
   434 help_files = {
       
   435         'C': ['gui/help/C/package-manager.xml'],
       
   436         'C/figures': [
       
   437             'gui/help/C/figures/%s.png' % n
       
   438             for n in 'pkgmgr-main startpage_new update_all_new webinstall'.split()
       
   439         ]
       
   440 }
       
   441 help_files.update(
       
   442         (locale, ['gui/help/%s/package-manager.xml' % locale])
       
   443         for locale in help_locales[1:]
       
   444 )
       
   445 # add package-manager-__LOCALE__.omf for localizable file package
       
   446 omf_files = [
       
   447         'gui/help/package-manager-%s.omf' % locale
       
   448         for locale in help_locales + [ "__LOCALE__" ]
       
   449 ]
       
   450 startpage_locales = \
       
   451     'C ar ca cs de es fr hu id it ja ko nl pt_BR ru sv zh_CN zh_HK zh_TW'.split()
       
   452 startpage_files = {
       
   453         'C': [
       
   454             'gui/data/startpagebase/C/%s.png' % n
       
   455             for n in [
       
   456                 'dialog-information', 'dialog-warning', 'hc_dialog-information',
       
   457                 'hc_dialog-warning', 'hc_install', 'hc_opensolaris',
       
   458                 'hci_dialog-information', 'hci_dialog-warning', 'hci_install',
       
   459                 'hci_opensolaris', 'install', 'opensolaris'
       
   460             ]
       
   461         ] + ['gui/data/startpagebase/C/startpage.html']
       
   462 }
       
   463 startpage_files.update(
       
   464         (locale, ['gui/data/startpagebase/%s/startpage.html' % locale])
       
   465         for locale in startpage_locales[1:]
       
   466 )
       
   467 pkg_locales = \
   383 pkg_locales = \
   468     'ar ca cs de es fr he hu id it ja ko nl pl pt_BR ru sk sv zh_CN zh_HK zh_TW'.split()
   384     'ar ca cs de es fr he hu id it ja ko nl pl pt_BR ru sk sv zh_CN zh_HK zh_TW'.split()
   469 
   385 
   470 syscallat_srcs = [
   386 syscallat_srcs = [
   471         'modules/syscallat.c'
   387         'modules/syscallat.c'
   794                                                 outfile = os.path.join(dir,
   710                                                 outfile = os.path.join(dir,
   795                                                     outfile)
   711                                                     outfile)
   796                                         self.copy_file(infile, outfile)
   712                                         self.copy_file(infile, outfile)
   797                                         self.outfiles.append(outfile)
   713                                         self.outfiles.append(outfile)
   798 
   714 
   799                 # Don't bother making this generic for the one symlink.
       
   800                 src = "HighContrastInverse"
       
   801                 dst = os.path.join(self.install_dir, pm_share_dir,
       
   802                     "icons/HighContrastLargePrintInverse")
       
   803                 try:
       
   804                         targ = os.readlink(dst)
       
   805                 except OSError, e:
       
   806                         if e.errno in (errno.ENOENT, errno.EINVAL):
       
   807                                 targ = None
       
   808                         else:
       
   809                                 raise
       
   810 
       
   811                 if src != targ:
       
   812                         log.info("linking %s -> %s" % (src, dst))
       
   813                         rm_f(dst)
       
   814                         os.symlink(src, dst)
       
   815 
       
   816 def run_cmd(args, swdir, updenv=None, ignerr=False, savestderr=None):
   715 def run_cmd(args, swdir, updenv=None, ignerr=False, savestderr=None):
   817                 if updenv:
   716                 if updenv:
   818                         # use temp environment modified with the given dict
   717                         # use temp environment modified with the given dict
   819                         env = os.environ.copy()
   718                         env = os.environ.copy()
   820                         env.update(updenv)
   719                         env.update(updenv)
  1355 
  1254 
  1356         def run(self):
  1255         def run(self):
  1357                 # Anything that gets created here should get deleted in
  1256                 # Anything that gets created here should get deleted in
  1358                 # clean_func.run() below.
  1257                 # clean_func.run() below.
  1359                 i18n_check()
  1258                 i18n_check()
  1360                 for f in intl_files:
       
  1361                         intltool_merge(f, f[:-3])
       
  1362 
       
  1363                 for l in help_locales:
       
  1364                         path = "gui/help/%s/" % l
       
  1365                         xml2po_merge(path + "package-manager.xml.in",
       
  1366                             path + "package-manager.xml",
       
  1367                             path + "%s.mo" % l)
       
  1368 
       
  1369                 # create xml for localization
       
  1370                 localizablexml("gui/help/C/package-manager.xml",
       
  1371                     "gui/help/C/package-manager.localizable.xml")
       
  1372 
       
  1373                 # generate pkg_help.pot for next translation
       
  1374                 xml2po_gen("gui/help/C/package-manager.localizable.xml",
       
  1375                     "gui/help/C/pkg_help.pot")
       
  1376 
  1259 
  1377                 for l in pkg_locales:
  1260                 for l in pkg_locales:
  1378                         msgfmt("po/%s.po" % l, "po/%s.mo" % l)
  1261                         msgfmt("po/%s.po" % l, "po/%s.mo" % l)
  1379 
  1262 
  1380                 # generate pkg.pot for next translation
  1263                 # generate pkg.pot for next translation
  1381                 intltool_update_maintain()
  1264                 intltool_update_maintain()
  1382                 intltool_update_pot()
  1265                 intltool_update_pot()
  1383 
       
  1384                 # create __LOCALE__ -> C symlink for omf file
       
  1385                 # to make installation with data_files list work
       
  1386                 locomf="gui/help/package-manager-__LOCALE__.omf"
       
  1387                 if not os.path.exists(locomf):
       
  1388                     os.symlink("package-manager-C.omf", locomf)
       
  1389 
  1266 
  1390 def rm_f(filepath):
  1267 def rm_f(filepath):
  1391         """Remove a file without caring whether it exists."""
  1268         """Remove a file without caring whether it exists."""
  1392 
  1269 
  1393         try:
  1270         try:
  1404         def run(self):
  1281         def run(self):
  1405                 _clean.run(self)
  1282                 _clean.run(self)
  1406 
  1283 
  1407                 rm_f("po/.intltool-merge-cache")
  1284                 rm_f("po/.intltool-merge-cache")
  1408 
  1285 
  1409                 for f in intl_files:
       
  1410                         rm_f(f[:-3])
       
  1411 
       
  1412                 for l in pkg_locales:
  1286                 for l in pkg_locales:
  1413                         rm_f("po/%s.mo" % l)
  1287                         rm_f("po/%s.mo" % l)
  1414 
  1288 
  1415                 rm_f("po/pkg.pot")
  1289                 rm_f("po/pkg.pot")
  1416 
  1290 
  1417                 for l in help_locales:
       
  1418                         path = "gui/help/%s/" % l
       
  1419                         rm_f(path + "package-manager.xml")
       
  1420                         rm_f(path + "%s.mo" % l)
       
  1421 
       
  1422                 rm_f("gui/help/C/pkg_help.pot")
       
  1423 
       
  1424                 rm_f("gui/help/package-manager-__LOCALE__.omf")
       
  1425                 rm_f("po/i18n_errs.txt")
  1291                 rm_f("po/i18n_errs.txt")
  1426 
  1292 
  1427 class clobber_func(Command):
  1293 class clobber_func(Command):
  1428         user_options = []
  1294         user_options = []
  1429         description = "Deletes any and all files created by setup"
  1295         description = "Deletes any and all files created by setup"
  1457             ("only=", "o", "only <regex>"),
  1323             ("only=", "o", "only <regex>"),
  1458             ("parseable", 'p', "parseable output"),
  1324             ("parseable", 'p', "parseable output"),
  1459             ("port=", "z", "lowest port to start a depot on"),
  1325             ("port=", "z", "lowest port to start a depot on"),
  1460             ("timing", "t", "timing file <file>"),
  1326             ("timing", "t", "timing file <file>"),
  1461             ("verbosemode", 'v', "run tests in verbose mode"),
  1327             ("verbosemode", 'v', "run tests in verbose mode"),
  1462             ("enableguitests", 'u', "enable IPS GUI tests, disabled by default"),
       
  1463             ("stoponerr", 'x', "stop when a baseline mismatch occurs"),
  1328             ("stoponerr", 'x', "stop when a baseline mismatch occurs"),
  1464             ("debugoutput", 'd', "emit debugging output"),
  1329             ("debugoutput", 'd', "emit debugging output"),
  1465             ("showonexpectedfail", 'f',
  1330             ("showonexpectedfail", 'f',
  1466                 "show all failure info, even for expected fails"),
  1331                 "show all failure info, even for expected fails"),
  1467             ("startattest=", 's', "start at indicated test"),
  1332             ("startattest=", 's', "start at indicated test"),
  1611                 (sysrepo_cache_dir, {}),
  1476                 (sysrepo_cache_dir, {}),
  1612                 (depot_dir, depot_files),
  1477                 (depot_dir, depot_files),
  1613                 (depot_conf_dir, {}),
  1478                 (depot_conf_dir, {}),
  1614                 (depot_logs_dir, depot_log_stubs),
  1479                 (depot_logs_dir, depot_log_stubs),
  1615                 (depot_cache_dir, {}),
  1480                 (depot_cache_dir, {}),
  1616                 (autostart_dir, autostart_files),
       
  1617                 (desktop_dir, desktop_files),
       
  1618                 (gconf_dir, gconf_files),
       
  1619                 (omf_dir, omf_files),
       
  1620                 ('usr/share/icons/hicolor/48x48/mimetypes',
       
  1621                     ['gui/data/gnome-mime-application-vnd.pkg5.info.png']),
       
  1622                 ('usr/share/mime/packages', ['gui/data/packagemanager-info.xml']),
       
  1623                 (pm_share_dir, ['gui/data/packagemanager.ui']),
       
  1624                 (mirror_cache_dir, {}),
  1481                 (mirror_cache_dir, {}),
  1625                 (mirror_logs_dir, {}),
  1482                 (mirror_logs_dir, {}),
  1626                 ]
  1483                 ]
  1627         data_files += [
       
  1628             (os.path.join(startpage_dir, locale), files)
       
  1629             for locale, files in startpage_files.iteritems()
       
  1630         ]
       
  1631         data_files += [
       
  1632             (os.path.join(help_dir, locale), files)
       
  1633             for locale, files in help_files.iteritems()
       
  1634         ]
       
  1635         # install localizable .xml and its .pot file to put into localizable file package
  1484         # install localizable .xml and its .pot file to put into localizable file package
  1636         data_files += [
       
  1637             (os.path.join(help_dir, '__LOCALE__'),
       
  1638                 [('gui/help/C/package-manager.localizable.xml', 'package-manager.xml'),
       
  1639                  ('gui/help/C/pkg_help.pot', 'pkg_help.pot')])
       
  1640         ]
       
  1641         data_files += [
  1485         data_files += [
  1642             (os.path.join(locale_dir, locale, 'LC_MESSAGES'),
  1486             (os.path.join(locale_dir, locale, 'LC_MESSAGES'),
  1643                 [('po/%s.mo' % locale, 'pkg.mo')])
  1487                 [('po/%s.mo' % locale, 'pkg.mo')])
  1644             for locale in pkg_locales
  1488             for locale in pkg_locales
  1645         ]
  1489         ]
  1646         # install English .pot file to put into localizable file package
  1490         # install English .pot file to put into localizable file package
  1647         data_files += [
  1491         data_files += [
  1648             (os.path.join(locale_dir, '__LOCALE__', 'LC_MESSAGES'),
  1492             (os.path.join(locale_dir, '__LOCALE__', 'LC_MESSAGES'),
  1649                 [('po/pkg.pot', 'pkg.pot')])
  1493                 [('po/pkg.pot', 'pkg.pot')])
  1650         ]
  1494         ]
  1651         for t in 'HighContrast', 'HighContrastInverse', '':
       
  1652                 for px in '24', '36', '48':
       
  1653                         data_files += [(
       
  1654                             '%s/icons/%s/%sx%s/actions' % (um_share_dir, t or 'hicolor', px, px),
       
  1655                             ['um/data/icons/%s/%sx%s/updatemanager.png' % (t, px, px)]
       
  1656                         )]
       
  1657                 data_files += [(
       
  1658                     '%s/icons/%s/16x16/actions' % (pm_share_dir, t or 'hicolor'),
       
  1659                     [
       
  1660                         'gui/data/icons/%s/16x16/%s.png' % (t, n)
       
  1661                         for n in ('filter_all', 'filter_selected', 'progress_checkmark',
       
  1662                             'selection', 'status_checkmark', 'status_installed',
       
  1663                             'status_newupdate', 'status_notinstalled')
       
  1664                     ]
       
  1665                 )]
       
  1666                 data_files += [
       
  1667                     ('%s/icons/%s/%sx%s/actions' % (pm_share_dir, t or 'hicolor', px, px),
       
  1668                     [
       
  1669                         'gui/data/icons/%s/%sx%s/%s.png' % (t, px, px, n)
       
  1670                         for n in ('pm-install_update', 'pm-refresh',
       
  1671                             'pm-remove', 'pm-update_all')
       
  1672                     ])
       
  1673                     for px in (24, 48)
       
  1674                 ]
       
  1675                 data_files += [(
       
  1676                     '%s/icons/%s/48x48/actions' % (pm_share_dir, t or 'hicolor'),
       
  1677                     ['gui/data/icons/%s/48x48/packagemanager.png' % t]
       
  1678                 )]
       
  1679                 data_files += [
       
  1680                     ('usr/share/icons/%s/48x48/apps' % (t or 'hicolor'),
       
  1681                         [
       
  1682                             'um/data/icons/%s/48x48/updatemanager.png' % t,
       
  1683                             'gui/data/icons/%s/48x48/packagemanager.png' % t
       
  1684                         ]),
       
  1685                 ]
       
  1686                 # These two icons don't fit any patterns.
       
  1687                 data_files += [
       
  1688                     (os.path.join(pm_share_dir, 'icons/hicolor/16x16/actions'), [
       
  1689                         'gui/data/icons/16x16/progress_blank.png']),
       
  1690                     (os.path.join(pm_share_dir, 'icons/hicolor/24x24/actions'), [
       
  1691                         'gui/data/icons/24x24/pm-check.png']),
       
  1692                 ]
       
  1693 
  1495 
  1694 if osname == 'sunos' or osname == "linux":
  1496 if osname == 'sunos' or osname == "linux":
  1695         # Unix platforms which the elf extension has been ported to
  1497         # Unix platforms which the elf extension has been ported to
  1696         # are specified here, so they are built automatically
  1498         # are specified here, so they are built automatically
  1697         elf_libraries = ['elf']
  1499         elf_libraries = ['elf']