sensorfw-qt5.spec 5.07 KB
Newer Older
1 2
Name:       sensorfw-qt5
Summary:    Sensor Framework Qt5
3
Version:    0.11.8
Lorn Potter's avatar
Lorn Potter committed
4 5 6 7
Release:    0
Group:      System/Sensor Framework
License:    LGPLv2+
URL:        http://gitorious.org/sensorfw
8
Source0:    %{name}-%{version}.tar.bz2
9
Source1:    sensorfwd.service
10
Source2:    sensorfw-qt5-hybris.inc
11
Requires:   qt5-qtcore
12
Requires:   sensord-configs
13 14
Requires:   systemd
Requires(preun): systemd
Lorn Potter's avatar
Lorn Potter committed
15
Requires(post): /sbin/ldconfig
16
Requires(post): systemd
Lorn Potter's avatar
Lorn Potter committed
17
Requires(postun): /sbin/ldconfig
18
Requires(postun): systemd
19
BuildRequires:  pkgconfig(Qt5Core)
20 21 22
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Test)
23
BuildRequires:  pkgconfig(mlite5)
24
BuildRequires:  pkgconfig(libsystemd)
25
BuildRequires:  pkgconfig(ssu-sysinfo)
lpotter's avatar
lpotter committed
26
BuildRequires:  doxygen
27
BuildRequires:  systemd
28
BuildRequires:  libudev-devel
29 30
Provides:   sensord-qt5
Obsoletes:   sensorframework
Lorn Potter's avatar
Lorn Potter committed
31 32 33 34 35 36 37 38 39

%description
Sensor Framework provides an interface to hardware sensor drivers through logical sensors. This package contains sensor framework daemon and required libraries.


%package devel
Summary:    Sensor framework daemon libraries development headers
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}
40 41 42
Requires:   qt5-qtcore-devel
Requires:   qt5-qtdbus-devel
Requires:   qt5-qtnetwork-devel
Lorn Potter's avatar
Lorn Potter committed
43 44 45 46 47

%description devel
Development headers for sensor framework daemon and libraries.


48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
%package tests
Summary:    Unit test cases for sensord
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}
Requires:   qt5-qttest-devel
Requires:   testrunner-lite
Requires:   python
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description tests
Contains unit test cases for CI environment.


%package configs
Summary:    Sensorfw configuration files
Group:      System/Libraries
BuildArch:  noarch
Requires:   %{name} = %{version}
67
Provides:   sensord-configs
68 69 70 71 72 73 74 75 76 77 78
Provides:   config-n900
Provides:   config-aava
Provides:   config-icdk
Provides:   config-ncdk
Provides:   config-oemtablet
Provides:   config-oaktraili
Provides:   config-u8500

%description configs
Sensorfw configuration files.

79 80 81 82

%package doc
Summary:    API documentation for libsensord
Group:      Documentation
lpotter's avatar
lpotter committed
83 84
Requires:   %{name} = %{version}-%{release}
Requires:   doxygen
85
Obsoletes:  %{name}-docs
lpotter's avatar
lpotter committed
86

87
%description doc
lpotter's avatar
lpotter committed
88 89 90
API documentation for libsensord
 Doxygen-generated API documentation for sensord.

91

Lorn Potter's avatar
Lorn Potter committed
92 93 94 95
%prep
%setup -q -n %{name}-%{version}

%build
96
unset LD_AS_NEEDED
97
export LD_RUN_PATH=/usr/lib/sensord-qt5/
98
export QT_SELECT=5
99

100
%qmake5  \
101
    CONFIG+=ssusysinfo\
102 103
    CONFIG+=mce\
    PC_VERSION=`echo %{version} | sed 's/+.*//'`
Lorn Potter's avatar
Lorn Potter committed
104

Robin Burchell's avatar
Robin Burchell committed
105
make %{?_smp_mflags}
Lorn Potter's avatar
Lorn Potter committed
106 107 108

%install
rm -rf %{buildroot}
109
export QT_SELECT=5
110
%qmake5_install
Lorn Potter's avatar
Lorn Potter committed
111

112
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/sensorfwd.service
113

114
mkdir -p %{buildroot}/%{_unitdir}/graphical.target.wants
115
ln -s ../sensorfwd.service %{buildroot}/%{_unitdir}/graphical.target.wants/sensorfwd.service
Lorn Potter's avatar
Lorn Potter committed
116

117 118
%preun
if [ "$1" -eq 0 ]; then
119
systemctl stop sensorfwd.service || :
120 121 122 123
fi

%post
/sbin/ldconfig
124
systemctl daemon-reload || :
125
systemctl reload-or-try-restart sensorfwd.service || :
126 127 128

%postun
/sbin/ldconfig
129
systemctl daemon-reload || :
130

131 132 133
%post tests -p /sbin/ldconfig

%postun tests -p /sbin/ldconfig
134

Lorn Potter's avatar
Lorn Potter committed
135 136
%files
%defattr(-,root,root,-)
137 138
%{_libdir}/libsensorclient-qt5.so.*
%{_libdir}/libsensordatatypes-qt5.so.*
139
%attr(755,root,root)%{_sbindir}/sensorfwd
140
%dir %{_libdir}/sensord-qt5
141 142
%{_libdir}/sensord-qt5/*.so
%{_libdir}/libsensorfw*.so.*
lpotter's avatar
lpotter committed
143

144
%config %{_sysconfdir}/dbus-1/system.d/sensorfw.conf
145
%dir %{_sysconfdir}/sensorfw
146 147
%{_unitdir}/sensorfwd.service
%{_unitdir}/graphical.target.wants/sensorfwd.service
Lorn Potter's avatar
Lorn Potter committed
148 149 150

%files devel
%defattr(-,root,root,-)
151 152
%{_libdir}/libsensorfw*.so
%{_libdir}/libsensordatatypes*.so
153
%{_libdir}/libsensorclient*.so
Lorn Potter's avatar
Lorn Potter committed
154
%{_libdir}/pkgconfig/*
155 156
%{_includedir}/sensord-qt5/*
%{_datadir}/qt5/mkspecs/features/sensord.prf
157 158 159 160 161

%files tests
%defattr(-,root,root,-)
%{_libdir}/libsensorfakeopen*.so
%{_libdir}/libsensorfakeopen*.so.*
162
%dir %{_libdir}/sensord-qt5/testing
163
%{_libdir}/sensord-qt5/testing/*
164
%dir %{_datadir}/sensorfw-tests
165 166 167 168 169 170 171 172 173 174 175 176 177
%attr(755,root,root)%{_datadir}/sensorfw-tests/*.p*
%attr(644,root,root)%{_datadir}/sensorfw-tests/*.xml
%attr(644,root,root)%{_datadir}/sensorfw-tests/*.conf
%attr(755,root,root)%{_bindir}/datafaker-qt5
%attr(755,root,root)%{_bindir}/sensoradaptors-test
%attr(755,root,root)%{_bindir}/sensorapi-test
%attr(755,root,root)%{_bindir}/sensorbenchmark-test
%attr(755,root,root)%{_bindir}/sensorchains-test
%attr(755,root,root)%{_bindir}/sensordataflow-test
%attr(755,root,root)%{_bindir}/sensord-deadclient
%attr(755,root,root)%{_bindir}/sensordiverter.sh
%attr(755,root,root)%{_bindir}/sensordriverpoll-test
%attr(755,root,root)%{_bindir}/sensordummyclient-qt5
lpotter's avatar
lpotter committed
178
#%attr(755,root,root)%{_bindir}/sensorexternal-test
179 180 181 182 183 184 185 186 187
%attr(755,root,root)%{_bindir}/sensorfilters-test
%attr(755,root,root)%{_bindir}/sensormetadata-test
%attr(755,root,root)%{_bindir}/sensorpowermanagement-test
%attr(755,root,root)%{_bindir}/sensorstandbyoverride-test
%attr(755,root,root)%{_bindir}/sensortestapp

%files configs
%defattr(-,root,root,-)
%config %{_sysconfdir}/sensorfw/sensord.conf.d/*conf
188

189
%files doc
lpotter's avatar
lpotter committed
190
%{_prefix}/share/doc/sensord-qt5