From 04bd44553838b7e00063bd544e711bc8cf21dc57 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Mon, 16 Oct 2017 13:40:34 -0300 Subject: [PATCH] readd meson --- autogen.sh | 3 +- data/config/CMakeLists.txt | 4 +- data/config/noaur/CMakeLists.txt | 4 +- data/dbus/CMakeLists.txt | 12 +-- data/mime/CMakeLists.txt | 4 +- data/polkit/CMakeLists.txt | 4 +- data/systemd/CMakeLists.txt | 20 ++--- meson.build | 130 ++++++++++++++++++++++++++++ meson_options.txt | 2 + meson_scripts/install_data.sh | 7 ++ meson_scripts/install_library.sh | 9 ++ pamac.avprj | 24 ++--- po/meson.build | 2 + src/CMakeLists.txt | 3 +- src/aur/meson.build | 46 ++++++++++ src/meson.build | 78 +++++++++++++++++ src/pamac-clean-cache/meson.build | 34 ++++++++ src/pamac-install/CMakeLists.txt | 2 +- src/pamac-install/meson.build | 35 ++++++++ src/pamac-manager/CMakeLists.txt | 2 +- src/pamac-manager/meson.build | 44 ++++++++++ src/pamac-system-daemon/meson.build | 45 ++++++++++ src/pamac-tray/meson.build | 50 +++++++++++ src/pamac-user-daemon/meson.build | 41 +++++++++ 24 files changed, 564 insertions(+), 41 deletions(-) create mode 100644 meson.build create mode 100644 meson_options.txt create mode 100755 meson_scripts/install_data.sh create mode 100755 meson_scripts/install_library.sh create mode 100644 po/meson.build create mode 100644 src/aur/meson.build create mode 100644 src/meson.build create mode 100644 src/pamac-clean-cache/meson.build create mode 100644 src/pamac-install/meson.build create mode 100644 src/pamac-manager/meson.build create mode 100644 src/pamac-system-daemon/meson.build create mode 100644 src/pamac-tray/meson.build create mode 100644 src/pamac-user-daemon/meson.build diff --git a/autogen.sh b/autogen.sh index 1076e7b..27d7e2d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -8,7 +8,6 @@ popd # Update the autovala environment export AUTOVALA_CMAKE_SCRIPT="${PWD}"/autovala/cmake -autovala refresh -autovala cmake +autovala update cp "${PWD}"/autovala/configure "${PWD}"/configure cp "${PWD}"/autovala/configure-custom.sh "${PWD}"/.configure-custom.sh diff --git a/data/config/CMakeLists.txt b/data/config/CMakeLists.txt index 37dfe8f..23cf845 100644 --- a/data/config/CMakeLists.txt +++ b/data/config/CMakeLists.txt @@ -6,13 +6,13 @@ if (NOT(DISABLE_AUR)) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf DESTINATION - ${CMAKE_INSTALL_SYSCONFDIR} + /etc ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf DESTINATION - ${CMAKE_INSTALL_SYSCONFDIR} + /etc ) ENDIF() diff --git a/data/config/noaur/CMakeLists.txt b/data/config/noaur/CMakeLists.txt index 2c963ac..43039ab 100644 --- a/data/config/noaur/CMakeLists.txt +++ b/data/config/noaur/CMakeLists.txt @@ -6,13 +6,13 @@ if (DISABLE_AUR) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf DESTINATION - ${CMAKE_INSTALL_SYSCONFDIR} + /etc ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf DESTINATION - ${CMAKE_INSTALL_SYSCONFDIR} + /etc ) ENDIF() diff --git a/data/dbus/CMakeLists.txt b/data/dbus/CMakeLists.txt index 7f973d1..00f88f2 100644 --- a/data/dbus/CMakeLists.txt +++ b/data/dbus/CMakeLists.txt @@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf DESTINATION - ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d + /etc/dbus-1/system.d ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf DESTINATION - ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d + /etc/dbus-1/system.d ) ENDIF() @@ -19,13 +19,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services + /usr/share/dbus-1/services ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services + /usr/share/dbus-1/services ) ENDIF() @@ -33,13 +33,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services + /usr/share/dbus-1/system-services ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services + /usr/share/dbus-1/system-services ) ENDIF() diff --git a/data/mime/CMakeLists.txt b/data/mime/CMakeLists.txt index 6f33c81..e7cb0f9 100644 --- a/data/mime/CMakeLists.txt +++ b/data/mime/CMakeLists.txt @@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/x-alpm-package.xml) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/x-alpm-package.xml DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mime/packages + /usr/share/mime/packages ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/x-alpm-package.xml DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mime/packages + /usr/share/mime/packages ) ENDIF() diff --git a/data/polkit/CMakeLists.txt b/data/polkit/CMakeLists.txt index d2c61d6..9720717 100644 --- a/data/polkit/CMakeLists.txt +++ b/data/polkit/CMakeLists.txt @@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.policy) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.policy DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions + /usr/share/polkit-1/actions ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.policy DESTINATION - ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions + /usr/share/polkit-1/actions ) ENDIF() diff --git a/data/systemd/CMakeLists.txt b/data/systemd/CMakeLists.txt index b9a0035..070156a 100644 --- a/data/systemd/CMakeLists.txt +++ b/data/systemd/CMakeLists.txt @@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-system.service) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-system.service DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-system.service DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ENDIF() @@ -19,13 +19,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.service) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.service DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.service DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ENDIF() @@ -33,13 +33,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.timer) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.timer DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.timer DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ENDIF() @@ -47,13 +47,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.service) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.service DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.service DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ENDIF() @@ -61,13 +61,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.timer) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.timer DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ELSE() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.timer DESTINATION - ${CMAKE_INSTALL_LIBDIR}/systemd/system + /usr/lib/systemd/system ) ENDIF() diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..f52f072 --- /dev/null +++ b/meson.build @@ -0,0 +1,130 @@ +project('pamac',['c','vala']) + +DISABLE_AUR = (get_option('DISABLE_AUR') != '') +KDE_TRAY = (get_option('KDE_TRAY') != '') + +add_global_arguments('-DGETTEXT_PACKAGE="pamac"',language: 'c') + +gdk_3_0_dep = dependency('gdk-3.0') +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') +vte_2_91_dep = dependency('vte-2.91') +if KDE_TRAY +appindicator3_0_1_dep = dependency('appindicator3-0.1') +endif +gio_2_0_dep = dependency('gio-2.0') +glib_2_0_dep = dependency('glib-2.0') +gobject_2_0_dep = dependency('gobject-2.0') + +subdir('po') +meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/etc/dbus-1/system.d',join_paths(meson.current_source_dir(),'data/dbus','org.pamac.system.conf')) + +meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/dbus-1/services',join_paths(meson.current_source_dir(),'data/dbus','org.pamac.user.service')) + +meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/dbus-1/system-services',join_paths(meson.current_source_dir(),'data/dbus','org.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-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')) + +meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/polkit-1/actions',join_paths(meson.current_source_dir(),'data/polkit','org.pamac.policy')) + +meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/mime/packages',join_paths(meson.current_source_dir(),'data/mime','x-alpm-package.xml')) + +if DISABLE_AUR + meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/etc',join_paths(meson.current_source_dir(),'data/config/noaur','pamac.conf')) + +else + meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/etc',join_paths(meson.current_source_dir(),'data/config','pamac.conf')) + +endif +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']) + +if DISABLE_AUR + pamac_manager_no_aur_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.manager_no_aur.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c') + + pamac_manager_no_aur_gresource_xml_file_c = pamac_manager_no_aur_gresource_xml_generator.process(['data/pamac.manager_no_aur.gresource.xml']) + + pamac_transaction_no_aur_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.transaction_no_aur.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c') + + pamac_transaction_no_aur_gresource_xml_file_c = pamac_transaction_no_aur_gresource_xml_generator.process(['data/pamac.transaction_no_aur.gresource.xml']) + +else + 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') + + pamac_manager_gresource_xml_file_c = pamac_manager_gresource_xml_generator.process(['data/pamac.manager.gresource.xml']) + + 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') + + pamac_transaction_gresource_xml_file_c = pamac_transaction_gresource_xml_generator.process(['data/pamac.transaction.gresource.xml']) + +endif +if KDE_TRAY +else +endif +if DISABLE_AUR +else +endif +meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),join_paths(get_option('prefix'),get_option('datadir'),'doc'),join_paths(meson.current_source_dir(),'doc','','*')) + +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')) +if KDE_TRAY + if (get_option('prefix').startswith('/home/')) + 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') + else + install_data('data/pamac-tray-appindicator.desktop',install_dir: '/etc/xdg/autostart') + endif +else + if (get_option('prefix').startswith('/home/')) + message('Autostart file data/pamac-tray.desktop will not be installed. You must create your own .desktop file and put it at ~/.config/autostart') + else + install_data('data/pamac-tray.desktop',install_dir: '/etc/xdg/autostart') + endif +endif + install_data('data/interface/choose_ignorepkgs_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) + install_data('data/interface/choose_provider_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) + install_data('data/interface/history_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) + install_data('data/interface/progress_box.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) + install_data('data/interface/transaction_sum_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +if DISABLE_AUR + install_data('data/interface/manager_window_no_aur.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) + install_data('data/interface/preferences_dialog_no_aur.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +else + install_data('data/interface/manager_window.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) + install_data('data/interface/preferences_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +endif +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')) +install_data('data/pixmaps/package-available-locked.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-available.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-generic.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-install.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-installed-locked.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-installed-updated.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-reinstall.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-remove.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +install_data('data/pixmaps/package-upgrade.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +subdir('src') +subdir('src/aur') +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') diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..ee82d80 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('DISABLE_AUR',type : 'string', value: '') +option('KDE_TRAY',type : 'string', value: '') diff --git a/meson_scripts/install_data.sh b/meson_scripts/install_data.sh new file mode 100755 index 0000000..ef49c11 --- /dev/null +++ b/meson_scripts/install_data.sh @@ -0,0 +1,7 @@ +#!/bin/sh +mkdir -p $DESTDIR/$1 +if [[ -d $2 ]]; then + cp -a $2/* $DESTDIR/$1 +else + cp -a $2 $DESTDIR/$1 +fi diff --git a/meson_scripts/install_library.sh b/meson_scripts/install_library.sh new file mode 100755 index 0000000..6f7525a --- /dev/null +++ b/meson_scripts/install_library.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/share/vala/vapi" +mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/share/gir-1.0" +mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/include" + +install -m 644 "${MESON_BUILD_ROOT}/$1/$2.vapi" "${DESTDIR}${MESON_INSTALL_PREFIX}/share/vala/vapi" +install -m 644 "${MESON_BUILD_ROOT}/$1/$2.h" "${DESTDIR}${MESON_INSTALL_PREFIX}/include" +install -m 644 "${MESON_BUILD_ROOT}/$1/$2@sha/$3" "${DESTDIR}${MESON_INSTALL_PREFIX}/share/gir-1.0" diff --git a/pamac.avprj b/pamac.avprj index 8950e0b..f0ad4b4 100644 --- a/pamac.avprj +++ b/pamac.avprj @@ -3,20 +3,20 @@ autovala_version: 24 project_name: pamac vala_version: 0.38 -custom: data/dbus/org.pamac.system.conf ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d -custom: data/dbus/org.pamac.user.service ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services -custom: data/dbus/org.pamac.system.service ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services -custom: data/systemd/pamac-system.service ${CMAKE_INSTALL_LIBDIR}/systemd/system -custom: data/systemd/pamac-cleancache.service ${CMAKE_INSTALL_LIBDIR}/systemd/system -custom: data/systemd/pamac-cleancache.timer ${CMAKE_INSTALL_LIBDIR}/systemd/system -custom: data/systemd/pamac-mirrorlist.service ${CMAKE_INSTALL_LIBDIR}/systemd/system -custom: data/systemd/pamac-mirrorlist.timer ${CMAKE_INSTALL_LIBDIR}/systemd/system -custom: data/polkit/org.pamac.policy ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions -custom: data/mime/x-alpm-package.xml ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mime/packages +custom: data/dbus/org.pamac.system.conf /etc/dbus-1/system.d +custom: data/dbus/org.pamac.user.service /usr/share/dbus-1/services +custom: data/dbus/org.pamac.system.service /usr/share/dbus-1/system-services +custom: data/systemd/pamac-system.service /usr/lib/systemd/system +custom: data/systemd/pamac-cleancache.service /usr/lib/systemd/system +custom: data/systemd/pamac-cleancache.timer /usr/lib/systemd/system +custom: data/systemd/pamac-mirrorlist.service /usr/lib/systemd/system +custom: data/systemd/pamac-mirrorlist.timer /usr/lib/systemd/system +custom: data/polkit/org.pamac.policy /usr/share/polkit-1/actions +custom: data/mime/x-alpm-package.xml /usr/share/mime/packages if DISABLE_AUR -custom: data/config/noaur/pamac.conf ${CMAKE_INSTALL_SYSCONFDIR} +custom: data/config/noaur/pamac.conf /etc else -custom: data/config/pamac.conf ${CMAKE_INSTALL_SYSCONFDIR} +custom: data/config/pamac.conf /etc end define: KDE_TRAY diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..7c723a0 --- /dev/null +++ b/po/meson.build @@ -0,0 +1,2 @@ +i18n = import('i18n') +i18n.gettext('pamac', languages: ['af', 'ar', 'es_ES', 'nn', 'sl_SI', 'cs_CZ', 'is', 'gl', 'be', 'sr_RS', 'zh_TW', 'pl_PL', 'uz', 'fi', 'is_IS', 'sr_RS@latin', 'sl', 'sr@latin', 'fr', 'ro', 'sr', 'el', 'eu', 'ml', 'ur_PK', 'ko', 'el_GR', 'de_DE', 'cs', 'bs', 'si', 'zh', 'da', 'ca_ES', 'sv', 'it_IT', 'vi', 'eo', 'es_AR', 'zh_CN', 'pl', 'hi', 'pt', 'en_GB', 'es', 'es_MX', 'fa', 'nl', 'hu', 'bn', 'hr_HR', 'nb', 'ja', 'pt_BR', 'pt_PT', 'nl_BE', 'ca', 'tr', 'he', 'hi_IN', 'et', 'lt', 'fo', 'it', 'fa_IR', 'es_419', 'de_CH', 'de', 'ka', 'bs_BA', 'ru', 'ms', 'sk', 'bg', 'ast', 'uk', 'hr', 'es_SV', 'nl_NL', 'cy', 'id', 'az_AZ']) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 326f7dc..55dd6e3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -82,7 +82,8 @@ GENERATE_HEADER SET (VALA_C ${VALA_C} ${pamac_transaction_gresource_xml_C_FILE}) add_library(Pamac SHARED ${VALA_C}) -add_dependencies (Pamac pamac_transaction_gresource_xml) +set ( Pamac_DEPENDENCIES ${Pamac_DEPENDENCIES} pamac_transaction_gresource_xml ) +add_dependencies( Pamac ${Pamac_DEPENDENCIES} ) target_link_libraries( Pamac m ) set_target_properties( Pamac PROPERTIES VERSION diff --git a/src/aur/meson.build b/src/aur/meson.build new file mode 100644 index 0000000..e8624b9 --- /dev/null +++ b/src/aur/meson.build @@ -0,0 +1,46 @@ +cfg_aur = configuration_data() +cfg_aur.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_aur.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_aur.set('GETTEXT_PACKAGE', 'pamac') +cfg_aur.set('RELEASE_NAME', 'pamac') +cfg_aur.set('PREFIX', get_option('prefix')) +cfg_aur.set('VERSION', '6.1.0') +cfg_aur.set('TESTSRCDIR', meson.source_root()) + +cfgfile_2 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_aur) + +aur_deps = [json_glib_1_0_dep] +aur_deps += [libsoup_2_4_dep] +aur_deps += [glib_2_0_dep] +aur_sources = [cfgfile_2] +aur_sources += ['aur.vala'] +aur_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +aur_c_args = [] +if DISABLE_AUR + aur_vala_args += ['-D', 'DISABLE_AUR'] + aur_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + aur_vala_args += ['-D', 'KDE_TRAY'] + aur_c_args += ['-DKDE_TRAY'] +endif +aur_vala_args += ['--gir=AUR-6.0.gir'] + + +AUR_library = shared_library('AUR',aur_sources,dependencies: aur_deps,vala_args: aur_vala_args,c_args: aur_c_args,version: '6.1.0',soversion: '6',install: true) + +aur_requires = [] +aur_requires += ['json-glib-1.0'] +aur_requires += ['libsoup-2.4'] +aur_requires += ['glib-2.0'] +pkg_mod = import('pkgconfig') +pkg_mod.generate(libraries : AUR_library, + version : '6.1.0', + name : 'AUR', + filebase : 'AUR', + description : 'AUR', + requires : aur_requires) + +install_data(join_paths(meson.current_source_dir(),'AUR.deps'),install_dir: join_paths(get_option('prefix'),'share','vala','vapi')) +meson.add_install_script(join_paths(meson.source_root(),'meson_scripts','install_library.sh'),'src/aur','AUR','AUR-6.0.gir') + diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..1c26234 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,78 @@ +cfg_pamac = configuration_data() +cfg_pamac.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_pamac.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_pamac.set('GETTEXT_PACKAGE', 'pamac') +cfg_pamac.set('RELEASE_NAME', 'pamac') +cfg_pamac.set('PREFIX', get_option('prefix')) +cfg_pamac.set('VERSION', '6.1.0') +cfg_pamac.set('TESTSRCDIR', meson.source_root()) + +cfgfile_1 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac) + +pamac_deps = [gdk_3_0_dep] +pamac_deps += [gtk_3_0_dep] +pamac_deps += [libalpm_dep] +pamac_deps += [libnotify_dep] +pamac_deps += [vte_2_91_dep] +pamac_deps += [gio_2_0_dep] +pamac_deps += [glib_2_0_dep] +pamac_deps += [gobject_2_0_dep] +pamac_sources = [cfgfile_1] +pamac_sources += ['alpm_config.vala'] +pamac_sources += ['choose_ignorepkgs_dialog.vala'] +pamac_sources += ['choose_provider_dialog.vala'] +pamac_sources += ['common.vala'] +pamac_sources += ['mirrors_config.vala'] +pamac_sources += ['package.vala'] +pamac_sources += ['pamac_config.vala'] +pamac_sources += ['preferences_dialog.vala'] +pamac_sources += ['progress_box.vala'] +pamac_sources += ['transaction.vala'] +pamac_sources += ['transaction_sum_dialog.vala'] +if DISABLE_AUR +pamac_sources += [pamac_transaction_no_aur_gresource_xml_file_c] +else +pamac_sources += [pamac_transaction_gresource_xml_file_c] +endif +pamac_vala_args = ['--pkg','posix'] +pamac_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +if DISABLE_AUR +pamac_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction_no_aur.gresource.xml')] +else +pamac_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction.gresource.xml')] +endif +pamac_c_args = [] +if DISABLE_AUR + pamac_vala_args += ['-D', 'DISABLE_AUR'] + pamac_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + pamac_vala_args += ['-D', 'KDE_TRAY'] + pamac_c_args += ['-DKDE_TRAY'] +endif +pamac_deps += [meson.get_compiler('c').find_library('m', required : false)] +pamac_vala_args += ['--gir=Pamac-6.0.gir'] + + +Pamac_library = shared_library('Pamac',pamac_sources,dependencies: pamac_deps,vala_args: pamac_vala_args,c_args: pamac_c_args,version: '6.1.0',soversion: '6',install: true) + +pamac_requires = [] +pamac_requires += ['gdk-3.0'] +pamac_requires += ['gtk+-3.0'] +pamac_requires += ['libalpm'] +pamac_requires += ['libnotify'] +pamac_requires += ['vte-2.91'] +pamac_requires += ['gio-2.0'] +pamac_requires += ['glib-2.0'] +pamac_requires += ['gobject-2.0'] +pkg_mod = import('pkgconfig') +pkg_mod.generate(libraries : Pamac_library, + version : '6.1.0', + name : 'Pamac', + filebase : 'Pamac', + description : 'Pamac', + requires : pamac_requires) + +install_data(join_paths(meson.current_source_dir(),'Pamac.deps'),install_dir: join_paths(get_option('prefix'),'share','vala','vapi')) +meson.add_install_script(join_paths(meson.source_root(),'meson_scripts','install_library.sh'),'src','Pamac','Pamac-6.0.gir') + diff --git a/src/pamac-clean-cache/meson.build b/src/pamac-clean-cache/meson.build new file mode 100644 index 0000000..2c0d7ad --- /dev/null +++ b/src/pamac-clean-cache/meson.build @@ -0,0 +1,34 @@ +cfg_pamac_clean_cache = configuration_data() +cfg_pamac_clean_cache.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_pamac_clean_cache.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_pamac_clean_cache.set('GETTEXT_PACKAGE', 'pamac') +cfg_pamac_clean_cache.set('RELEASE_NAME', 'pamac') +cfg_pamac_clean_cache.set('PREFIX', get_option('prefix')) +cfg_pamac_clean_cache.set('VERSION', '6.1.0') +cfg_pamac_clean_cache.set('TESTSRCDIR', meson.source_root()) + +cfgfile_5 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_clean_cache) + +pamac_clean_cache_deps = [gtk_3_0_dep] +pamac_clean_cache_deps += [gio_2_0_dep] +pamac_clean_cache_deps += [glib_2_0_dep] +pamac_clean_cache_deps += [gobject_2_0_dep] +pamac_clean_cache_sources = [cfgfile_5] +pamac_clean_cache_sources += ['clean_cache.vala'] +pamac_clean_cache_sources += ['pamac_config.vala'] +pamac_clean_cache_vala_args = ['--pkg','posix'] +pamac_clean_cache_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +pamac_clean_cache_dependencies = [Pamac_library] +pamac_clean_cache_c_args = [] +if DISABLE_AUR + pamac_clean_cache_vala_args += ['-D', 'DISABLE_AUR'] + pamac_clean_cache_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + pamac_clean_cache_vala_args += ['-D', 'KDE_TRAY'] + pamac_clean_cache_c_args += ['-DKDE_TRAY'] +endif +pamac_clean_cache_hfolders = ['../../src'] + +executable('pamac-clean-cache',pamac_clean_cache_sources,dependencies: pamac_clean_cache_deps,vala_args: pamac_clean_cache_vala_args,c_args: pamac_clean_cache_c_args,link_with: pamac_clean_cache_dependencies,include_directories: include_directories(pamac_clean_cache_hfolders),install: true) + diff --git a/src/pamac-install/CMakeLists.txt b/src/pamac-install/CMakeLists.txt index 55b375c..84c6988 100644 --- a/src/pamac-install/CMakeLists.txt +++ b/src/pamac-install/CMakeLists.txt @@ -64,7 +64,7 @@ OPTIONS SET (VALA_C ${VALA_C} ${pamac_installer_gresource_xml_C_FILE}) add_executable(pamac-install ${VALA_C}) -add_dependencies (pamac-install pamac_installer_gresource_xml) +set ( pamac-install_DEPENDENCIES ${pamac-install_DEPENDENCIES} pamac_installer_gresource_xml ) set ( pamac-install_DEPENDENCIES ${pamac-install_DEPENDENCIES} Pamac ) add_dependencies( pamac-install ${pamac-install_DEPENDENCIES} ) diff --git a/src/pamac-install/meson.build b/src/pamac-install/meson.build new file mode 100644 index 0000000..2f60cdf --- /dev/null +++ b/src/pamac-install/meson.build @@ -0,0 +1,35 @@ +cfg_pamac_install = configuration_data() +cfg_pamac_install.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_pamac_install.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_pamac_install.set('GETTEXT_PACKAGE', 'pamac') +cfg_pamac_install.set('RELEASE_NAME', 'pamac') +cfg_pamac_install.set('PREFIX', get_option('prefix')) +cfg_pamac_install.set('VERSION', '6.1.0') +cfg_pamac_install.set('TESTSRCDIR', meson.source_root()) + +cfgfile_6 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_install) + +pamac_install_deps = [gtk_3_0_dep] +pamac_install_deps += [gio_2_0_dep] +pamac_install_deps += [glib_2_0_dep] +pamac_install_deps += [gobject_2_0_dep] +pamac_install_sources = [cfgfile_6] +pamac_install_sources += ['installer.vala'] +pamac_install_sources += ['progress_dialog.vala'] +pamac_install_sources += [pamac_installer_gresource_xml_file_c] +pamac_install_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +pamac_install_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.installer.gresource.xml')] +pamac_install_dependencies = [Pamac_library] +pamac_install_c_args = [] +if DISABLE_AUR + pamac_install_vala_args += ['-D', 'DISABLE_AUR'] + pamac_install_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + pamac_install_vala_args += ['-D', 'KDE_TRAY'] + pamac_install_c_args += ['-DKDE_TRAY'] +endif +pamac_install_hfolders = ['../../src'] + +executable('pamac-install',pamac_install_sources,dependencies: pamac_install_deps,vala_args: pamac_install_vala_args,c_args: pamac_install_c_args,link_with: pamac_install_dependencies,include_directories: include_directories(pamac_install_hfolders),install: true) + diff --git a/src/pamac-manager/CMakeLists.txt b/src/pamac-manager/CMakeLists.txt index ecdabf6..681c8f6 100644 --- a/src/pamac-manager/CMakeLists.txt +++ b/src/pamac-manager/CMakeLists.txt @@ -66,7 +66,7 @@ OPTIONS SET (VALA_C ${VALA_C} ${pamac_manager_gresource_xml_C_FILE}) add_executable(pamac-manager ${VALA_C}) -add_dependencies (pamac-manager pamac_manager_gresource_xml) +set ( pamac-manager_DEPENDENCIES ${pamac-manager_DEPENDENCIES} pamac_manager_gresource_xml ) set ( pamac-manager_DEPENDENCIES ${pamac-manager_DEPENDENCIES} Pamac ) add_dependencies( pamac-manager ${pamac-manager_DEPENDENCIES} ) diff --git a/src/pamac-manager/meson.build b/src/pamac-manager/meson.build new file mode 100644 index 0000000..fb2f5dc --- /dev/null +++ b/src/pamac-manager/meson.build @@ -0,0 +1,44 @@ +cfg_pamac_manager = configuration_data() +cfg_pamac_manager.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_pamac_manager.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_pamac_manager.set('GETTEXT_PACKAGE', 'pamac') +cfg_pamac_manager.set('RELEASE_NAME', 'pamac') +cfg_pamac_manager.set('PREFIX', get_option('prefix')) +cfg_pamac_manager.set('VERSION', '6.1.0') +cfg_pamac_manager.set('TESTSRCDIR', meson.source_root()) + +cfgfile_7 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_manager) + +pamac_manager_deps = [gtk_3_0_dep] +pamac_manager_deps += [gio_2_0_dep] +pamac_manager_deps += [glib_2_0_dep] +pamac_manager_deps += [gobject_2_0_dep] +pamac_manager_sources = [cfgfile_7] +pamac_manager_sources += ['history_dialog.vala'] +pamac_manager_sources += ['manager.vala'] +pamac_manager_sources += ['manager_window.vala'] +if DISABLE_AUR +pamac_manager_sources += [pamac_manager_no_aur_gresource_xml_file_c] +else +pamac_manager_sources += [pamac_manager_gresource_xml_file_c] +endif +pamac_manager_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +if DISABLE_AUR +pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager_no_aur.gresource.xml')] +else +pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager.gresource.xml')] +endif +pamac_manager_dependencies = [Pamac_library] +pamac_manager_c_args = [] +if DISABLE_AUR + pamac_manager_vala_args += ['-D', 'DISABLE_AUR'] + pamac_manager_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + pamac_manager_vala_args += ['-D', 'KDE_TRAY'] + pamac_manager_c_args += ['-DKDE_TRAY'] +endif +pamac_manager_hfolders = ['../../src'] + +executable('pamac-manager',pamac_manager_sources,dependencies: pamac_manager_deps,vala_args: pamac_manager_vala_args,c_args: pamac_manager_c_args,link_with: pamac_manager_dependencies,include_directories: include_directories(pamac_manager_hfolders),install: true) + diff --git a/src/pamac-system-daemon/meson.build b/src/pamac-system-daemon/meson.build new file mode 100644 index 0000000..fec7bed --- /dev/null +++ b/src/pamac-system-daemon/meson.build @@ -0,0 +1,45 @@ +cfg_pamac_system_daemon = configuration_data() +cfg_pamac_system_daemon.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_pamac_system_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_pamac_system_daemon.set('GETTEXT_PACKAGE', 'pamac') +cfg_pamac_system_daemon.set('RELEASE_NAME', 'pamac') +cfg_pamac_system_daemon.set('PREFIX', get_option('prefix')) +cfg_pamac_system_daemon.set('VERSION', '6.1.0') +cfg_pamac_system_daemon.set('TESTSRCDIR', meson.source_root()) + +cfgfile_8 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_system_daemon) + +pamac_system_daemon_deps = [gtk_3_0_dep] +pamac_system_daemon_deps += [json_glib_1_0_dep] +pamac_system_daemon_deps += [libalpm_dep] +pamac_system_daemon_deps += [libcurl_dep] +pamac_system_daemon_deps += [libsoup_2_4_dep] +pamac_system_daemon_deps += [polkit_gobject_1_dep] +pamac_system_daemon_deps += [gio_2_0_dep] +pamac_system_daemon_deps += [glib_2_0_dep] +pamac_system_daemon_deps += [gobject_2_0_dep] +pamac_system_daemon_sources = [cfgfile_8] +pamac_system_daemon_sources += ['alpm_config.vala'] +pamac_system_daemon_sources += ['mirrors_config.vala'] +pamac_system_daemon_sources += ['pamac_config.vala'] +pamac_system_daemon_sources += ['system_daemon.vala'] +pamac_system_daemon_vala_args = ['--pkg','posix'] +pamac_system_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +pamac_system_daemon_dependencies = [Pamac_library] +if not DISABLE_AUR +pamac_system_daemon_dependencies += [AUR_library] +endif +pamac_system_daemon_c_args = [] +if DISABLE_AUR + pamac_system_daemon_vala_args += ['-D', 'DISABLE_AUR'] + pamac_system_daemon_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + pamac_system_daemon_vala_args += ['-D', 'KDE_TRAY'] + pamac_system_daemon_c_args += ['-DKDE_TRAY'] +endif +pamac_system_daemon_hfolders = ['../../src'] +pamac_system_daemon_hfolders += ['../../src/aur'] + +executable('pamac-system-daemon',pamac_system_daemon_sources,dependencies: pamac_system_daemon_deps,vala_args: pamac_system_daemon_vala_args,c_args: pamac_system_daemon_c_args,link_with: pamac_system_daemon_dependencies,include_directories: include_directories(pamac_system_daemon_hfolders),install: true) + diff --git a/src/pamac-tray/meson.build b/src/pamac-tray/meson.build new file mode 100644 index 0000000..460b9b7 --- /dev/null +++ b/src/pamac-tray/meson.build @@ -0,0 +1,50 @@ +cfg_pamac_tray = configuration_data() +cfg_pamac_tray.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_pamac_tray.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_pamac_tray.set('GETTEXT_PACKAGE', 'pamac') +cfg_pamac_tray.set('RELEASE_NAME', 'pamac') +cfg_pamac_tray.set('PREFIX', get_option('prefix')) +cfg_pamac_tray.set('VERSION', '6.1.0') +cfg_pamac_tray.set('TESTSRCDIR', meson.source_root()) + +cfgfile_4 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_tray) + +pamac_tray_deps = [json_glib_1_0_dep] +pamac_tray_deps += [libnotify_dep] +if KDE_TRAY +pamac_tray_deps += [appindicator3_0_1_dep] +else +pamac_tray_deps += [gtk_3_0_dep] +endif +pamac_tray_deps += [gio_2_0_dep] +pamac_tray_deps += [glib_2_0_dep] +pamac_tray_deps += [gobject_2_0_dep] +pamac_tray_sources = [cfgfile_4] +if KDE_TRAY +pamac_tray_sources += ['tray-appindicator.vala'] +else +pamac_tray_sources += ['tray-gtk.vala'] +endif +pamac_tray_sources += ['pamac_config.vala'] +pamac_tray_sources += ['tray.vala'] +pamac_tray_sources += ['user_daemon.vala'] +pamac_tray_vala_args = ['--pkg','posix'] +pamac_tray_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +pamac_tray_dependencies = [Pamac_library] +if not DISABLE_AUR +pamac_tray_dependencies += [AUR_library] +endif +pamac_tray_c_args = [] +if DISABLE_AUR + pamac_tray_vala_args += ['-D', 'DISABLE_AUR'] + pamac_tray_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + pamac_tray_vala_args += ['-D', 'KDE_TRAY'] + pamac_tray_c_args += ['-DKDE_TRAY'] +endif +pamac_tray_hfolders = ['../../src'] +pamac_tray_hfolders += ['../../src/aur'] + +executable('pamac-tray',pamac_tray_sources,dependencies: pamac_tray_deps,vala_args: pamac_tray_vala_args,c_args: pamac_tray_c_args,link_with: pamac_tray_dependencies,include_directories: include_directories(pamac_tray_hfolders),install: true) + diff --git a/src/pamac-user-daemon/meson.build b/src/pamac-user-daemon/meson.build new file mode 100644 index 0000000..12d8661 --- /dev/null +++ b/src/pamac-user-daemon/meson.build @@ -0,0 +1,41 @@ +cfg_pamac_user_daemon = configuration_data() +cfg_pamac_user_daemon.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir'))) +cfg_pamac_user_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac')) +cfg_pamac_user_daemon.set('GETTEXT_PACKAGE', 'pamac') +cfg_pamac_user_daemon.set('RELEASE_NAME', 'pamac') +cfg_pamac_user_daemon.set('PREFIX', get_option('prefix')) +cfg_pamac_user_daemon.set('VERSION', '6.1.0') +cfg_pamac_user_daemon.set('TESTSRCDIR', meson.source_root()) + +cfgfile_3 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_user_daemon) + +pamac_user_daemon_deps = [gtk_3_0_dep] +pamac_user_daemon_deps += [json_glib_1_0_dep] +pamac_user_daemon_deps += [libalpm_dep] +pamac_user_daemon_deps += [libsoup_2_4_dep] +pamac_user_daemon_deps += [gio_2_0_dep] +pamac_user_daemon_deps += [glib_2_0_dep] +pamac_user_daemon_deps += [gobject_2_0_dep] +pamac_user_daemon_sources = [cfgfile_3] +pamac_user_daemon_sources += ['alpm_config.vala'] +pamac_user_daemon_sources += ['user_daemon.vala'] +pamac_user_daemon_vala_args = ['--pkg','posix'] +pamac_user_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')] +pamac_user_daemon_dependencies = [Pamac_library] +if not DISABLE_AUR +pamac_user_daemon_dependencies += [AUR_library] +endif +pamac_user_daemon_c_args = [] +if DISABLE_AUR + pamac_user_daemon_vala_args += ['-D', 'DISABLE_AUR'] + pamac_user_daemon_c_args += ['-DDISABLE_AUR'] +endif +if KDE_TRAY + pamac_user_daemon_vala_args += ['-D', 'KDE_TRAY'] + pamac_user_daemon_c_args += ['-DKDE_TRAY'] +endif +pamac_user_daemon_hfolders = ['../../src'] +pamac_user_daemon_hfolders += ['../../src/aur'] + +executable('pamac-user-daemon',pamac_user_daemon_sources,dependencies: pamac_user_daemon_deps,vala_args: pamac_user_daemon_vala_args,c_args: pamac_user_daemon_c_args,link_with: pamac_user_daemon_dependencies,include_directories: include_directories(pamac_user_daemon_hfolders),install: true) +