]> git.proxmox.com Git - mirror_lxc.git/blob - lxc.spec.in
travis: Build using the daily PPA
[mirror_lxc.git] / lxc.spec.in
1 #
2 # lxc: linux Container library
3 #
4 # (C) Copyright IBM Corp. 2007, 2008
5 #
6 # Authors:
7 # Daniel Lezcano <daniel.lezcano at free.fr>
8 #
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public
11 # License as published by the Free Software Foundation; either
12 # version 2.1 of the License, or (at your option) any later version.
13 #
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Lesser General Public License for more details.
18 #
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with this library; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
23 %global with_python %{?_with_python: 1} %{?!_with_python: 0}
24 %global with_lua %{?_with_lua: 1} %{?!_with_lua: 0}
25
26 # Set with_systemd on distros that use it, so we can install the service
27 # file, otherwise the sysvinit script will be installed
28 %if 0%{?fedora} >= 14 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
29 %global with_systemd 1
30 %define init_script systemd
31 BuildRequires: systemd-units
32 %else
33 %global with_systemd 0
34 %define init_script sysvinit
35 %endif
36
37 # RPM needs alpha/beta/rc in Release: not Version: to ensure smooth
38 # package upgrades from alpha->beta->rc->release. For more info see:
39 # http://fedoraproject.org/wiki/Packaging%3aNamingGuidelines#NonNumericRelease
40 %if "x@LXC_VERSION_BETA@" != "x"
41 %global beta_rel @LXC_VERSION_BETA@
42 %global beta_dot .%{beta_rel}
43 %else
44 %global norm_rel 1
45 %endif
46
47 Name: @PACKAGE@
48 Version: @LXC_VERSION_BASE@
49 Release: %{?beta_rel:0.1.%{beta_rel}}%{?!beta_rel:%{norm_rel}}%{?dist}
50 URL: http://linuxcontainers.org
51 Source: http://linuxcontainers.org/downloads/%{name}-%{version}%{?beta_dot}.tar.gz
52 Summary: Linux Containers userspace tools
53 Group: Applications/System
54 License: LGPLv2+
55 BuildRoot: %{_tmppath}/%{name}-%{version}-build
56 Requires: openssl rsync
57 BuildRequires: libcap libcap-devel docbook2X graphviz
58
59 %if %{with_python}
60 Requires: python3
61 BuildRequires: python3-devel
62 %endif
63
64 %description
65 Containers are insulated areas inside a system, which have their own namespace
66 for filesystem, network, PID, IPC, CPU and memory allocation and which can be
67 created using the Control Group and Namespace features included in the Linux
68 kernel.
69
70 This package provides the lxc-* tools, which can be used to start a single
71 daemon in a container, or to boot an entire "containerized" system, and to
72 manage and debug your containers.
73
74 %package libs
75 Summary: Shared library files for %{name}
76 Group: System Environment/Libraries
77 %description libs
78 The %{name}-libs package contains libraries for running %{name} applications.
79
80 %package devel
81 Summary: Development library for %{name}
82 Group: Development/Libraries
83 Requires: %{name} = %{version}-%{release}, pkgconfig
84 %description devel
85 The %{name}-devel package contains header files and library needed for
86 development of the Linux containers.
87
88 %if %{with_lua}
89 %package lua
90 Summary: Lua bindings for %{name}
91 Group: System Environment/Libraries
92 Requires: lua-filesystem lua-alt-getopt
93 BuildRequires: lua-devel
94 %description lua
95 The %{name}-lua package contains %{name} bindings for lua.
96 %endif
97
98 %prep
99 %setup -q -n %{name}-%{version}%{?beta_dot}
100 %build
101 PATH=$PATH:/usr/sbin:/sbin %configure $args \
102 %if %{with_lua}
103 --enable-lua \
104 %endif
105 %if %{with_python}
106 --enable-python \
107 %endif
108 --disable-rpath \
109 --with-init-script=%{init_script}
110 make %{?_smp_mflags}
111
112 %install
113 rm -rf %{buildroot}
114 make install DESTDIR=%{buildroot}
115 find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
116
117 %clean
118 rm -rf %{buildroot}
119
120 %post
121 %post libs -p /sbin/ldconfig
122 %postun libs -p /sbin/ldconfig
123
124 %files
125 %defattr(-,root,root)
126 %{_bindir}/*
127 %{_mandir}/man1/lxc*
128 %{_mandir}/man5/lxc*
129 %{_mandir}/man7/lxc*
130 %{_mandir}/ja/man1/lxc*
131 %{_mandir}/ja/man5/lxc*
132 %{_mandir}/ja/man7/lxc*
133 %{_datadir}/doc/*
134 %{_datadir}/lxc/*
135 %{_sysconfdir}/bash_completion.d
136 %config(noreplace) %{_sysconfdir}/lxc/*
137
138 %if %{with_systemd}
139 %{_unitdir}/lxc.service
140 %else
141 %{_sysconfdir}/rc.d/init.d/lxc
142 %endif
143
144 %files libs
145 %defattr(-,root,root)
146 %{_libdir}/*.so.*
147 %{_libdir}/%{name}
148 %if %{with_python}
149 %{_libdir}/python*
150 %endif
151 %{_localstatedir}/*
152 %{_libexecdir}/%{name}
153 %attr(4555,root,root) %{_libexecdir}/%{name}/lxc-init
154 %attr(4111,root,root) %{_libexecdir}/%{name}/lxc-user-nic
155 %if %{with_systemd}
156 %attr(555,root,root) %{_libexecdir}/%{name}/lxc-devsetup
157 %endif
158
159 %if %{with_python}
160 %{_libdir}/python3.3/site-packages/_lxc*
161 %{_libdir}/python3.3/site-packages/lxc/*
162 %endif
163
164 %if %{with_lua}
165 %files lua
166 %defattr(-,root,root)
167 %{_datadir}/lua
168 %{_libdir}/lua
169 %endif
170
171 %files devel
172 %defattr(-,root,root)
173 %{_includedir}/%{name}/*
174 %{_libdir}/*.so
175 %{_libdir}/pkgconfig/*
176
177 %changelog
178 * Tue Oct 22 2013 Dwight Engen <dwight.engen@oracle.com> - 1.0.0-0.1.alpha2
179 - fix some rpmlint warnings/errors
180 - split lua bits into seperate package
181
182 * Mon Sep 10 2012 Dwight Engen <dwight.engen@oracle.com> - 0.8.0
183 - fix lxc-init moved to libexec
184 - .pc moved to _libdir
185 - package template files /usr/share/lxc/templates
186
187 * Thu Sep 8 2011 Greg Kurz <gkurz@fr.ibm.com> - 0.7.5.1
188 - fix installed files for rpmbuild
189 - introduce lxc-libs package
190
191 * Fri Jul 23 2010 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.7.2
192 - set attribute for installed files
193 - fix libraries installation
194
195 * Tue Mar 24 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.1
196 - Removed capability setting, let the user to do that through "lxc-setcap"
197
198 * Mon Feb 16 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0
199 - Added more capabilities to the executables
200
201 * Sun Jan 25 2009 Daniel Lezcano <daniel.lezcano@free.fr> - 0.6.0
202 - Reduced spec file
203
204 * Sun Aug 3 2008 Daniel Lezcano <dlezcano@fr.ibm.com> - 0.1.0
205 - Initial RPM release.
206
207 # Local variables:
208 # mode: shell-script
209 # sh-shell: rpm
210 # end: