diff options
author | Thomas Moschny <thm@fedoraproject.org> | 2013-09-02 00:04:53 +0200 |
---|---|---|
committer | Thomas Moschny <thm@fedoraproject.org> | 2013-09-02 00:04:53 +0200 |
commit | 6eecaff69c8a63e029b46c79b744d629e5f75f5b (patch) | |
tree | 0305d10a84719c8df05f97286bd291941f0f64c1 /lxc.spec | |
parent | 98d2d401d03f04bd57bd60871b719ff0f94e5cea (diff) | |
download | lxc-6eecaff69c8a63e029b46c79b744d629e5f75f5b.tar.gz lxc-6eecaff69c8a63e029b46c79b744d629e5f75f5b.tar.xz lxc-6eecaff69c8a63e029b46c79b744d629e5f75f5b.zip |
Update to 0.9.0.
- Make the -libs subpackage installable on its own:
- Move files needed by the libraries to the subpackage.
- Let packages depend on -libs.
- Add rsync as dependency to the templates package.
- Add (optional) subpackages for Python3 and Lua bindings.
- Add upstream patches for the Fedora template.
- Define and use the _pkgdocdir macro, also fixing rhbz#1001235.
- Update License tag.
Diffstat (limited to 'lxc.spec')
-rw-r--r-- | lxc.spec | 189 |
1 files changed, 162 insertions, 27 deletions
@@ -1,16 +1,40 @@ +%if 0%{?fedora} || 0%{?rhel} > 6 +%global with_python3 1 +%endif + +%global with_lua 1 +%if 0%{?fedora} > 19 +%global luaver 5.2 +%else +%global luaver 5.1 +%endif +%global lualibdir %{_libdir}/lua/%{luaver} +%global luapkgdir %{_datadir}/lua/%{luaver} + Name: lxc -Version: 0.8.0 -Release: 3%{?dist} +Version: 0.9.0 +Release: 1%{?dist} Summary: Linux Resource Containers Group: Applications/System -License: LGPLv2+ +License: LGPLv2+ and GPLv2 URL: http://lxc.sourceforge.net Source0: http://lxc.sourceforge.net/download/lxc/%{name}-%{version}.tar.gz -Patch0: lxc-0.8.0-fedora-template.patch +Patch0: lxc-0.9.0-fedora-template.patch +# only used on Fedora > 19 +Patch1: lxc-0.9.0-lua-5.2.patch BuildRequires: docbook-utils +Buildrequires: docbook2X BuildRequires: kernel-headers BuildRequires: libcap-devel BuildRequires: libtool +%if 0%{?with_python3} +BuildRequires: python3-devel >= 3.2 +%endif +%if 0%{?with_lua} +BuildRequires: lua-devel +%endif + +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} %description Linux Resource Containers provide process and resource isolation without the @@ -20,7 +44,6 @@ overhead of full virtualization. %package libs Summary: Runtime library files for %{name} Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} %description libs Linux Resource Containers provide process and resource isolation without the @@ -29,16 +52,59 @@ overhead of full virtualization. The %{name}-libs package contains libraries for running %{name} applications. +%if 0%{?with_python3} +%package -n python3-%{name} +Summary: Python binding for %{name} +Group: System Environment/Libraries + +%description -n python3-%{name} +Linux Resource Containers provide process and resource isolation without the +overhead of full virtualization. + +The python3-%{name} package contains the Python3 binding for %{name}. + +%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}_lxc\\..*\\.so + + +%package extra +Summary: Extra tools for %{name} +Group: Applications/System +Requires: python3-%{name}%{?_isa} = %{version}-%{release} + +%description extra +Linux Resource Containers provide process and resource isolation without the +overhead of full virtualization. + +This package contains tools needing the Python3 bindings. +%endif + + +%if 0%{?with_lua} +%package -n lua-%{name} +Summary: Lua binding for %{name} +Group: System Environment/Libraries +Requires: lua-filesystem + +%description -n lua-%{name} +Linux Resource Containers provide process and resource isolation without the +overhead of full virtualization. + +The lua-%{name} package contains the Lua binding for %{name}. + +%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}core\\.so\\.0 +%endif + + %package templates Summary: Templates for %{name} Group: System Environment/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} # needed for lxc-busybox Requires: busybox # needed for lxc-debian Requires: dpkg # needed for lxc-debian, lxc-ubuntu: -Requires: debootstrap +Requires: debootstrap rsync # needed for lxc-sshd Requires: openssh-server dhclient @@ -47,13 +113,13 @@ Requires: openssh-server dhclient Linux Resource Containers provide process and resource isolation without the overhead of full virtualization. -The %{name}-template package contains templates for creating containers. +The %{name}-templates package contains templates for creating containers. %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: pkgconfig %description devel @@ -67,19 +133,32 @@ developing applications that use %{name}. %package doc Summary: Documentation for %{name} Group: Documentation -Requires: %{name} = %{version}-%{release} +BuildArch: noarch %description doc This package contains documentation for %{name}. %prep -%setup -q +%setup -q -n %{name}-%{version} %patch0 -p1 - +%if 0%{?with_lua} && 0%{?fedora} > 19 +%patch1 -p1 +%endif %build -%configure --enable-doc --disable-rpath --disable-apparmor +%configure --with-distro=fedora \ + --enable-doc \ + --docdir=%{_pkgdocdir} \ + --disable-rpath \ + --disable-apparmor \ +%if 0%{?with_python3} + --enable-python \ +%endif +%if 0%{?with_lua} + --enable-lua \ +%endif +# intentionally blank line make %{?_smp_mflags} @@ -87,6 +166,12 @@ make %{?_smp_mflags} %{make_install} make DESTDIR=%{buildroot} install mkdir -p %{buildroot}%{_sharedstatedir}/%{name} +%if 0%{?with_lua} +chmod -x %{buildroot}%{luapkgdir}/lxc.lua +%endif + +mkdir -p %{buildroot}%{_pkgdocdir} +cp -a AUTHORS COPYING README %{buildroot}%{_pkgdocdir} %check @@ -100,21 +185,60 @@ make check %files -%doc AUTHORS COPYING README %{_bindir}/%{name}-* -%{_mandir}/man*/%{name}* -%{_sharedstatedir}/%{name} +%{_mandir}/man1/%{name}* +%{_datadir}/%{name}/lxc.functions +%if 0%{?with_python3} +%exclude %{_bindir}/%{name}-device +%exclude %{_bindir}/%{name}-ls +%exclude %{_bindir}/%{name}-start-ephemeral +%exclude %{_mandir}/man1/%{name}-device* +%exclude %{_mandir}/man1/%{name}-ls* +%exclude %{_mandir}/man1/%{name}-start-ephemeral* +%else +%{_bindir}/%{name}-ls +%{_mandir}/man1/%{name}-ls* +%endif %files libs -%doc AUTHORS COPYING -%dir %{_datadir}/lxc -%dir %{_datadir}/lxc/templates +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/templates +%{_datadir}/%{name}/hooks %{_libdir}/liblxc.so.* -%dir %{_libdir}/lxc -%{_libdir}/lxc/rootfs -%dir %{_libexecdir}/lxc -%{_libexecdir}/lxc/lxc-init +%{_libdir}/%{name} +%{_libexecdir}/%{name} +%{_sharedstatedir}/%{name} +%dir %{_sysconfdir}/%{name} +%config(noreplace) %{_sysconfdir}/%{name}/default.conf +%{_mandir}/man5/%{name}* +%{_mandir}/man7/%{name}* +%dir %{_pkgdocdir} +%{_pkgdocdir}/AUTHORS +%{_pkgdocdir}/COPYING +%{_pkgdocdir}/README + + +%if 0%{?with_python3} +%files -n python3-%{name} +%{python3_sitearch}/* + + +%files extra +%{_bindir}/%{name}-device +%{_bindir}/%{name}-ls +%{_bindir}/%{name}-start-ephemeral +%{_mandir}/man1/%{name}-device* +%{_mandir}/man1/%{name}-ls* +%{_mandir}/man1/%{name}-start-ephemeral* +%endif + + +%if 0%{?with_lua} +%files -n lua-%{name} +%{lualibdir}/%{name} +%{luapkgdir}/%{name}.lua +%endif %files templates @@ -123,8 +247,6 @@ make check %exclude %{_datadir}/lxc/templates/lxc-altlinux # needs pacman %exclude %{_datadir}/lxc/templates/lxc-archlinux -# probably outdated -%exclude %{_datadir}/lxc/templates/lxc-lenny # needs zypper %exclude %{_datadir}/lxc/templates/lxc-opensuse # needs ubuntu-cloudimg-query @@ -138,10 +260,24 @@ make check %files doc -%{_docdir}/%{name} +%dir %{_pkgdocdir} +# README, AUTHORS and COPYING intentionally duplicated because -doc +# can be installed on its own. +%{_pkgdocdir}/* %changelog +* Sun Sep 1 2013 Thomas Moschny <thomas.moschny@gmx.de> - 0.9.0-1 +- Update to 0.9.0. +- Make the -libs subpackage installable on its own: + - Move files needed by the libraries to the subpackage. + - Let packages depend on -libs. +- Add rsync as dependency to the templates package. +- Add (optional) subpackages for Python3 and Lua bindings. +- Add upstream patches for the Fedora template. +- Define and use the _pkgdocdir macro, also fixing rhbz#1001235. +- Update License tag. + * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild @@ -198,4 +334,3 @@ make check * Sat Jul 25 2009 Silas Sewell <silas@sewell.ch> - 0.6.3-1 - Initial package - |