pass-hal-tw3: Add display/disk hal information
[platform/adaptation/tw3/pass-hal-tw3.git] / packaging / pass-hal-tw3.spec
1 %define version 1.2.0
2 %define release 1
3
4 Name:       pass-hal-tw3
5 Summary:    Power HAL for TW3
6 Version:    %{version}
7 Release:    %{release}
8 Group:      System/Hardware Adaptation
9 License:    Apache-2.0
10 Source0:    %{name}-%{version}.tar.gz
11 Source1:    %{name}.manifest
12
13 ExclusiveArch: %{arm}
14
15 Requires(post): /sbin/ldconfig
16 Requires(post): /bin/systemctl
17 Requires(postun): /sbin/ldconfig
18 Requires(postun): /bin/systemctl
19 BuildRequires:  cmake
20 BuildRequires:  pkgconfig(hal-api-common)
21 BuildRequires:  pkgconfig(hal-api-power)
22
23 %description
24 Power HAL for TW3
25
26 %prep
27 %setup -q
28 cp %{SOURCE1} .
29
30 %build
31 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
32         -DCMAKE_HAL_LIBDIR_PREFIX=%{_hal_libdir} \
33         -DCMAKE_HAL_LICENSEDIR_PREFIX=%{_hal_licensedir} \
34
35 make %{?jobs:-j%jobs}
36
37 %install
38 rm -rf %{buildroot}
39
40 %make_install
41 %post
42 /sbin/ldconfig
43 systemd-tmpfiles /hal/lib/tmpfiles.d/pass-hal.conf --create
44 if [ -f %{_unitdir}/pass.service ]; then
45         systemctl try-restart pass.service
46 fi
47
48 %postun
49 /sbin/ldconfig
50 if [ -f %{_unitdir}/pass.service ]; then
51         systemctl try-restart pass.service
52 fi
53
54 %files
55 %manifest %{name}.manifest
56 %{_hal_licensedir}/%{name}/LICENSE
57 %{_hal_libdir}/*.so
58 /hal/lib/tmpfiles.d/pass-hal.conf
59 %config %{_hal_sysconfdir}/pass/pass.json
60 %config %{_hal_sysconfdir}/pass/pass-resource0.json
61 %config %{_hal_sysconfdir}/pass/pass-resource1.json
62 %config %{_hal_sysconfdir}/pass/pass-dummy.json