Navigation Menu

Skip to content

Commit

Permalink
[sensorfw] fix for qt4 build and qt5 package build
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorn Potter committed May 3, 2013
1 parent 0aa9d3e commit 45dfcc5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
9 changes: 8 additions & 1 deletion rpm/sensorfw-qt5.spec
Expand Up @@ -29,7 +29,12 @@ Requires(post): systemd
Requires(postun): /sbin/ldconfig
Requires(postun): systemd
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: pkgconfig(mce)

Obsoletes: sensorframework

%description
Expand Down Expand Up @@ -88,7 +93,8 @@ unset LD_AS_NEEDED
export LD_RUN_PATH=/usr/lib/sensord/
# << build pre

%qmake \
export QT_SELECT=5
%qmake \
CONFIG+=mce

make %{?jobs:-j%jobs}
Expand All @@ -100,6 +106,7 @@ make %{?jobs:-j%jobs}
rm -rf %{buildroot}
# >> install pre
# << install pre
export QT_SELECT=5
%qmake_install

# >> install post
Expand Down
5 changes: 3 additions & 2 deletions rpm/sensorfw-qt5.yaml
Expand Up @@ -20,6 +20,7 @@ Requires:
PkgConfigBR:
- Qt5Core
- gconf-2.0
- mce

#PkgBR:
# - doxygen
Expand All @@ -29,7 +30,7 @@ Obsoletes:
- sensorframework

Configure: none
Builder: qmake
Builder: qmake5
UseAsNeeded: no

QMakeOptions:
Expand All @@ -39,7 +40,7 @@ SubPackages:
- Name: devel
Group: Development/Libraries
Requires:
- qt-devel
- qt5-devel
Summary: Sensor framework daemon libraries development headers
Description: |
Development headers for sensor framework daemon and libraries.
Expand Down
1 change: 1 addition & 0 deletions rpm/sensorfw.spec
Expand Up @@ -30,6 +30,7 @@ Requires(postun): /sbin/ldconfig
Requires(postun): systemd
BuildRequires: pkgconfig(QtCore)
BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: pkgconfig(QtDeclarative)
BuildRequires: pkgconfig(contextprovider-1.0)
Obsoletes: sensorframework

Expand Down
10 changes: 10 additions & 0 deletions sensorfw.pro
Expand Up @@ -47,3 +47,13 @@ SENSORDCONFIGFILES.path = /etc/sensorfw/sensord.conf.d
publicheaders.files += include/*.h

INSTALLS += PKGCONFIGFILES QTCONFIGFILES DBUSCONFIGFILES SENSORDCONFIGFILE SENSORDCONFIGFILES

equals(QT_MAJOR_VERSION, 4): {
OTHER_FILES += rpm/sensorfw.spec \
rpm/sensorfw.yaml
}

equals(QT_MAJOR_VERSION, 5): {
OTHER_FILES += rpm/sensorfw-qt5.spec \
rpm/sensorfw-qt5.yaml
}
2 changes: 1 addition & 1 deletion tests/benchmark/dummyclient/dummyclient.pro
Expand Up @@ -16,7 +16,7 @@ QMAKE_LIBDIR_FLAGS += -L../../../qt-api \
-L../../../datatypes

equals(QT_MAJOR_VERSION, 4):{
QMAKE_LIBDIR_FLAGS += -lsensordatatypes
QMAKE_LIBDIR_FLAGS += -lsensordatatypes -lsensorclient
}
equals(QT_MAJOR_VERSION, 5):{
QMAKE_LIBDIR_FLAGS += -lsensordatatypes-qt5 -lsensorclient-qt5
Expand Down

0 comments on commit 45dfcc5

Please sign in to comment.