From fc6f7849a7ad2c8a878149e9cd537e99b7389937 Mon Sep 17 00:00:00 2001 From: Matti Kosola Date: Fri, 29 May 2020 16:27:49 +0000 Subject: [PATCH] [libcontacts] Use macros, not hardcoded paths. JB#50027 Signed-off-by: Matti Kosola --- rpm/libcontacts-qt5.spec | 14 +++++--------- src/src.pro | 10 ++++++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/rpm/libcontacts-qt5.spec b/rpm/libcontacts-qt5.spec index e174ef1..89da9a2 100644 --- a/rpm/libcontacts-qt5.spec +++ b/rpm/libcontacts-qt5.spec @@ -1,10 +1,9 @@ Name: libcontacts-qt5 -Summary: Nemo contact cache library +Summary: Sailfish OS contact cache library Version: 0.2.7 Release: 1 -Group: System/Libraries License: BSD -URL: https://github.com/nemomobile/libcontacts +URL: https://git.sailfishos.org/mer-core/libcontacts Source0: %{name}-%{version}.tar.bz2 Requires: qtcontacts-sqlite-qt5 BuildRequires: pkgconfig(Qt5Core) @@ -23,16 +22,14 @@ BuildRequires: qt5-qttools-linguist %{summary}. %package tests -Summary: Nemo contact cache library tests -Group: System/Libraries +Summary: Sailfish OS contact cache library tests Requires: %{name} = %{version}-%{release} %description tests %{summary}. %package devel -Summary: Nemo contact cache library headers -Group: System/Libraries +Summary: Sailfish OS contact cache library headers Requires: %{name} = %{version}-%{release} %description devel @@ -41,7 +38,6 @@ Requires: %{name} = %{version}-%{release} %package ts-devel Summary: Translation source for libcontacts -Group: System/Applications %description ts-devel Translation source for libcontacts @@ -57,7 +53,7 @@ Translation source for libcontacts %build -%qmake5 VERSION=%{version} +%qmake5 VERSION=%{version} "PKGCONFIG_LIB=%{_lib}" make %{?_smp_mflags} diff --git a/src/src.pro b/src/src.pro index 0351360..4bbcad9 100644 --- a/src/src.pro +++ b/src/src.pro @@ -6,12 +6,18 @@ CONFIG += create_pc create_prl no_install_prl # 'contacts' is too generic for the target name - use 'contactcache' TARGET = $${PACKAGENAME} -target.path = $$PREFIX/lib +target.path = $$[QT_INSTALL_LIBS] INSTALLS += target +# This should be passed on qmake command line +isEmpty(PKGCONFIG_LIB) { + PKGCONFIG_LIB = lib + message("PKGCONFIG_LIB is unset, assuming $$PKGCONFIG_LIB") +} + # version for generated pkgconfig files is defined in the spec file QMAKE_PKGCONFIG_INCDIR = $$PREFIX/include/$${PACKAGENAME} -QMAKE_PKGCONFIG_LIBDIR = $$PREFIX/lib +QMAKE_PKGCONFIG_LIBDIR = $$PREFIX/$${PKGCONFIG_LIB} QMAKE_PKGCONFIG_DESTDIR = pkgconfig CONFIG += link_pkgconfig