diff options
Diffstat (limited to 'packaging/hal-backend-power-generic.spec')
-rw-r--r-- | packaging/hal-backend-power-generic.spec | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/packaging/hal-backend-power-generic.spec b/packaging/hal-backend-power-generic.spec new file mode 100644 index 0000000..8dba3cf --- /dev/null +++ b/packaging/hal-backend-power-generic.spec @@ -0,0 +1,58 @@ +%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-api-common) +BuildRequires: pkgconfig(hal-api-power) + +%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 |