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