summaryrefslogtreecommitdiff
path: root/packaging/hal-backend-power-generic.spec
blob: 146c8a9fc00efe92590ce5aacd7677fd56ca2e4d (plain)
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
%define version 1.1.0
%define release 1

Name:       hal-backend-power-generic 
Summary:    Power HAL for standard linux interface
Version:    %{version}
Release:    %{release}
Group:      System/Hardware Adaptation
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
Source1:    %{name}.manifest

Requires(post): /sbin/ldconfig
Requires(post): /bin/systemctl
Requires(post): security-config
Requires(postun): /sbin/ldconfig
Requires(postun): /bin/systemctl
BuildRequires:  cmake
BuildRequires:  pkgconfig(hal-rootstrap)

%description
PASS standard hal

%prep
%setup -q
cp %{SOURCE1} .

%build
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
	-DCMAKE_HAL_LIBDIR_PREFIX=%{_hal_libdir} \
	-DCMAKE_HAL_LICENSEDIR_PREFIX=%{_hal_licensedir} \

make %{?jobs:-j%jobs}

%install
rm -rf %{buildroot}

%make_install

%post
/sbin/ldconfig
systemd-tmpfiles /hal/lib/tmpfiles.d/pass-hal.conf --create
if [ -f %{_unitdir}/pass.service ]; then
	systemctl try-restart pass.service
fi

%postun
/sbin/ldconfig
if [ -f %{_unitdir}/pass.service ]; then
	systemctl try-restart pass.service
fi

%files
%manifest %{name}.manifest
%{_hal_licensedir}/%{name}/LICENSE
%{_hal_libdir}/*.so
/hal/lib/tmpfiles.d/pass-hal.conf