From 47d718463824c65f6d0c7f0102f45cbfadccc693 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Sun, 29 Oct 2017 12:14:28 -0300 Subject: [PATCH] update build with new autovala --- .gitignore | 3 +++ data/dbus/CMakeLists.txt | 33 +++++------------------------- data/dbus/org.pamac.system.service | 2 +- data/dbus/org.pamac.user.service | 2 +- meson.build | 12 +++++++---- pamac.avprj | 9 +++++--- po/pamac.pot | 2 +- src/pamac-manager/meson.build | 2 +- 8 files changed, 26 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index bd4c19e..d4fb4e4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ PKGBUILD *.pkg.tar.xz *.pkg.tar.xz.sig /build +.bzrignore +.hgignore +data/local/ diff --git a/data/dbus/CMakeLists.txt b/data/dbus/CMakeLists.txt index 00f88f2..44e9624 100644 --- a/data/dbus/CMakeLists.txt +++ b/data/dbus/CMakeLists.txt @@ -1,6 +1,7 @@ ### CMakeLists automatically created with AutoVala ### Do not edit +SET(DBUS_PREFIX ${CMAKE_INSTALL_PREFIX}) IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf @@ -15,31 +16,7 @@ ELSE() ) ENDIF() -IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service) - install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service - DESTINATION - /usr/share/dbus-1/services - ) -ELSE() - install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service - DESTINATION - /usr/share/dbus-1/services - ) -ENDIF() - -IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service) - install(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service - DESTINATION - /usr/share/dbus-1/system-services - ) -ELSE() - install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service - DESTINATION - /usr/share/dbus-1/system-services - ) -ENDIF() - +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service ${CMAKE_CURRENT_BINARY_DIR}/org.pamac.system.service) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.pamac.system.service DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services/) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service ${CMAKE_CURRENT_BINARY_DIR}/org.pamac.user.service) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.pamac.user.service DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services/) diff --git a/data/dbus/org.pamac.system.service b/data/dbus/org.pamac.system.service index f6a7474..afc2f5b 100644 --- a/data/dbus/org.pamac.system.service +++ b/data/dbus/org.pamac.system.service @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.pamac.system -Exec=/usr/bin/pamac-system-daemon +Exec=@DBUS_PREFIX@/bin/pamac-system-daemon User=root SystemdService=pamac-system.service diff --git a/data/dbus/org.pamac.user.service b/data/dbus/org.pamac.user.service index 3d5bfe8..bf5eb68 100644 --- a/data/dbus/org.pamac.user.service +++ b/data/dbus/org.pamac.user.service @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.pamac.user -Exec=/usr/bin/pamac-user-daemon +Exec=@DBUS_PREFIX@/bin/pamac-user-daemon diff --git a/meson.build b/meson.build index 64b5adb..9e94c5f 100644 --- a/meson.build +++ b/meson.build @@ -22,12 +22,10 @@ glib_2_0_dep = dependency('glib-2.0') gobject_2_0_dep = dependency('gobject-2.0') subdir('po') +cfg_dbus_data = configuration_data() +cfg_dbus_data.set ('DBUS_PREFIX',get_option('prefix')) 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')) @@ -64,6 +62,8 @@ pamac_transaction_gresource_xml_file_c = pamac_transaction_gresource_xml_generat if KDE_TRAY 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'),'pamac'),join_paths(meson.current_source_dir(),'data/local','','*')) + 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')) @@ -81,6 +81,10 @@ else install_data('data/pamac-tray.desktop',install_dir: '/etc/xdg/autostart') endif endif +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')) 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')) diff --git a/pamac.avprj b/pamac.avprj index b8cd766..d745c88 100644 --- a/pamac.avprj +++ b/pamac.avprj @@ -1,11 +1,9 @@ ### AutoVala Project ### -autovala_version: 25 +autovala_version: 26 project_name: pamac vala_version: 0.38 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 @@ -208,6 +206,8 @@ else translate: vala src/pamac-tray/tray-gtk.vala end +*data: data/local + *doc: doc *desktop: data/pamac-install.desktop @@ -219,6 +219,9 @@ else autostart: data/pamac-tray.desktop end +*dbus_system_service: data/dbus/org.pamac.system.service +*dbus_service: data/dbus/org.pamac.user.service + *full_icon: Hicolor Applications data/icons/16x16/apps/system-software-install.png *full_icon: Hicolor Applications data/icons/24x24/status/pamac-tray-no-update.png *full_icon: Hicolor Applications data/icons/24x24/status/pamac-tray-update.png diff --git a/po/pamac.pot b/po/pamac.pot index 68ae40f..eac6ef9 100644 --- a/po/pamac.pot +++ b/po/pamac.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Pamac\n" "Report-Msgid-Bugs-To: cromer@cromnix.org\n" -"POT-Creation-Date: 2017-10-27 20:46-0300\n" +"POT-Creation-Date: 2017-10-29 12:13-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/pamac-manager/meson.build b/src/pamac-manager/meson.build index b7acdd8..583f2c8 100644 --- a/src/pamac-manager/meson.build +++ b/src/pamac-manager/meson.build @@ -34,4 +34,4 @@ 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) -meson.add_install_script('sh', '-c', 'ln -sf pamac_manager ${DESTDIR}/${MESON_INSTALL_PREFIX}/bin/pamac-updater') +meson.add_install_script('sh', '-c', 'ln -sf pamac-manager ${DESTDIR}/${MESON_INSTALL_PREFIX}/bin/pamac-updater')