]> git.proxmox.com Git - mirror_lxc.git/blame - lxc.spec.in
utils: Drop trailing / in lxcpath
[mirror_lxc.git] / lxc.spec.in
CommitLineData
5e97c3fc 1#
2# lxc: linux Container library
3#
4# (C) Copyright IBM Corp. 2007, 2008
5#
6# Authors:
9afe19d6 7# Daniel Lezcano <daniel.lezcano at free.fr>
5e97c3fc 8#
9# This library is free software; you can redistribute it and/or
10# modify it under the terms of the GNU Lesser General Public
11# License as published by the Free Software Foundation; either
12# version 2.1 of the License, or (at your option) any later version.
13#
14# This library is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# Lesser General Public License for more details.
18#
19# You should have received a copy of the GNU Lesser General Public
20# License along with this library; if not, write to the Free Software
250b1eec 21# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5e97c3fc 22
0adde0f8
DE
23%global with_python %{?_with_python: 1} %{?!_with_python: 0}
24%global with_lua %{?_with_lua: 1} %{?!_with_lua: 0}
25
420dfb59
DE
26# Set with_systemd on distros that use it, so we can install the service
27# file, otherwise the sysvinit script will be installed
28%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
29%global with_systemd 1
30%define init_script systemd
31BuildRequires: systemd-units
32%else
33%global with_systemd 0
dc068290 34%define init_script sysvinit
420dfb59
DE
35%endif
36
9588a6ce
SH
37# RPM needs alpha/beta/rc in Release: not Version: to ensure smooth
38# package upgrades from alpha->beta->rc->release. For more info see:
39# http://fedoraproject.org/wiki/Packaging%3aNamingGuidelines#NonNumericRelease
40%if "x@LXC_VERSION_BETA@" != "x"
41%global beta_rel @LXC_VERSION_BETA@
42%global beta_dot .%{beta_rel}
43%else
44%global norm_rel 1
45%endif
46
5e97c3fc 47Name: @PACKAGE@
9588a6ce
SH
48Version: @LXC_VERSION_BASE@
49Release: %{?beta_rel:0.1.%{beta_rel}}%{?!beta_rel:%{norm_rel}}%{?dist}
07520b2a 50URL: http://linuxcontainers.org
9588a6ce 51Source: http://linuxcontainers.org/downloads/%{name}-%{version}%{?beta_dot}.tar.gz
0adde0f8 52Summary: Linux Containers userspace tools
5e97c3fc 53Group: Applications/System
0adde0f8 54License: LGPLv2+
cef07149 55BuildRoot: %{_tmppath}/%{name}-%{version}-build
0adde0f8 56Requires: openssl rsync
f6a8db2d 57BuildRequires: libcap libcap-devel docbook2X
5e97c3fc 58
ce951132
DE
59%if %{with_python}
60Requires: python3
61BuildRequires: python3-devel
62%endif
63
5e97c3fc 64%description
0adde0f8 65Containers are insulated areas inside a system, which have their own namespace
f7f1ba77
SG
66for filesystem, network, PID, IPC, CPU and memory allocation and which can be
67created using the Control Group and Namespace features included in the Linux
0adde0f8
DE
68kernel.
69
70This package provides the lxc-* tools, which can be used to start a single
71daemon in a container, or to boot an entire "containerized" system, and to
72manage and debug your containers.
73
74%package libs
75Summary: Shared library files for %{name}
76Group: System Environment/Libraries
77%description libs
1c41ddcb
GK
78The %{name}-libs package contains libraries for running %{name} applications.
79
0adde0f8
DE
80%package devel
81Summary: Development library for %{name}
82Group: Development/Libraries
83Requires: %{name} = %{version}-%{release}, pkgconfig
84%description devel
805415fc 85The %{name}-devel package contains header files and library needed for
0adde0f8
DE
86development of the Linux containers.
87
88%if %{with_lua}
89%package lua
90Summary: Lua bindings for %{name}
91Group: System Environment/Libraries
92Requires: lua-filesystem
93BuildRequires: lua-devel
94%description lua
95The %{name}-lua package contains %{name} bindings for lua.
96%endif
5e97c3fc 97
98%prep
9588a6ce 99%setup -q -n %{name}-%{version}%{?beta_dot}
5e97c3fc 100%build
ce951132 101PATH=$PATH:/usr/sbin:/sbin %configure $args \
f080ffd7
DE
102%if %{with_lua}
103 --enable-lua \
104%endif
ce951132
DE
105%if %{with_python}
106 --enable-python \
107%endif
420dfb59
DE
108 --disable-rpath \
109 --with-init-script=%{init_script}
cef07149 110make %{?_smp_mflags}
5e97c3fc 111
112%install
b9cb4325
DE
113rm -rf %{buildroot}
114make install DESTDIR=%{buildroot}
115find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
805415fc 116
5e97c3fc 117%clean
118rm -rf %{buildroot}
119
cef07149 120%post
0adde0f8
DE
121%post libs -p /sbin/ldconfig
122%postun libs -p /sbin/ldconfig
805415fc 123
5e97c3fc 124%files
125%defattr(-,root,root)
5e97c3fc 126%{_bindir}/*
a3da3d82 127%attr(4111,root,root) %{_bindir}/lxc-user-nic
0adde0f8
DE
128%{_mandir}/man1/lxc*
129%{_mandir}/man5/lxc*
130%{_mandir}/man7/lxc*
131%{_mandir}/ja/man1/lxc*
132%{_mandir}/ja/man5/lxc*
133%{_mandir}/ja/man7/lxc*
411c76ce 134%{_datadir}/doc/*
b9cb4325 135%{_datadir}/lxc/*
0adde0f8 136%config(noreplace) %{_sysconfdir}/lxc/*
5e97c3fc 137
420dfb59
DE
138%if %{with_systemd}
139%{_unitdir}/lxc.service
140%else
141%{_sysconfdir}/rc.d/init.d/lxc
142%endif
87ff951e 143
1c41ddcb
GK
144%files libs
145%defattr(-,root,root)
146%{_libdir}/*.so.*
147%{_libdir}/%{name}
ce951132
DE
148%if %{with_python}
149%{_libdir}/python*
150%endif
7323456e 151%{_localstatedir}/*
b9cb4325 152%attr(4555,root,root) %{_libexecdir}/%{name}/lxc-init
420dfb59 153%if %{with_systemd}
87ff951e 154%attr(555,root,root) %{_libexecdir}/%{name}/lxc-devsetup
420dfb59 155%endif
1c41ddcb 156
58d6a17e
MW
157%if %{with_python}
158%{_libdir}/python3.3/site-packages/_lxc*
159%{_libdir}/python3.3/site-packages/lxc/*
160%endif
161
0adde0f8
DE
162%if %{with_lua}
163%files lua
164%defattr(-,root,root)
165%{_datadir}/lua
166%{_libdir}/lua
167%endif
168
5e97c3fc 169%files devel
170%defattr(-,root,root)
171%{_includedir}/%{name}/*
1c41ddcb 172%{_libdir}/*.so
b9cb4325 173%{_libdir}/pkgconfig/*
5e97c3fc 174
175%changelog
0adde0f8
DE
176* Tue Oct 22 2013 Dwight Engen <dwight.engen@oracle.com> - 1.0.0-0.1.alpha2
177- fix some rpmlint warnings/errors
178- split lua bits into seperate package
179
180* Mon Sep 10 2012 Dwight Engen <dwight.engen@oracle.com> - 0.8.0
b9cb4325
DE
181- fix lxc-init moved to libexec
182- .pc moved to _libdir
183- package template files /usr/share/lxc/templates
184
0adde0f8 185* Thu Sep 8 2011 Greg Kurz <gkurz@fr.ibm.com> - 0.7.5.1
1c41ddcb
GK
186- fix installed files for rpmbuild
187- introduce lxc-libs package
b4915399 188
0adde0f8 189* Fri Jul 23 2010 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.7.2
7ef6e440
DL
190- set attribute for installed files
191- fix libraries installation
7ef6e440 192
7920b1b4 193* Tue Mar 24 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.1
237315ff
DL
194- Removed capability setting, let the user to do that through "lxc-setcap"
195
0adde0f8 196* Mon Feb 16 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0
44931bc7 197- Added more capabilities to the executables
198
0adde0f8 199* Sun Jan 25 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0
cef07149 200- Reduced spec file
201
0adde0f8 202* Sun Aug 3 2008 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.1.0
5e97c3fc 203- Initial RPM release.
204
205# Local variables:
206# mode: shell-script
207# sh-shell: rpm
208# end: