Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb50027' into 'master'
Use macros, not hardcoded paths.

See merge request mer-core/libcontacts!18
  • Loading branch information
Matti Kosola committed Jun 8, 2020
2 parents 06adaa5 + fc6f784 commit 0fdde72
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
14 changes: 5 additions & 9 deletions 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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -57,7 +53,7 @@ Translation source for libcontacts

%build

%qmake5 VERSION=%{version}
%qmake5 VERSION=%{version} "PKGCONFIG_LIB=%{_lib}"

make %{?_smp_mflags}

Expand Down
10 changes: 8 additions & 2 deletions src/src.pro
Expand Up @@ -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
Expand Down

0 comments on commit 0fdde72

Please sign in to comment.