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