]> git.proxmox.com Git - mirror_lxcfs.git/blob - lxcfs.spec.in
Release LXCFS 6.0.0
[mirror_lxcfs.git] / lxcfs.spec.in
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
9 BuildRequires: systemd-units
10 %endif
11 #
12 # BuildRequires systemd on openSUSE and SUSE
13 %if 0%{?suse_version} >= 1210
14 BuildRequires: systemd
15 %endif
16 %else
17 %global with_systemd 0
18 %define init_script sysvinit
19 %endif
20
21 Summary: Linux Containers File System
22 Name: {{PROJECT}}
23 Version: {{PROJECT_VERSION}}
24 Release: 1%{?dist}
25 URL: https://linuxcontainers.org/lxcfs/downloads/
26 Source0: %{name}-%{version}.tar.gz
27 License: LGPL 2.1+
28 Group: System Environment/Libraries
29 BuildRoot: %{_tmppath}/%{name}-root
30
31 BuildRequires: gcc
32 BuildRequires: libtool
33 BuildRequires: docbook2X
34 BuildRequires: doxygen
35 BuildRequires: fuse-devel
36 Requires: fuse-libs
37
38 %description
39 LXCFS 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
51 sed -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}
56 make install DESTDIR=%{buildroot}
57 mkdir -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.