]> git.proxmox.com Git - mirror_lxcfs.git/blame - lxcfs.spec.in
Release LXCFS 6.0.0
[mirror_lxcfs.git] / lxcfs.spec.in
CommitLineData
3cd4195e 1# Set with_systemd on distros that use it, so we can install the service
2# file, otherwise the sysvinit script will be installed
3%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
4%global with_systemd 1
5%define init_script systemd
6#
7# BuildRequires systemd-units on fedora and rhel
8%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7
9BuildRequires: systemd-units
10%endif
11#
12# BuildRequires systemd on openSUSE and SUSE
13%if 0%{?suse_version} >= 1210
14BuildRequires: systemd
15%endif
16%else
17%global with_systemd 0
18%define init_script sysvinit
19%endif
20
21Summary: Linux Containers File System
e5af758b
CB
22Name: {{PROJECT}}
23Version: {{PROJECT_VERSION}}
3cd4195e 24Release: 1%{?dist}
25URL: https://linuxcontainers.org/lxcfs/downloads/
26Source0: %{name}-%{version}.tar.gz
db0463bf 27License: LGPL 2.1+
3cd4195e 28Group: System Environment/Libraries
29BuildRoot: %{_tmppath}/%{name}-root
30
31BuildRequires: gcc
32BuildRequires: libtool
33BuildRequires: docbook2X
34BuildRequires: doxygen
35BuildRequires: fuse-devel
36Requires: fuse-libs
37
38%description
39LXCFS is a simple userspace filesystem designed to work around some current limitations of the Linux kernel.
40
41%prep
42%setup -q
43
44%build
45%configure \
46 --with-init-script=%{init_script}
47%{make_build}
48
49#Modify mount hook command if running on RHEL 7 to skip cgroup mounts for stability reasons.
50%if 0%{?rhel} == 7
51sed -i 's/\/lxc.mount.hook/\/lxc.mount.hook --skip-cgroup-mounts/g' share/00-lxcfs.conf
52%endif
53
54%install
55[ %{buildroot} != "/" ] && rm -rf %{buildroot}
56make install DESTDIR=%{buildroot}
57mkdir -p %{buildroot}/%{_sharedstatedir}/%{name}
58
59%clean
60[ %{buildroot} != "/" ] && rm -rf %{buildroot}
61
62%files
63%defattr(-,root,root,-)
64%dir %{_sharedstatedir}/%{name}
65%if %{with_systemd}
66/lib/systemd/system/%{name}.service
67%endif
68%{_bindir}/%{name}
69%config(noreplace) %{_datarootdir}/lxc/config/common.conf.d/00-%{name}.conf
70%{_datarootdir}/%{name}/lxc.mount.hook
71%{_datarootdir}/%{name}/lxc.reboot.hook
72%{_libdir}/%{name}/liblxcfs.la
73%{_libdir}/%{name}/liblxcfs.so
74
75%changelog
76* Wed Jan 30 2019 Tom Parrott <tomp@tomp.uk> - 3.1.0
77- Initial RPM release.