-
Notifications
You must be signed in to change notification settings - Fork 15
/
sensorfw.pro
118 lines (98 loc) · 3.68 KB
/
sensorfw.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# RPM build: Hybris plugin has separate spec file that does:
# qmake CONFIG+=hybris
# And pro-file behavioral differences are handled via:
# contains(CONFIG,hybris) { ... }
#
# Debian builds: debian/rules triggers build time hybris check:
# qmake CONFIG+=autohybris
# And pro-file behavioral differences are handled via:
# config_hybris { ... }
contains(CONFIG,autohybris) {
load(configure)
qtCompileTest(hybris)
}
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = datatypes \
adaptors \
core \
filters \
sensors \
sensord \
qt-api \
chains \
tests \
examples
contains(CONFIG,configs) {
contains(CONFIG,hybris) {
SENSORDHYBRISCONFIGFILE.files = config/sensord-hybris.conf
SENSORDHYBRISCONFIGFILE.path = /etc/sensorfw
INSTALLS += SENSORDHYBRISCONFIGFILE
}
contains(CONFIG,legacy) {
SENSORFWCONFIGFILES.files = config/sensord-rx_51.conf \
config/sensord-oaktrail.conf \
config/sensord-exopc.conf \
config/sensord-aava.conf \
config/sensord-rm_696.conf \
config/sensord-arm_grouper_0000.conf \
config/sensord-mrst_cdk.conf \
config/sensord-ncdk.conf \
config/sensord.conf \
config/sensord-rm_680.conf \
config/sensord-icdk.conf \
config/sensord-u8500.conf \
SENSORFWCONFIGFILES.path = /etc/sensorfw
INSTALLS += SENSORFWCONFIGFILES
}
SENSORCONFIG_SETUP.files = config/sensord-daemon-conf-setup
SENSORCONFIG_SETUP.path = /usr/bin
INSTALLS += SENSORCONFIG_SETUP
}
contains(CONFIG,hybris) {
SUBDIRS = core/hybris.pro \
adaptors
} else {
config_hybris {
# Reorder so that adaptors are built after hybris.
SUBDIRS -= adaptors
SUBDIRS += core/hybris.pro \
adaptors
}
publicheaders.files += include/*.h
INSTALLS += PKGCONFIGFILES QTCONFIGFILES
PKGCONFIGFILES.path = $$[QT_INSTALL_LIBS]/pkgconfig
QTCONFIGFILES.files = sensord.prf
qt-api.depends = datatypes
sensord.depends = datatypes adaptors sensors chains
include( doc/doc.pri )
include( common-install.pri )
include( common-config.pri )
PKGCONFIGFILES.files = sensord-qt$${QT_MAJOR_VERSION}.pc
PKGCONFIGFILES.commands = 'sed -i "s/Version:.*/Version: $$PC_VERSION/" $$_PRO_FILE_PWD_/sensord-qt$${QT_MAJOR_VERSION}.pc'
QTCONFIGFILES.path = $$[QT_INSTALL_ARCHDATA]/mkspecs/features
}
# How to make this work in all cases?
#PKGCONFIGFILES.commands = sed -i \"s/Version:.*$$/Version: `head -n1 debian/changelog | cut -f 2 -d\' \' | tr -d \'()\'`/\" sensord-qt$${QT_MAJOR_VERSION}.pc
!contains(CONFIG,hybris) {
# config file installation not handled here
DBUSCONFIGFILES.files = sensorfw.conf
DBUSCONFIGFILES.path = /etc/dbus-1/system.d
INSTALLS += DBUSCONFIGFILES
SENSORDCONFIGFILES.files = config/10-sensord-default.conf
SENSORDCONFIGFILES.files += config/20-sensors-default.conf
SENSORDCONFIGFILES.path = /etc/sensorfw/sensord.conf.d
INSTALLS += SENSORDCONFIGFILES
}
contains(CONFIG,systemdunit) {
# Install service files through packaging to take into account
# units file location unless called with CONFIG+=systemdunit
SENSORSYSTEMD.files = rpm/sensorfwd.service
SENSORSYSTEMD.path = /lib/systemd/system
INSTALLS += SENSORSYSTEMD
}
OTHER_FILES += rpm/sensorfw-qt$${QT_MAJOR_VERSION}.spec \
rpm/sensorfw-qt$${QT_MAJOR_VERSION}-binder.spec \
rpm/sensorfw-qt$${QT_MAJOR_VERSION}-hybris.inc \
rpm/sensorfw-qt$${QT_MAJOR_VERSION}-hybris.spec
OTHER_FILES += config/*