sensorfw-qt5.spec 4.87 KB
Newer Older
1 2
Name:       sensorfw-qt5
Summary:    Sensor Framework Qt5
spiiroin's avatar
spiiroin committed
3
Version:    0.8.33
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)
lpotter's avatar
lpotter committed
23
BuildRequires:  doxygen
24
BuildRequires:  systemd
25
BuildRequires:  libudev-devel
26 27
Provides:   sensord-qt5
Obsoletes:   sensorframework
Lorn Potter's avatar
Lorn Potter committed
28 29 30 31 32 33 34 35 36

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

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


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

lpotter's avatar
lpotter committed
76 77 78 79 80 81 82 83 84 85
%package docs
Summary: API documentation for libsensord
Group:      Development/Libraries
Requires:   %{name} = %{version}-%{release}
Requires:   doxygen

%description docs
API documentation for libsensord
 Doxygen-generated API documentation for sensord.

86

Lorn Potter's avatar
Lorn Potter committed
87 88 89 90
%prep
%setup -q -n %{name}-%{version}

%build
91
unset LD_AS_NEEDED
92
export LD_RUN_PATH=/usr/lib/sensord-qt5/
93
export QT_SELECT=5
94

95 96
%qmake5  \
    CONFIG+=mce
Lorn Potter's avatar
Lorn Potter committed
97

Robin Burchell's avatar
Robin Burchell committed
98
make %{?_smp_mflags}
Lorn Potter's avatar
Lorn Potter committed
99 100 101

%install
rm -rf %{buildroot}
102
export QT_SELECT=5
103
%qmake5_install
Lorn Potter's avatar
Lorn Potter committed
104

105
install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/sensorfwd.service
106

107
mkdir -p %{buildroot}/%{_unitdir}/graphical.target.wants
108
ln -s ../sensorfwd.service %{buildroot}/%{_unitdir}/graphical.target.wants/sensorfwd.service
Lorn Potter's avatar
Lorn Potter committed
109

110 111
%preun
if [ "$1" -eq 0 ]; then
112
systemctl stop sensorfwd.service || :
113 114 115 116
fi

%post
/sbin/ldconfig
117
systemctl daemon-reload || :
118
systemctl reload-or-try-restart sensorfwd.service || :
119 120 121

%postun
/sbin/ldconfig
122
systemctl daemon-reload || :
123

124 125 126
%post tests -p /sbin/ldconfig

%postun tests -p /sbin/ldconfig
127

Lorn Potter's avatar
Lorn Potter committed
128 129
%files
%defattr(-,root,root,-)
130 131
%{_libdir}/libsensorclient-qt5.so.*
%{_libdir}/libsensordatatypes-qt5.so.*
132
%attr(755,root,root)%{_sbindir}/sensorfwd
133
%dir %{_libdir}/sensord-qt5
134 135
%{_libdir}/sensord-qt5/*.so
%{_libdir}/libsensorfw*.so.*
lpotter's avatar
lpotter committed
136

137
%config %{_sysconfdir}/dbus-1/system.d/sensorfw.conf
138
%dir %{_sysconfdir}/sensorfw
139 140
%{_unitdir}/sensorfwd.service
%{_unitdir}/graphical.target.wants/sensorfwd.service
Lorn Potter's avatar
Lorn Potter committed
141 142 143

%files devel
%defattr(-,root,root,-)
144 145
%{_libdir}/libsensorfw*.so
%{_libdir}/libsensordatatypes*.so
146
%{_libdir}/libsensorclient*.so
Lorn Potter's avatar
Lorn Potter committed
147
%{_libdir}/pkgconfig/*
148 149
%{_includedir}/sensord-qt5/*
%{_datadir}/qt5/mkspecs/features/sensord.prf
150 151 152 153 154

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

lpotter's avatar
lpotter committed
182 183
%files docs
%{_prefix}/share/doc/sensord-qt5