sensorfw-qt5.spec 4.99 KB
Newer Older
1 2
Name:       sensorfw-qt5
Summary:    Sensor Framework Qt5
spiiroin's avatar
spiiroin committed
3
Version:    0.10.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
Requires:   qt5-qtcore
11
Requires:   sensord-configs
12 13
Requires:   systemd
Requires(preun): systemd
Lorn Potter's avatar
Lorn Potter committed
14
Requires(post): /sbin/ldconfig
15
Requires(post): systemd
Lorn Potter's avatar
Lorn Potter committed
16
Requires(postun): /sbin/ldconfig
17
Requires(postun): systemd
18
BuildRequires:  pkgconfig(Qt5Core)
19 20 21
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Test)
22
BuildRequires:  pkgconfig(mlite5)
23
BuildRequires:  pkgconfig(libsystemd)
24
BuildRequires:  pkgconfig(ssu-sysinfo)
lpotter's avatar
lpotter committed
25
BuildRequires:  doxygen
26
BuildRequires:  systemd
27
BuildRequires:  libudev-devel
28 29
Provides:   sensord-qt5
Obsoletes:   sensorframework
Lorn Potter's avatar
Lorn Potter committed
30 31 32 33 34 35 36 37 38

%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}
39 40 41
Requires:   qt5-qtcore-devel
Requires:   qt5-qtdbus-devel
Requires:   qt5-qtnetwork-devel
Lorn Potter's avatar
Lorn Potter committed
42 43 44 45 46

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


47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
%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}
66
Provides:   sensord-configs
67 68 69 70 71 72 73 74 75 76 77
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.

78 79 80 81

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

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

90

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

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

99
%qmake5  \
100
    CONFIG+=ssusysinfo\
101
    CONFIG+=mce
Lorn Potter's avatar
Lorn Potter committed
102

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

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

110
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/sensorfwd.service
111

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

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

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

%postun
/sbin/ldconfig
127
systemctl daemon-reload || :
128

129 130 131
%post tests -p /sbin/ldconfig

%postun tests -p /sbin/ldconfig
132

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

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

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

%files tests
%defattr(-,root,root,-)
%{_libdir}/libsensorfakeopen*.so
%{_libdir}/libsensorfakeopen*.so.*
160
%dir %{_libdir}/sensord-qt5/testing
161
%{_libdir}/sensord-qt5/testing/*
162
%dir %{_datadir}/sensorfw-tests
163 164 165 166 167 168 169 170 171 172 173 174 175
%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
176
#%attr(755,root,root)%{_bindir}/sensorexternal-test
177 178 179 180 181 182 183 184 185
%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
186

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