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