Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix qt5 package build
  • Loading branch information
Lorn Potter committed May 4, 2013
1 parent 05055a4 commit fa72c0e
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 15 deletions.
10 changes: 10 additions & 0 deletions libqofono.pro
Expand Up @@ -8,3 +8,13 @@ equals(QT_MAJOR_VERSION, 4):{
SUBDIRS += ofonotest
}


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

equals(QT_MAJOR_VERSION, 5): {
OTHER_FILES += rpm/libqofono-qt5.spec \
rpm/libqofono-qt5.yaml
}
3 changes: 2 additions & 1 deletion makedist
Expand Up @@ -15,10 +15,11 @@ PROJECT=libqofono
# Parse it from any Qt *.pro or *.pri files in CWD:
# PROJECT=$(grep -E "TARGET ?= ?" *.pr[io]|cut -d' ' -f3)

while getopts ht: o
while getopts qht: o
do case $o in
h) head=1;;
t) TAG="$OPTARG";;
q) PROJECT=libqofono-qt5;;
?) printf >&2 "Usage: $0 [-h] [-t TAG]\n"
exit 2;;
esac
Expand Down
2 changes: 1 addition & 1 deletion plugin/plugin.pro
Expand Up @@ -13,7 +13,7 @@ equals(QT_MAJOR_VERSION, 4):{
}

equals(QT_MAJOR_VERSION, 5): {
QT += qml dbus
QT += quick
LIBS += -L../src -lqofono-qt5
}

Expand Down
16 changes: 9 additions & 7 deletions rpm/libqofono-qt5.spec
@@ -1,6 +1,6 @@
#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.25
# Generated by: spectacle version 0.26
#

Name: libqofono-qt5
Expand All @@ -9,18 +9,20 @@ Name: libqofono-qt5
# << macros

Summary: A library of Qt 5 bindings for ofono
Version: 0.3
Version: 0.5
Release: 1
Group: System/Libraries
License: LGPLv2.1
URL: https://github.com/nemomobile/libqofono
Source0: libqofono-%{version}.tar.bz2
Source0: %{name}-%{version}.tar.bz2
Source100: libqofono-qt5.yaml
Requires: qt5-qtcore
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Test)

%description
This package contains Qt bindings for ofono cellular service
Expand Down Expand Up @@ -53,9 +55,8 @@ Requires: %{name} = %{version}-%{release}
%description tests
This package contains qml test for ofono Qt bindings.


%prep
%setup -q -n libqofono-%{version}
%setup -q -n %{name}-%{version}

# >> setup
# << setup
Expand All @@ -64,7 +65,8 @@ This package contains qml test for ofono Qt bindings.
# >> build pre
# << build pre

%qmake
export QT_SELECT=5
%qmake5

make %{?jobs:-j%jobs}

Expand All @@ -75,12 +77,12 @@ make %{?jobs:-j%jobs}
rm -rf %{buildroot}
# >> install pre
# << install pre
export QT_SELECT=5
%qmake_install

# >> install post
# << install post


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig
Expand Down
10 changes: 6 additions & 4 deletions rpm/libqofono-qt5.yaml
@@ -1,6 +1,6 @@
Name: libqofono-qt5
Summary: A library of Qt 5 bindings for ofono
Version: 0.3
Version: 0.5
Release: 1
Group: System/Libraries
License: LGPLv2.1
Expand All @@ -19,10 +19,12 @@ Description: |
PkgConfigBR:
- Qt5Core
- Qt5DBus
- Qt5Quick
- Qt5Test

Configure: none
Builder: qmake
SetupOptions: "-q -n libqofono-%{version}"
Builder: qmake5
SetupOptions: "-q -n %{name}-%{version}"
Files:
- "%{_libdir}/%{name}.so.*"

Expand All @@ -49,7 +51,7 @@ SubPackages:
- "%{_includedir}/qofono-qt5/*.h"
- "%{_includedir}/qofono-qt5/dbus/ofono*.h"
- "%{_includedir}/qofono-qt5/dbus/ofono*.xml"
- "%{_datadir}/qt4/mkspecs/features/qofono-qt5.prf"
- "%{_datadir}/qt5/mkspecs/features/qofono-qt5.prf"

- Name: tests
Summary: qml test app for the ofono Qt bindings
Expand Down
2 changes: 1 addition & 1 deletion src/src.pro
Expand Up @@ -150,8 +150,8 @@ HEADERS += $$DBUS_HEADERS \
qofonosupplementaryservices.h \
qofonotexttelephony.h

equals(QT_MAJOR_VERSION, 4): {
QT -= gui
equals(QT_MAJOR_VERSION, 4): {
headers.path = $$INSTALL_ROOT$$PREFIX/include/qofono
qtconfig.path = $$[QT_INSTALL_PREFIX]/share/qt4/mkspecs/features
qtconfig.files = qofono.prf
Expand Down
2 changes: 1 addition & 1 deletion test/auto/tst_qofono/tst_qofono.pro
Expand Up @@ -5,9 +5,9 @@
#-------------------------------------------------

QT += testlib dbus
QT -= gui

equals(QT_MAJOR_VERSION, 4): {
QT -= gui
LIBS += -lqofono
TARGET = tst_qofonotest
target.path = $$INSTALL_ROOT$$PREFIX/lib/libqofono/tests
Expand Down

0 comments on commit fa72c0e

Please sign in to comment.