From 7c4f4c0bc03bad87eb4c17c99f112b49146f6fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= Date: Thu, 4 Jun 2020 16:43:35 +0300 Subject: [PATCH] [aarch64] Use macros. Do not hardcode lib dir. Contributes to JB#50027 --- lib/src/src.pro | 2 +- plugins/plugin.pri | 2 +- rpm/voicecall-qt5.spec | 17 +++++++---------- src/basicvoicecallconfigurator.cpp | 2 +- src/src.pro | 2 ++ voicecall.pro | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/src/src.pro b/lib/src/src.pro index 946f76b..0b35b9b 100644 --- a/lib/src/src.pro +++ b/lib/src/src.pro @@ -25,7 +25,7 @@ SOURCES += \ abstractvoicecallhandler.cpp \ common.cpp -target.path = /usr/lib +target.path = $$[QT_INSTALL_LIBS] INSTALLS += target diff --git a/plugins/plugin.pri b/plugins/plugin.pri index e32d0da..e5a974b 100644 --- a/plugins/plugin.pri +++ b/plugins/plugin.pri @@ -14,6 +14,6 @@ INCLUDEPATH += $$PWD/../lib/src # used as e.g. the declarative plugin is a QML plugin, not a voicecall plugin !no_plugininstall { - target.path = /usr/lib/voicecall/plugins + target.path = $$[QT_INSTALL_LIBS]/voicecall/plugins INSTALLS += target } diff --git a/rpm/voicecall-qt5.spec b/rpm/voicecall-qt5.spec index 12cd4ab..1285987 100644 --- a/rpm/voicecall-qt5.spec +++ b/rpm/voicecall-qt5.spec @@ -2,9 +2,8 @@ Name: voicecall-qt5 Summary: Dialer engine for Nemo Mobile Version: 0.6.20 Release: 1 -Group: Communications/Telephony License: ASL 2.0 -URL: http://github.com/nemomobile/voicecall +URL: https://git.sailfishos.org/mer-core/voicecall Source0: %{name}-%{version}.tar.bz2 Source1: %{name}.privileges Requires: systemd @@ -19,7 +18,8 @@ BuildRequires: pkgconfig(libpulse-mainloop-glib) BuildRequires: pkgconfig(ngf-qt5) BuildRequires: pkgconfig(qt5-boostable) BuildRequires: pkgconfig(nemodevicelock) -BuildRequires: oneshot +BuildRequires: oneshot +BuildRequires: systemd %{_oneshot_requires_post} Provides: voicecall-core >= 0.4.9 @@ -40,7 +40,6 @@ Obsoletes: voicecall-qt5-plugin-resource-policy < 0.5.1 %package devel Summary: Voicecall development package -Group: Communications/Telephony Requires: %{name} = %{version}-%{release} Provides: voicecall-devel >= 0.4.9 Obsoletes: voicecall-devel < 0.4.9 @@ -50,7 +49,6 @@ Obsoletes: voicecall-devel < 0.4.9 %package plugin-telepathy Summary: Voicecall plugin for calls using telepathy -Group: Communications/Telephony Requires: %{name} = %{version}-%{release} Conflicts: voicecall-qt5-plugin-ofono BuildRequires: pkgconfig(TelepathyQt5) @@ -61,7 +59,6 @@ BuildRequires: pkgconfig(TelepathyQt5Farstream) %package plugin-ofono Summary: Voicecall plugin for calls using ofono -Group: Communications/Telephony Requires: %{name} = %{version}-%{release} Provides: voicecall-plugin-ofono >= 0.4.9 Conflicts: voicecall-qt5-plugin-telepathy @@ -85,8 +82,8 @@ make %{?_smp_mflags} rm -rf %{buildroot} %qmake5_install -mkdir -p %{buildroot}%{_libdir}/systemd/user/user-session.target.wants -ln -s ../voicecall-manager.service %{buildroot}%{_libdir}/systemd/user/user-session.target.wants/ +mkdir -p %{buildroot}%{_userunitdir}/user-session.target.wants +ln -s ../voicecall-manager.service %{buildroot}%{_userunitdir}/user-session.target.wants/ mkdir -p %{buildroot}%{_datadir}/mapplauncherd/privileges.d install -m 644 -p %{SOURCE1} %{buildroot}%{_datadir}/mapplauncherd/privileges.d/ @@ -124,8 +121,8 @@ fi %{_libdir}/voicecall/plugins/libvoicecall-playback-manager-plugin.so %{_libdir}/voicecall/plugins/libvoicecall-ngf-plugin.so %{_libdir}/voicecall/plugins/libvoicecall-mce-plugin.so -%{_libdir}/systemd/user/voicecall-manager.service -%{_libdir}/systemd/user/user-session.target.wants/voicecall-manager.service +%{_userunitdir}/voicecall-manager.service +%{_userunitdir}/user-session.target.wants/voicecall-manager.service %{_datadir}/mapplauncherd/privileges.d/* %{_oneshotdir}/phone-move-recordings-dir diff --git a/src/basicvoicecallconfigurator.cpp b/src/basicvoicecallconfigurator.cpp index 684de06..076fffb 100644 --- a/src/basicvoicecallconfigurator.cpp +++ b/src/basicvoicecallconfigurator.cpp @@ -70,7 +70,7 @@ bool BasicVoiceCallConfigurator::configure(VoiceCallManagerInterface *manager) return false; } - QDir pluginPath("/usr/lib/voicecall/plugins"); + QDir pluginPath(VOICECALL_PLUGIN_DIRECTORY); DEBUG_T("Loading dynamic plugins from: %s", qPrintable(pluginPath.absolutePath())); foreach(QString plugin, pluginPath.entryList((QStringList() << "lib*plugin*so"), QDir::NoDotAndDotDot | QDir::Files)) diff --git a/src/src.pro b/src/src.pro index cf26c32..d50a6b1 100644 --- a/src/src.pro +++ b/src/src.pro @@ -5,6 +5,8 @@ CONFIG += link_pkgconfig INCLUDEPATH += ../lib/src +DEFINES += VOICECALL_PLUGIN_DIRECTORY=\"\\\"$$[QT_INSTALL_LIBS]/voicecall/plugins\\\"\" + enable-nemo-devicelock { PKGCONFIG += libresourceqt5 nemodevicelock DEFINES += WITH_NEMO_DEVICELOCK diff --git a/voicecall.pro b/voicecall.pro index 1b5a647..c158674 100644 --- a/voicecall.pro +++ b/voicecall.pro @@ -8,6 +8,6 @@ OTHER_FILES = LICENSE makedist rpm/voicecall-qt5.spec oneshot.files = oneshot/phone-move-recordings-dir -oneshot.path = /usr/lib/oneshot.d +oneshot.path = $$[QT_INSTALL_PREFIX]/lib/oneshot.d INSTALLS += oneshot