Graphical package manager for pacman based on pamac 5.x.x
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

meson.build 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. project('pamac',['c','vala'])
  2. ENABLE_UPDATE_ICON = (get_option('ENABLE_UPDATE_ICON') != '')
  3. ENABLE_HAMBURGER = (get_option('ENABLE_HAMBURGER') != '')
  4. KDE_TRAY = (get_option('KDE_TRAY') != '')
  5. DISABLE_AUR = (get_option('DISABLE_AUR') != '')
  6. add_global_arguments('-DGETTEXT_PACKAGE="pamac"',language: 'c')
  7. find_program ('glib-compile-resources')
  8. find_program ('gtk-update-icon-cache', 'gtk-update-icon-cache.3.0')
  9. find_program ('glib-compile-schemas')
  10. find_program ('g-ir-compiler')
  11. gtk_3_0_dep = dependency('gtk+-3.0')
  12. json_glib_1_0_dep = dependency('json-glib-1.0')
  13. libalpm_dep = dependency('libalpm')
  14. libcurl_dep = dependency('libcurl')
  15. libnotify_dep = dependency('libnotify')
  16. libsoup_2_4_dep = dependency('libsoup-2.4')
  17. polkit_gobject_1_dep = dependency('polkit-gobject-1')
  18. if KDE_TRAY
  19. appindicator3_0_1_dep = dependency('appindicator3-0.1')
  20. endif
  21. atk_dep = dependency('atk')
  22. cairo_dep = dependency('cairo')
  23. gdk_3_0_dep = dependency('gdk-3.0')
  24. gdk_pixbuf_2_0_dep = dependency('gdk-pixbuf-2.0')
  25. gio_2_0_dep = dependency('gio-2.0')
  26. glib_2_0_dep = dependency('glib-2.0')
  27. gobject_2_0_dep = dependency('gobject-2.0')
  28. pango_dep = dependency('pango')
  29. vte_2_91_dep = dependency('vte-2.91')
  30. x11_dep = dependency('x11')
  31. subdir('po')
  32. cfg_dbus_data = configuration_data()
  33. cfg_dbus_data.set ('DBUS_PREFIX',get_option('prefix'))
  34. meson.add_install_script('meson_scripts/update_icon.sh')
  35. meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-system.service'))
  36. meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-cleancache.service'))
  37. meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-cleancache.timer'))
  38. meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-mirrorlist.service'))
  39. meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-mirrorlist.timer'))
  40. pamac_installer_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.installer.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
  41. pamac_installer_gresource_xml_file_c = pamac_installer_gresource_xml_generator.process(['data/pamac.installer.gresource.xml'])
  42. pamac_manager_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.manager.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
  43. pamac_manager_gresource_xml_file_c = pamac_manager_gresource_xml_generator.process(['data/pamac.manager.gresource.xml'])
  44. pamac_transaction_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.transaction.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
  45. pamac_transaction_gresource_xml_file_c = pamac_transaction_gresource_xml_generator.process(['data/pamac.transaction.gresource.xml'])
  46. install_data('data/pamac-install.desktop',install_dir:join_paths(get_option('prefix'),get_option('datadir'),'applications'))
  47. install_data('data/pamac-manager.desktop',install_dir:join_paths(get_option('prefix'),get_option('datadir'),'applications'))
  48. if ENABLE_UPDATE_ICON
  49. install_data('data/pamac-updater.desktop',install_dir:join_paths(get_option('prefix'),get_option('datadir'),'applications'))
  50. endif
  51. if KDE_TRAY
  52. if (get_option('prefix').startswith('/home/'))
  53. message('Autostart file data/pamac-tray-appindicator.desktop will not be installed. You must create your own .desktop file and put it at ~/.config/autostart')
  54. else
  55. install_data('data/pamac-tray-appindicator.desktop',install_dir: '/etc/xdg/autostart')
  56. endif
  57. else
  58. if (get_option('prefix').startswith('/home/'))
  59. message('Autostart file data/pamac-tray.desktop will not be installed. You must create your own .desktop file and put it at ~/.config/autostart')
  60. else
  61. install_data('data/pamac-tray.desktop',install_dir: '/etc/xdg/autostart')
  62. endif
  63. endif
  64. dbus_cfg_org_pamac_system_service = configure_file(input: 'data/dbus/org.pamac.system.service',output: 'org.pamac.system.service', configuration: cfg_dbus_data)
  65. install_data(dbus_cfg_org_pamac_system_service,install_dir: join_paths(get_option('prefix'),get_option('datadir'),'dbus-1','system-services'))
  66. dbus_cfg_org_pamac_user_service = configure_file(input: 'data/dbus/org.pamac.user.service',output: 'org.pamac.user.service', configuration: cfg_dbus_data)
  67. install_data(dbus_cfg_org_pamac_user_service,install_dir: join_paths(get_option('prefix'),get_option('datadir'),'dbus-1','services'))
  68. install_data( 'data/dbus/org.pamac.system.conf',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'dbus-1','system.d'))
  69. install_data('data/org.pamac.main.gschema.xml', install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'glib-2.0', 'schemas'))
  70. meson.add_install_script('meson_scripts/install_schemas.sh')
  71. if not DISABLE_AUR
  72. install_data('data/org.pamac.aur.gschema.xml', install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'glib-2.0', 'schemas'))
  73. meson.add_install_script('meson_scripts/install_schemas.sh')
  74. endif
  75. install_data('data/icons/16x16/apps/system-software-install.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/16x16/apps'))
  76. install_data('data/icons/24x24/status/pamac-tray-no-update.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/24x24/apps'))
  77. install_data('data/icons/24x24/status/pamac-tray-update.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/24x24/apps'))
  78. install_data('data/icons/32x32/apps/system-software-install.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/32x32/apps'))
  79. install_data('data/pixmaps/package-generic.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
  80. install_data( 'data/polkit/org.pamac.policy',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'polkit-1','actions'))
  81. install_data( 'data/mime/x-alpm-package.xml',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'mime','packages'))
  82. subdir('src')
  83. subdir('src/pamac-user-daemon')
  84. subdir('src/pamac-tray')
  85. subdir('src/pamac-clean-cache')
  86. subdir('src/pamac-install')
  87. subdir('src/pamac-manager')
  88. subdir('src/pamac-system-daemon')