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