2017-11-16 21:43:51 -03:00
project ( 'pamac' , [ 'c' , 'vala' ] )
2017-10-16 13:40:34 -03:00
2017-10-29 14:28:26 -03:00
ENABLE_UPDATE_ICON = ( get_option ( 'ENABLE_UPDATE_ICON' ) != '' )
2017-11-01 20:02:27 -03:00
ENABLE_HAMBURGER = ( get_option ( 'ENABLE_HAMBURGER' ) != '' )
2017-10-16 13:40:34 -03:00
KDE_TRAY = ( get_option ( 'KDE_TRAY' ) != '' )
2017-11-11 11:30:47 -03:00
DISABLE_AUR = ( get_option ( 'DISABLE_AUR' ) != '' )
2017-10-16 13:40:34 -03:00
2017-11-16 21:43:51 -03:00
add_global_arguments ( '-DGETTEXT_PACKAGE="pamac"' , language : 'c' )
2017-10-16 13:40:34 -03:00
2019-06-29 12:07:48 -04:00
find_program ( 'glib-compile-resources' )
find_program ( 'gtk-update-icon-cache' , 'gtk-update-icon-cache.3.0' )
find_program ( 'glib-compile-schemas' )
find_program ( 'g-ir-compiler' )
2017-10-16 13:40:34 -03:00
gtk_3_0_dep = dependency ( 'gtk+-3.0' )
json_glib_1_0_dep = dependency ( 'json-glib-1.0' )
libalpm_dep = dependency ( 'libalpm' )
libcurl_dep = dependency ( 'libcurl' )
libnotify_dep = dependency ( 'libnotify' )
libsoup_2_4_dep = dependency ( 'libsoup-2.4' )
polkit_gobject_1_dep = dependency ( 'polkit-gobject-1' )
if KDE_TRAY
appindicator3_0_1_dep = dependency ( 'appindicator3-0.1' )
endif
2019-07-06 20:28:51 -04:00
atk_dep = dependency ( 'atk' )
2020-04-01 21:04:31 -03:00
cairo_gobject_dep = dependency ( 'cairo-gobject' )
2019-07-06 20:28:51 -04:00
gdk_3_0_dep = dependency ( 'gdk-3.0' )
gdk_pixbuf_2_0_dep = dependency ( 'gdk-pixbuf-2.0' )
2017-10-16 13:40:34 -03:00
gio_2_0_dep = dependency ( 'gio-2.0' )
glib_2_0_dep = dependency ( 'glib-2.0' )
gobject_2_0_dep = dependency ( 'gobject-2.0' )
2019-07-06 20:28:51 -04:00
pango_dep = dependency ( 'pango' )
vte_2_91_dep = dependency ( 'vte-2.91' )
x11_dep = dependency ( 'x11' )
2017-10-16 13:40:34 -03:00
subdir ( 'po' )
2017-10-29 12:14:28 -03:00
cfg_dbus_data = configuration_data ( )
cfg_dbus_data . set ( 'DBUS_PREFIX' , get_option ( 'prefix' ) )
2019-06-29 12:07:48 -04:00
meson . add_install_script ( 'meson_scripts/update_icon.sh' )
2017-10-16 13:40:34 -03:00
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' ) )
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' ) )
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' ) )
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' ) )
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' ) )
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' )
pamac_installer_gresource_xml_file_c = pamac_installer_gresource_xml_generator . process ( [ 'data/pamac.installer.gresource.xml' ] )
2017-10-17 12:40:27 -03:00
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' )
2017-10-16 13:40:34 -03:00
2017-10-17 12:40:27 -03:00
pamac_manager_gresource_xml_file_c = pamac_manager_gresource_xml_generator . process ( [ 'data/pamac.manager.gresource.xml' ] )
2017-10-16 13:40:34 -03:00
2017-10-17 12:40:27 -03:00
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' )
2017-10-16 13:40:34 -03:00
2017-10-17 12:40:27 -03:00
pamac_transaction_gresource_xml_file_c = pamac_transaction_gresource_xml_generator . process ( [ 'data/pamac.transaction.gresource.xml' ] )
2017-10-16 13:40:34 -03:00
install_data ( 'data/pamac-install.desktop' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'applications' ) )
install_data ( 'data/pamac-manager.desktop' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'applications' ) )
2017-10-29 14:28:26 -03:00
if ENABLE_UPDATE_ICON
install_data ( 'data/pamac-updater.desktop' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'applications' ) )
endif
2017-10-16 13:40:34 -03:00
if KDE_TRAY
if ( get_option ( 'prefix' ) . startswith ( '/home/' ) )
message ( ' [33mAutostart file data/pamac-tray-appindicator.desktop will not be installed. You must create your own .desktop file and put it at ~/.config/autostart [39m' )
else
install_data ( 'data/pamac-tray-appindicator.desktop' , install_dir : '/etc/xdg/autostart' )
endif
else
if ( get_option ( 'prefix' ) . startswith ( '/home/' ) )
message ( ' [33mAutostart file data/pamac-tray.desktop will not be installed. You must create your own .desktop file and put it at ~/.config/autostart [39m' )
else
install_data ( 'data/pamac-tray.desktop' , install_dir : '/etc/xdg/autostart' )
endif
endif
2017-10-29 12:14:28 -03:00
dbus_cfg_org_pamac_system_service = configure_file ( input : 'data/dbus/org.pamac.system.service' , output : 'org.pamac.system.service' , configuration : cfg_dbus_data )
install_data ( dbus_cfg_org_pamac_system_service , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'dbus-1' , 'system-services' ) )
dbus_cfg_org_pamac_user_service = configure_file ( input : 'data/dbus/org.pamac.user.service' , output : 'org.pamac.user.service' , configuration : cfg_dbus_data )
install_data ( dbus_cfg_org_pamac_user_service , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'dbus-1' , 'services' ) )
2017-10-29 17:23:58 -03:00
install_data ( 'data/dbus/org.pamac.system.conf' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'dbus-1' , 'system.d' ) )
2017-11-11 11:30:47 -03:00
install_data ( 'data/org.pamac.main.gschema.xml' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'glib-2.0' , 'schemas' ) )
2019-06-29 12:07:48 -04:00
meson . add_install_script ( 'meson_scripts/install_schemas.sh' )
2017-11-11 11:30:47 -03:00
if not DISABLE_AUR
install_data ( 'data/org.pamac.aur.gschema.xml' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'glib-2.0' , 'schemas' ) )
2019-06-29 12:07:48 -04:00
meson . add_install_script ( 'meson_scripts/install_schemas.sh' )
2017-11-11 11:30:47 -03:00
endif
2017-10-16 13:40:34 -03:00
install_data ( 'data/icons/16x16/apps/system-software-install.png' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'icons' , 'hicolor/16x16/apps' ) )
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' ) )
install_data ( 'data/icons/24x24/status/pamac-tray-update.png' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'icons' , 'hicolor/24x24/apps' ) )
install_data ( 'data/icons/32x32/apps/system-software-install.png' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'icons' , 'hicolor/32x32/apps' ) )
2017-11-16 21:43:51 -03:00
install_data ( 'data/pixmaps/package-generic.png' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'pamac' ) )
2017-10-30 20:18:44 -03:00
install_data ( 'data/polkit/org.pamac.policy' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'polkit-1' , 'actions' ) )
install_data ( 'data/mime/x-alpm-package.xml' , install_dir : join_paths ( get_option ( 'prefix' ) , get_option ( 'datadir' ) , 'mime' , 'packages' ) )
2017-10-16 13:40:34 -03:00
subdir ( 'src' )
subdir ( 'src/pamac-user-daemon' )
subdir ( 'src/pamac-tray' )
subdir ( 'src/pamac-clean-cache' )
subdir ( 'src/pamac-install' )
subdir ( 'src/pamac-manager' )
subdir ( 'src/pamac-system-daemon' )