File lxcfs.spec of Package lxcfs

Name: lxcfs
Version: 2.0.0
Release: 2
Summary: FS which allows containers to have virtualized cgroup filesystems
License: Apache-2.0
Group: System/Management
URL: http://linuxcontainers.org
Source: https://linuxcontainers.org/downloads/%name/%name-%version.tar.gz
Source9: %name-rpmlintrc
Provides: pam_cgfs = %version-%release

BuildRequires: pkg-config
BuildRequires: pkgconfig(fuse)
BuildRequires: pam-devel
BuildRequires: help2man

%description
%name implements a FUSE fs which allows containers to have virtualized cgroup
filesystems and virtualized views of /proc/cpuinfo and /proc/meminfo.


%package -n lib%name
Summary: Shared library of %name
Group: System/Libraries
Provides: lib%{name}0 = %version-%release

%description -n lib%name
Shared library of %name.


%package -n lib%name-devel
Summary: Development files for lib%name
Group: Development/Libraries/C and C++
Requires: lib%name = %version-%release

%description -n lib%name-devel
Development files for lib%name.


%package -n pam_cgfs
Summary: CGroup FS pam module
Group: System/Libraries

%description -n pam_cgfs
When a user logs in, this pam module will create cgroups which the user may
administer, either for all controllers or for any controllers listed on the
command line (if any are listed).


%prep
%setup -q


%build
%configure --with-distro=suse
make %{?_smp_mflags}


%install
%make_install
rm -f %buildroot%_libdir/*.la
install -d -m 0755 %buildroot%_unitdir
install -p -m 0644 config/init/systemd/*.service %buildroot%_unitdir/
install -d -m 0755 %buildroot%_sbindir
ln -sf service %buildroot%_sbindir/rc%name
install -d -m 0755 %buildroot%_includedir/%name
install -p -m 0644 bindings.h %buildroot%_includedir/%name/


%pre
%service_add_pre lxcfs.service

%post
%service_add_post lxcfs.service

%preun
%service_del_preun lxcfs.service

%postun
%service_del_postun lxcfs.service


%post -n lib%name -p /sbin/ldconfig

%postun -n lib%name -p /sbin/ldconfig


%files
%defattr(-,root,root)
%doc AUTHORS
%_sbindir/*
%_bindir/*
%_datadir/lxc
%_datadir/%name
%_mandir/man1/*
%_unitdir/*
/%_lib/security/*


%files -n lib%name
%defattr(-,root,root)
%_libdir/*.so.*


%files -n lib%name-devel
%defattr(-,root,root)
%_libdir/*.so
%_includedir/*


%changelog
openSUSE Build Service is sponsored by