79 lines
1.7 KiB
RPMSpec
79 lines
1.7 KiB
RPMSpec
%define version %(cat version)
|
|
%if 0%{?qubes_builder}
|
|
%define _builddir %(pwd)
|
|
%endif
|
|
|
|
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
|
|
|
Name: qubes-utils
|
|
Version: %{version}
|
|
Release: 1%{?dist}
|
|
Summary: Common Linux files for Qubes Dom0 and VM
|
|
|
|
Group: Qubes
|
|
License: GPL
|
|
URL: http://www.qubes-os.org
|
|
|
|
Requires: udev
|
|
Requires: ImageMagick
|
|
BuildRequires: qubes-libvchan-devel
|
|
|
|
%description
|
|
Common Linux files for Qubes Dom0 and VM
|
|
|
|
%package devel
|
|
Summary: Development headers for qubes-utils
|
|
Release: 1%{?dist}
|
|
|
|
%description devel
|
|
Development header and files for qubes-utils
|
|
|
|
%prep
|
|
|
|
|
|
%build
|
|
make all
|
|
|
|
%install
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
%post
|
|
if [ -r /etc/qubes-release ]; then
|
|
# dom0
|
|
/bin/systemctl enable qubes-meminfo-writer-dom0.service > /dev/null 2>&1
|
|
else
|
|
# VM
|
|
/bin/systemctl enable qubes-meminfo-writer.service > /dev/null 2>&1
|
|
fi
|
|
|
|
%postun
|
|
if [ $1 -eq 0 ]; then
|
|
/bin/systemctl disable qubes-meminfo-writer.service > /dev/null 2>&1
|
|
/bin/systemctl disable qubes-meminfo-writer.service > /dev/null 2>&1
|
|
fi
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
/etc/udev/rules.d/99-qubes-*.rules
|
|
/usr/libexec/qubes/udev-*
|
|
%{_sbindir}/meminfo-writer
|
|
%{_unitdir}/qubes-meminfo-writer.service
|
|
%{_unitdir}/qubes-meminfo-writer-dom0.service
|
|
%attr(0755,root,root) %{python_sitearch}/qubes/img.py
|
|
%{python_sitearch}/qubes/img.pyc
|
|
%{python_sitearch}/qubes/img.pyo
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
/usr/include/libqrexec-utils.h
|
|
/usr/include/libqubes-rpc-filecopy.h
|
|
/usr/include/qrexec.h
|
|
%{_libdir}/libqrexec-utils.a
|
|
%{_libdir}/libqubes-rpc-filecopy.a
|
|
|
|
%changelog
|
|
|