]> git.proxmox.com Git - mirror_lxc.git/blame - lxc.spec.in
lxc.spec: adjust for move of libexecdir/lxc-init to sbin/lxc.init
[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
e0f2f5c7 57BuildRequires: libcap libcap-devel docbook2X graphviz
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
9f2fd74c 92Requires: lua-filesystem lua-alt-getopt
0adde0f8
DE
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}/*
0adde0f8
DE
127%{_mandir}/man1/lxc*
128%{_mandir}/man5/lxc*
129%{_mandir}/man7/lxc*
130%{_mandir}/ja/man1/lxc*
131%{_mandir}/ja/man5/lxc*
132%{_mandir}/ja/man7/lxc*
411c76ce 133%{_datadir}/doc/*
b9cb4325 134%{_datadir}/lxc/*
e0f2f5c7 135%{_sysconfdir}/bash_completion.d
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)
ba5783a5 146%{_sbindir}/*
1c41ddcb
GK
147%{_libdir}/*.so.*
148%{_libdir}/%{name}
ce951132
DE
149%if %{with_python}
150%{_libdir}/python*
151%endif
7323456e 152%{_localstatedir}/*
e0f2f5c7 153%{_libexecdir}/%{name}
45e854dc 154%attr(4111,root,root) %{_libexecdir}/%{name}/lxc-user-nic
420dfb59 155%if %{with_systemd}
87ff951e 156%attr(555,root,root) %{_libexecdir}/%{name}/lxc-devsetup
420dfb59 157%endif
1c41ddcb 158
58d6a17e
MW
159%if %{with_python}
160%{_libdir}/python3.3/site-packages/_lxc*
161%{_libdir}/python3.3/site-packages/lxc/*
162%endif
163
0adde0f8
DE
164%if %{with_lua}
165%files lua
166%defattr(-,root,root)
167%{_datadir}/lua
168%{_libdir}/lua
169%endif
170
5e97c3fc 171%files devel
172%defattr(-,root,root)
173%{_includedir}/%{name}/*
1c41ddcb 174%{_libdir}/*.so
b9cb4325 175%{_libdir}/pkgconfig/*
5e97c3fc 176
177%changelog
0adde0f8
DE
178* Tue Oct 22 2013 Dwight Engen <dwight.engen@oracle.com> - 1.0.0-0.1.alpha2
179- fix some rpmlint warnings/errors
180- split lua bits into seperate package
181
182* Mon Sep 10 2012 Dwight Engen <dwight.engen@oracle.com> - 0.8.0
b9cb4325
DE
183- fix lxc-init moved to libexec
184- .pc moved to _libdir
185- package template files /usr/share/lxc/templates
186
0adde0f8 187* Thu Sep 8 2011 Greg Kurz <gkurz@fr.ibm.com> - 0.7.5.1
1c41ddcb
GK
188- fix installed files for rpmbuild
189- introduce lxc-libs package
b4915399 190
0adde0f8 191* Fri Jul 23 2010 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.7.2
7ef6e440
DL
192- set attribute for installed files
193- fix libraries installation
7ef6e440 194
7920b1b4 195* Tue Mar 24 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.1
237315ff
DL
196- Removed capability setting, let the user to do that through "lxc-setcap"
197
0adde0f8 198* Mon Feb 16 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0
44931bc7 199- Added more capabilities to the executables
200
0adde0f8 201* Sun Jan 25 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0
cef07149 202- Reduced spec file
203
0adde0f8 204* Sun Aug 3 2008 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.1.0
5e97c3fc 205- Initial RPM release.
206
207# Local variables:
208# mode: shell-script
209# sh-shell: rpm
210# end: