mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 00:42:13 +00:00
Reduce spec file
From: Daniel Lezcano <daniel.lezcano@free.fr> Simplified the spec file Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
b0a33c1eb6
commit
cef07149cd
76
lxc.spec.in
76
lxc.spec.in
@ -20,37 +20,21 @@
|
|||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
%define _unpackaged_files_terminate_build 0
|
|
||||||
|
|
||||||
%define RELEASE 1
|
|
||||||
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE: %RELEASE}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Arguments that can be passed to the rpm builder:
|
|
||||||
#
|
|
||||||
# --define 'confargs <extra args to configure args>' (def. '')
|
|
||||||
#
|
|
||||||
|
|
||||||
%{!?confargs: %{expand:%%define confargs ''}}
|
|
||||||
|
|
||||||
# What kernel are we building for?
|
|
||||||
%{!?kernel: %{expand:%%define kernel %(uname -r)}}
|
|
||||||
|
|
||||||
%define _prefix /usr
|
|
||||||
|
|
||||||
Name: @PACKAGE@
|
Name: @PACKAGE@
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Release: %{rel}
|
Release: 1
|
||||||
URL: http://lxc.sourceforge.net
|
URL: http://lxc.sourceforge.net
|
||||||
Summary: %name
|
Source: http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
Summary: %{name} : Linux Container
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: LGPL
|
License: LGPL
|
||||||
Source: %name/%name-%version.tar.gz
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRoot: %_tmppath/%name-%version-root
|
Requires: libcap
|
||||||
|
BuildRequires: libcap libcap-devel docbook-utils
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
||||||
The package "%name" provides the command lines to create and manage
|
The package "%{name}" provides the command lines to create and manage
|
||||||
containers. It contains a full featured container with the isolation
|
containers. It contains a full featured container with the isolation
|
||||||
/ virtualization of the pids, the ipc, the utsname, the mount points,
|
/ virtualization of the pids, the ipc, the utsname, the mount points,
|
||||||
/proc, /sys, the network and it takes into account the control groups.
|
/proc, /sys, the network and it takes into account the control groups.
|
||||||
@ -61,49 +45,32 @@ Virtual Private Server, or to run isolated applications like bash or
|
|||||||
sshd.
|
sshd.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Release: %{rel}
|
Release: 1
|
||||||
Summary: development library for %{name}
|
Summary: development library for %{name}
|
||||||
Requires: libcap
|
Group: Development/Libraries
|
||||||
Group: Application/System
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
The %{name}-devel package contains header files and library needed for
|
The %{name}-devel package contains header files and library needed for
|
||||||
development of containers
|
development of the linux containers.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
PATH=$PATH:/usr/sbin:/sbin %configure
|
||||||
# I don't understand why but I have to specify this prefix :(
|
make %{?_smp_mflags}
|
||||||
%configure $args %{confargs} --prefix=/
|
|
||||||
|
|
||||||
ncpus=`egrep -c "^cpu[0-9]+" /proc/stat || :`
|
|
||||||
make -j$ncpus
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
%makeinstall
|
||||||
|
|
||||||
|
find $RPM_BUILD_ROOT -type f -name '*.la' -exec rm -f {} ';'
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%post
|
||||||
|
mkdir -p /var/lxc
|
||||||
chmod ugo+w /var/lxc
|
chmod ugo+w /var/lxc
|
||||||
|
|
||||||
PATH=$PATH:/usr/sbin:/sbin
|
|
||||||
|
|
||||||
which setcap 2>&1 > /dev/null
|
|
||||||
RES=$?
|
|
||||||
|
|
||||||
if [ $RES != 0 ]; then
|
|
||||||
echo -e "\t********************WARNING*************************"
|
|
||||||
echo -e "\t* The 'setcap' command was not found, this is not *"
|
|
||||||
echo -e "\t* a problem and the 'lxc' package is installed but *"
|
|
||||||
echo -e "\t* you will have to run the 'lxc' commands as root. *"
|
|
||||||
echo -e "\t* If you wish to run these commands as a non-root *"
|
|
||||||
echo -e "\t* user, you will need to install libcap-2 package *"
|
|
||||||
echo -e "\t* and reinstall lxc *"
|
|
||||||
echo -e "\t****************************************************"
|
|
||||||
else
|
|
||||||
setcap cap_setpcap,cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep \
|
setcap cap_setpcap,cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep \
|
||||||
%{_bindir}/lxc-execute && \
|
%{_bindir}/lxc-execute && \
|
||||||
setcap cap_setpcap,cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep \
|
setcap cap_setpcap,cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep \
|
||||||
@ -126,16 +93,17 @@ fi
|
|||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_mandir}/*
|
%{_mandir}/*
|
||||||
|
|
||||||
# %post -p /sbin/ldconfig
|
|
||||||
# %postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_includedir}/%{name}/*
|
%{_includedir}/%{name}/*
|
||||||
|
%{_libdir}/*.so*
|
||||||
%{_libdir}/*.a
|
%{_libdir}/*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|
||||||
|
* Sun Jan 25 2009 Daniel Lezcano <daniel.lezcano@free.fr> - Version 0.6.0
|
||||||
|
- Reduced spec file
|
||||||
|
|
||||||
* Sun Aug 3 2008 Daniel Lezcano <dlezcano@fr.ibm.com> - Version 0.1.0
|
* Sun Aug 3 2008 Daniel Lezcano <dlezcano@fr.ibm.com> - Version 0.1.0
|
||||||
- Initial RPM release.
|
- Initial RPM release.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user