]>
Commit | Line | Data |
---|---|---|
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 | |
31 | BuildRequires: systemd-units | |
32 | %else | |
33 | %global with_systemd 0 | |
34 | %define init_script sysv | |
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 | 47 | Name: @PACKAGE@ |
9588a6ce SH |
48 | Version: @LXC_VERSION_BASE@ |
49 | Release: %{?beta_rel:0.1.%{beta_rel}}%{?!beta_rel:%{norm_rel}}%{?dist} | |
07520b2a | 50 | URL: http://linuxcontainers.org |
9588a6ce | 51 | Source: http://linuxcontainers.org/downloads/%{name}-%{version}%{?beta_dot}.tar.gz |
0adde0f8 | 52 | Summary: Linux Containers userspace tools |
5e97c3fc | 53 | Group: Applications/System |
0adde0f8 | 54 | License: LGPLv2+ |
cef07149 | 55 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
0adde0f8 | 56 | Requires: openssl rsync |
f6a8db2d | 57 | BuildRequires: libcap libcap-devel docbook2X |
5e97c3fc | 58 | |
ce951132 DE |
59 | %if %{with_python} |
60 | Requires: python3 | |
61 | BuildRequires: python3-devel | |
62 | %endif | |
63 | ||
5e97c3fc | 64 | %description |
0adde0f8 | 65 | Containers are insulated areas inside a system, which have their own namespace |
f7f1ba77 SG |
66 | for filesystem, network, PID, IPC, CPU and memory allocation and which can be |
67 | created using the Control Group and Namespace features included in the Linux | |
0adde0f8 DE |
68 | kernel. |
69 | ||
70 | This package provides the lxc-* tools, which can be used to start a single | |
71 | daemon in a container, or to boot an entire "containerized" system, and to | |
72 | manage and debug your containers. | |
73 | ||
74 | %package libs | |
75 | Summary: Shared library files for %{name} | |
76 | Group: System Environment/Libraries | |
77 | %description libs | |
1c41ddcb GK |
78 | The %{name}-libs package contains libraries for running %{name} applications. |
79 | ||
0adde0f8 DE |
80 | %package devel |
81 | Summary: Development library for %{name} | |
82 | Group: Development/Libraries | |
83 | Requires: %{name} = %{version}-%{release}, pkgconfig | |
84 | %description devel | |
805415fc | 85 | The %{name}-devel package contains header files and library needed for |
0adde0f8 DE |
86 | development of the Linux containers. |
87 | ||
88 | %if %{with_lua} | |
89 | %package lua | |
90 | Summary: Lua bindings for %{name} | |
91 | Group: System Environment/Libraries | |
92 | Requires: lua-filesystem | |
93 | BuildRequires: lua-devel | |
94 | %description lua | |
95 | The %{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 | 101 | PATH=$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 | 110 | make %{?_smp_mflags} |
5e97c3fc | 111 | |
112 | %install | |
b9cb4325 DE |
113 | rm -rf %{buildroot} |
114 | make install DESTDIR=%{buildroot} | |
115 | find %{buildroot} -type f -name '*.la' -exec rm -f {} ';' | |
805415fc | 116 | |
5e97c3fc | 117 | %clean |
118 | rm -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}/* |
5da9e545 DL |
127 | %attr(4111,root,root) %{_bindir}/lxc-attach |
128 | %attr(4111,root,root) %{_bindir}/lxc-create | |
be8b5972 | 129 | %attr(4111,root,root) %{_bindir}/lxc-clone |
5da9e545 DL |
130 | %attr(4111,root,root) %{_bindir}/lxc-start |
131 | %attr(4111,root,root) %{_bindir}/lxc-netstat | |
132 | %attr(4111,root,root) %{_bindir}/lxc-unshare | |
133 | %attr(4111,root,root) %{_bindir}/lxc-execute | |
134 | %attr(4111,root,root) %{_bindir}/lxc-checkpoint | |
135 | %attr(4111,root,root) %{_bindir}/lxc-restart | |
0adde0f8 DE |
136 | %{_mandir}/man1/lxc* |
137 | %{_mandir}/man5/lxc* | |
138 | %{_mandir}/man7/lxc* | |
139 | %{_mandir}/ja/man1/lxc* | |
140 | %{_mandir}/ja/man5/lxc* | |
141 | %{_mandir}/ja/man7/lxc* | |
411c76ce | 142 | %{_datadir}/doc/* |
b9cb4325 | 143 | %{_datadir}/lxc/* |
0adde0f8 | 144 | %config(noreplace) %{_sysconfdir}/lxc/* |
5e97c3fc | 145 | |
420dfb59 DE |
146 | %if %{with_systemd} |
147 | %{_unitdir}/lxc.service | |
148 | %else | |
149 | %{_sysconfdir}/rc.d/init.d/lxc | |
150 | %endif | |
87ff951e | 151 | |
1c41ddcb GK |
152 | %files libs |
153 | %defattr(-,root,root) | |
154 | %{_libdir}/*.so.* | |
155 | %{_libdir}/%{name} | |
ce951132 DE |
156 | %if %{with_python} |
157 | %{_libdir}/python* | |
158 | %endif | |
7323456e | 159 | %{_localstatedir}/* |
b9cb4325 | 160 | %attr(4555,root,root) %{_libexecdir}/%{name}/lxc-init |
420dfb59 | 161 | %if %{with_systemd} |
87ff951e | 162 | %attr(555,root,root) %{_libexecdir}/%{name}/lxc-devsetup |
420dfb59 | 163 | %endif |
1c41ddcb | 164 | |
58d6a17e MW |
165 | %if %{with_python} |
166 | %{_libdir}/python3.3/site-packages/_lxc* | |
167 | %{_libdir}/python3.3/site-packages/lxc/* | |
168 | %endif | |
169 | ||
0adde0f8 DE |
170 | %if %{with_lua} |
171 | %files lua | |
172 | %defattr(-,root,root) | |
173 | %{_datadir}/lua | |
174 | %{_libdir}/lua | |
175 | %endif | |
176 | ||
5e97c3fc | 177 | %files devel |
178 | %defattr(-,root,root) | |
179 | %{_includedir}/%{name}/* | |
1c41ddcb | 180 | %{_libdir}/*.so |
b9cb4325 | 181 | %{_libdir}/pkgconfig/* |
5e97c3fc | 182 | |
183 | %changelog | |
0adde0f8 DE |
184 | * Tue Oct 22 2013 Dwight Engen <dwight.engen@oracle.com> - 1.0.0-0.1.alpha2 |
185 | - fix some rpmlint warnings/errors | |
186 | - split lua bits into seperate package | |
187 | ||
188 | * Mon Sep 10 2012 Dwight Engen <dwight.engen@oracle.com> - 0.8.0 | |
b9cb4325 DE |
189 | - fix lxc-init moved to libexec |
190 | - .pc moved to _libdir | |
191 | - package template files /usr/share/lxc/templates | |
192 | ||
0adde0f8 | 193 | * Thu Sep 8 2011 Greg Kurz <gkurz@fr.ibm.com> - 0.7.5.1 |
1c41ddcb GK |
194 | - fix installed files for rpmbuild |
195 | - introduce lxc-libs package | |
b4915399 | 196 | |
0adde0f8 | 197 | * Fri Jul 23 2010 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.7.2 |
7ef6e440 DL |
198 | - set attribute for installed files |
199 | - fix libraries installation | |
7ef6e440 | 200 | |
7920b1b4 | 201 | * Tue Mar 24 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.1 |
237315ff DL |
202 | - Removed capability setting, let the user to do that through "lxc-setcap" |
203 | ||
0adde0f8 | 204 | * Mon Feb 16 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0 |
44931bc7 | 205 | - Added more capabilities to the executables |
206 | ||
0adde0f8 | 207 | * Sun Jan 25 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0 |
cef07149 | 208 | - Reduced spec file |
209 | ||
0adde0f8 | 210 | * Sun Aug 3 2008 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.1.0 |
5e97c3fc | 211 | - Initial RPM release. |
212 | ||
213 | # Local variables: | |
214 | # mode: shell-script | |
215 | # sh-shell: rpm | |
216 | # end: |