]> git.pld-linux.org Git - packages/lxc.git/blob - lxc.spec
- release 6 (by relup.sh)
[packages/lxc.git] / lxc.spec
1 #
2 # Conditional build:
3 %bcond_without  seccomp # SecComp syscall filter
4 %bcond_without  apparmor        # apparmor
5 %bcond_without  lua     # Lua binding
6 %bcond_without  python  # Python binding
7
8 Summary:        Linux Container Tools
9 Summary(pl.UTF-8):      Narzędzia do kontenerów linuksowych (LXC)
10 Name:           lxc
11 Version:        0.9.0
12 Release:        6
13 License:        LGPL v2.1+
14 Group:          Applications/System
15 Source0:        http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz
16 # Source0-md5:  8552a4479090616f4bc04d8473765fc9
17 Source1:        %{name}-pld.in.sh
18 Patch0:         %{name}-devpts.patch
19 Patch1:         %{name}-pld.patch
20 Patch2:         am-1.14.patch
21 Patch3:         checkconfig-module.patch
22 Patch4:         checkconfig-vserver-config.patch
23 Patch5:         fedora-template.patch
24 URL:            http://lxc.sourceforge.net/
25 BuildRequires:  autoconf >= 2.50
26 BuildRequires:  automake
27 BuildRequires:  docbook-dtd30-sgml
28 BuildRequires:  docbook-utils
29 BuildRequires:  docbook2X
30 %{?with_apparmor:BuildRequires: libapparmor-devel}
31 BuildRequires:  libcap-devel
32 %{?with_seccomp:BuildRequires:  libseccomp-devel}
33 %{?with_lua:BuildRequires:      lua51-devel >= 5.1}
34 BuildRequires:  pkgconfig
35 %{?with_python:BuildRequires:   python3-devel >= 3.2}
36 BuildRequires:  rpmbuild(macros) >= 1.612
37 BuildRequires:  sed >= 4.0
38 Requires:       rc-scripts >= 0.4.6
39 Requires:       which
40 Suggests:       net-tools
41 Suggests:       rsync
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         configpath      /var/lib/lxc
45
46 %description
47 Tools to create and manage containers. It contains a full featured
48 container with the isolation / virtualization of the pids, the ipc,
49 the utsname, the mount points, /proc, /sys, the network and it takes
50 into account the control groups. It is very light, flexible, and
51 provides a set of tools around the container like the monitoring with
52 asynchronous events notification, or the freeze of the container. This
53 package is useful to create Virtual Private Server, or to run isolated
54 applications like bash or sshd.
55
56 %description -l pl.UTF-8
57 Narzędzia do tworzenia i zarządzania kontenerami. System ten obejmuje
58 w pełni funkcjonalne kontenery z ilozacją/wirtualizacją pidów, ipc,
59 utsname, punktów montowania, /proc, /sys, sieci oraz uwzględniające
60 grupy kontrolne. Jest bardzo lekki, elastyczny i udostępnia narzędzia
61 do czynności związanych z kontenerami, takich jak monitorowanie z
62 asynchronicznym powiadamianiem o zdarzeniach czy zamrażanie. Ten
63 pakiet jest przydatny do tworzenia wirtualnych serwerów prywatnych
64 oraz uruchamiania izolowanych aplikacji, takich jak bash czy sshd.
65
66 %package devel
67 Summary:        Header files for lxc library
68 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki lxc
69 Group:          Development/Libraries
70 Requires:       %{name} = %{version}-%{release}
71
72 %description devel
73 Header files for lxc library.
74
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki lxc.
77
78 %package -n lua-lxc
79 Summary:        Lua binding for LXC
80 Summary(pl.UTF-8):      Wiązanie Lua do LXC
81 Group:          Libraries
82 Requires:       %{name} = %{version}-%{release}
83 Requires:       lua51-libs >= 5.1
84
85 %description -n lua-lxc
86 Lua binding for LXC.
87
88 %description -n lua-lxc -l pl.UTF-8
89 Wiązanie Lua do LXC.
90
91 %package -n python3-lxc
92 Summary:        Python (3.x) binding for LXC
93 Summary(pl.UTF-8):      Wiązanie Pythona (3.x) do LXC
94 Group:          Libraries
95 Requires:       %{name} = %{version}-%{release}
96 Requires:       python3-libs >= 3.2
97
98 %description -n python3-lxc
99 Python (3.x) binding for LXC.
100
101 %description -n python3-lxc -l pl.UTF-8
102 Wiązanie Pythona (3.x) do LXC.
103
104 %prep
105 %setup -q
106 %patch0 -p1
107 %patch1 -p1
108 %patch2 -p1
109 %patch3 -p1
110 %patch4 -p1
111 %patch5 -p1
112
113 cp -p %{SOURCE1} templates/lxc-pld.in
114
115 %build
116 %{__aclocal} -I config
117 %{__autoconf}
118 %{__autoheader}
119 %{__automake}
120 %configure \
121         db2xman=docbook2X2man \
122         --disable-rpath \
123         --enable-doc \
124         %{__enable_disable apparmor} \
125         %{__enable_disable lua} \
126         %{__enable_disable python} \
127         %{__enable_disable seccomp} \
128         --with-config-path=%{configpath} \
129         --with-distro=pld
130
131 %{__make}
132 %{__make} -C doc
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT{%{configpath},/var/{cache,log}/lxc}
137 %{__make} install \
138         DESTDIR=$RPM_BUILD_ROOT \
139         pcdatadir=%{_pkgconfigdir}
140
141 %{__make} -C doc install \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
145
146 %if %{with python}
147 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
148 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/lxc
149 %endif
150 %if %{with lua}
151 %{__sed} -i -e '1s,#!/usr/bin/env lua,#!/usr/bin/lua51,' $RPM_BUILD_ROOT%{_bindir}/lxc-top
152 %endif
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %post   -p /sbin/ldconfig
158 %postun -p /sbin/ldconfig
159
160 %files
161 %defattr(644,root,root,755)
162 %doc AUTHORS ChangeLog CONTRIBUTING MAINTAINERS README TODO doc/FAQ.txt doc/examples/*.conf
163 %attr(755,root,root) %{_bindir}/lxc-attach
164 %attr(755,root,root) %{_bindir}/lxc-cgroup
165 %attr(755,root,root) %{_bindir}/lxc-checkconfig
166 %attr(755,root,root) %{_bindir}/lxc-checkpoint
167 %attr(755,root,root) %{_bindir}/lxc-clone
168 %attr(755,root,root) %{_bindir}/lxc-console
169 %attr(755,root,root) %{_bindir}/lxc-create
170 %attr(755,root,root) %{_bindir}/lxc-destroy
171 %attr(755,root,root) %{_bindir}/lxc-execute
172 %attr(755,root,root) %{_bindir}/lxc-freeze
173 %attr(755,root,root) %{_bindir}/lxc-info
174 %attr(755,root,root) %{_bindir}/lxc-kill
175 %attr(755,root,root) %{_bindir}/lxc-monitor
176 %attr(755,root,root) %{_bindir}/lxc-netstat
177 %attr(755,root,root) %{_bindir}/lxc-ps
178 %attr(755,root,root) %{_bindir}/lxc-restart
179 %attr(755,root,root) %{_bindir}/lxc-shutdown
180 %attr(755,root,root) %{_bindir}/lxc-start
181 %attr(755,root,root) %{_bindir}/lxc-stop
182 %attr(755,root,root) %{_bindir}/lxc-unfreeze
183 %attr(755,root,root) %{_bindir}/lxc-unshare
184 %attr(755,root,root) %{_bindir}/lxc-version
185 %attr(755,root,root) %{_bindir}/lxc-wait
186 %attr(755,root,root) %{_libdir}/liblxc.so.*.*.*
187 %attr(755,root,root) %ghost %{_libdir}/liblxc.so.0
188 %dir %{_libdir}/lxc
189 %dir %{_libdir}/lxc/rootfs
190 %{_libdir}/lxc/rootfs/README
191 %attr(755,root,root) %{_libdir}/lxc/lxc-init
192 %dir %{_sysconfdir}/lxc
193 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lxc/default.conf
194 %dir %{_datadir}/lxc
195 %{_datadir}/%{name}/lxc.functions
196 %dir %{_datadir}/%{name}/hooks
197 %dir %{_datadir}/%{name}/templates
198 %attr(755,root,root) %{_datadir}/%{name}/hooks/mount*
199 %attr(755,root,root) %{_datadir}/%{name}/templates/lxc-*
200 %{_mandir}/man1/lxc-attach.1*
201 %{_mandir}/man1/lxc-cgroup.1*
202 %{_mandir}/man1/lxc-checkconfig.1*
203 %{_mandir}/man1/lxc-checkpoint.1*
204 %{_mandir}/man1/lxc-clone.1*
205 %{_mandir}/man1/lxc-console.1*
206 %{_mandir}/man1/lxc-create.1*
207 %{_mandir}/man1/lxc-destroy.1*
208 %{_mandir}/man1/lxc-execute.1*
209 %{_mandir}/man1/lxc-freeze.1*
210 %{_mandir}/man1/lxc-info.1*
211 %{_mandir}/man1/lxc-kill.1*
212 %{_mandir}/man1/lxc-monitor.1*
213 %{_mandir}/man1/lxc-netstat.1*
214 %{_mandir}/man1/lxc-ps.1*
215 %{_mandir}/man1/lxc-restart.1*
216 %{_mandir}/man1/lxc-shutdown.1*
217 %{_mandir}/man1/lxc-start.1*
218 %{_mandir}/man1/lxc-stop.1*
219 %{_mandir}/man1/lxc-unfreeze.1*
220 %{_mandir}/man1/lxc-unshare.1*
221 %{_mandir}/man1/lxc-version.1*
222 %{_mandir}/man1/lxc-wait.1*
223 %{_mandir}/man5/lxc.conf.5*
224 %{_mandir}/man7/lxc.7*
225 %if %{without python}
226 # legacy version
227 %attr(755,root,root) %{_bindir}/lxc-ls
228 %{_mandir}/man1/lxc-ls.1*
229 %endif
230
231 %dir %{configpath}
232 %dir %attr(750,root,root) /var/log/lxc
233 %dir %attr(750,root,root) /var/cache/lxc
234
235 %files devel
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/liblxc.so
238 %{_includedir}/lxc
239 %{_pkgconfigdir}/lxc.pc
240
241 %if %{with lua}
242 %files -n lua-lxc
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_bindir}/lxc-top
245 %dir %{_libdir}/lua/5.1/lxc
246 %attr(755,root,root) %{_libdir}/lua/5.1/lxc/core.so
247 %{_datadir}/lua/5.1/lxc.lua
248 %{_mandir}/man1/lxc-top.1*
249 %endif
250
251 %if %{with python}
252 %files -n python3-lxc
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_bindir}/lxc-device
255 %attr(755,root,root) %{_bindir}/lxc-ls
256 %attr(755,root,root) %{_bindir}/lxc-start-ephemeral
257 %{py3_sitedir}/lxc
258 %attr(755,root,root) %{py3_sitedir}/_lxc.cpython-*.so
259 %{py3_sitedir}/_lxc-0.1-py*.egg-info
260 %{_mandir}/man1/lxc-device.1*
261 %{_mandir}/man1/lxc-ls.1*
262 %{_mandir}/man1/lxc-start-ephemeral.1*
263 %endif
This page took 0.051597 seconds and 4 git commands to generate.