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