Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > 0da4e0e8143718b8401678385a9c59c8 > files > 2

golang-libcontainer-1.2.0-6.mga5.src.rpm

%global debug_package   %{nil}
%define import_path     github.com/docker/libcontainer
%define gopath          %{_libdir}/golang
%define gosrc %{gopath}/src/pkg/%{import_path}
%global commit      28cb5f9dfd6f3352c610a4f1502b5df4f69389ea
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           golang-libcontainer
# Not possible due to previous upload
#Version:        1.2.0.git%{shortcommit}
Version:        1.2.0
Release:        %mkrel 6
Summary:        Docker libcontainer library
License:        ASL 2.0
URL:            https://%{import_path}
Source0:        https://%{import_path}/archive/%{commit}.tar.gz
BuildRequires:  golang
Requires:       golang
BuildRequires:  golang(github.com/codegangsta/cli) >= 1.1.0-1
BuildRequires:  golang(github.com/coreos/go-systemd/activation)
BuildRequires:  golang(github.com/coreos/go-systemd/dbus)
BuildRequires:  golang(github.com/godbus/dbus)
Provides:       nsinit
Group:			Development/Other

%package devel
BuildRequires:  golang >= 1.3.3
BuildRequires:  golang(github.com/syndtr/gocapability/capability)
Requires:       golang >= 1.3.3
Requires:       golang(github.com/syndtr/gocapability/capability)
Summary:        Docker libcontainer library
Provides:       golang(%{import_path}) = %{version}-%{release}
Provides:       golang(%{import_path}/apparmor) = %{version}-%{release}
Provides:       golang(%{import_path}/cgroups) = %{version}-%{release}
Provides:       golang(%{import_path}/cgroups/fs) = %{version}-%{release}
Provides:       golang(%{import_path}/cgroups/systemd) = %{version}-%{release}
Provides:       golang(%{import_path}/console) = %{version}-%{release}
Provides:       golang(%{import_path}/devices) = %{version}-%{release}
Provides:       golang(%{import_path}/integration) = %{version}-%{release}
Provides:       golang(%{import_path}/ipc) = %{version}-%{release}
Provides:       golang(%{import_path}/label) = %{version}-%{release}
Provides:       golang(%{import_path}/mount) = %{version}-%{release}
Provides:       golang(%{import_path}/mount/nodes) = %{version}-%{release}
Provides:       golang(%{import_path}/namespaces) = %{version}-%{release}
Provides:       golang(%{import_path}/namespaces/nsenter) = %{version}-%{release}
Provides:       golang(%{import_path}/netlink) = %{version}-%{release}
Provides:       golang(%{import_path}/network) = %{version}-%{release}
Provides:       golang(%{import_path}/nsinit) = %{version}-%{release}
Provides:       golang(%{import_path}/security/capbilities) = %{version}-%{release}
Provides:       golang(%{import_path}/security/restrict) = %{version}-%{release}
Provides:       golang(%{import_path}/selinux) = %{version}-%{release}
Provides:       golang(%{import_path}/system) = %{version}-%{release}
Provides:       golang(%{import_path}/user) = %{version}-%{release}
Provides:       golang(%{import_path}/utils) = %{version}-%{release}
Provides:       golang(%{import_path}/xattr) = %{version}-%{release}
Group:			Development/Other

%description
Simple library that implements container support for Linux

%description devel
Simple library that implements container support for Linux

This package contains library source intended for building other packages
which use libcontainer.

%prep
%setup -n libcontainer-%{commit}
rm -rf vendor

%build
mkdir -p ./_build/src/github.com/docker
ln -s $(pwd) ./_build/src/%{import_path}

export GOPATH=$(pwd)/_build:%{gopath}
pushd $(pwd)/_build/src
#go build %{import_path}/nsinit
popd

%install
# Install nsinit
install -d %{buildroot}%{_bindir}
#install -p -m 755 ./_build/src/nsinit %{buildroot}%{_bindir}/nsinit

rm -rf _build sample_configs

for d in . apparmor cgroups cgroups/fs cgroups/systemd console devices integration ipc label mount mount/nodes namespaces namespaces/nsenter netlink network nsinit security/capabilities security/restrict selinux system user utils xattr; do
    install -d -p %{buildroot}/%{gosrc}/$d
    cp -av $d/*.go %{buildroot}/%{gosrc}/$d
done
cp -av namespaces/nsenter/*.c %{buildroot}/%{gosrc}/namespaces/nsenter

%check

%files
%defattr(-,root,root,-)
%doc LICENSE README.md
#%{_bindir}/nsinit

%files devel
%defattr(-,root,root,-)
%doc LICENSE README.md
%dir %attr(755,root,root) %{gosrc}
%dir %attr(755,root,root) %{gosrc}/apparmor
%dir %attr(755,root,root) %{gosrc}/cgroups
%dir %attr(755,root,root) %{gosrc}/cgroups/fs
%dir %attr(755,root,root) %{gosrc}/cgroups/systemd
%dir %attr(755,root,root) %{gosrc}/console
%dir %attr(755,root,root) %{gosrc}/devices
%dir %attr(755,root,root) %{gosrc}/integration
%dir %attr(755,root,root) %{gosrc}/ipc
%dir %attr(755,root,root) %{gosrc}/label
%dir %attr(755,root,root) %{gosrc}/mount
%dir %attr(755,root,root) %{gosrc}/mount/nodes
%dir %attr(755,root,root) %{gosrc}/namespaces
%dir %attr(755,root,root) %{gosrc}/namespaces/nsenter
%dir %attr(755,root,root) %{gosrc}/netlink
%dir %attr(755,root,root) %{gosrc}/network
%dir %attr(755,root,root) %{gosrc}/nsinit
%dir %attr(755,root,root) %{gosrc}/security/capabilities
%dir %attr(755,root,root) %{gosrc}/security/restrict
%dir %attr(755,root,root) %{gosrc}/selinux
%dir %attr(755,root,root) %{gosrc}/system
%dir %attr(755,root,root) %{gosrc}/user
%dir %attr(755,root,root) %{gosrc}/utils
%dir %attr(755,root,root) %{gosrc}/xattr
%{gosrc}/*.go
%{gosrc}/cgroups/*.go
%{gosrc}/cgroups/fs/*.go
%{gosrc}/cgroups/systemd/*.go
%{gosrc}/devices/*.go
%{gosrc}/apparmor/*.go
%{gosrc}/console/*.go
%{gosrc}/integration/*.go
%{gosrc}/ipc/*.go
%{gosrc}/label/*.go
%{gosrc}/mount/*.go
%{gosrc}/mount/nodes/*.go
%{gosrc}/namespaces/*.go
%{gosrc}/namespaces/nsenter/*.go
%{gosrc}/namespaces/nsenter/*.c
%{gosrc}/netlink/*.go
%{gosrc}/network/*.go
%{gosrc}/nsinit/*.go
%{gosrc}/security/*/*.go
%{gosrc}/selinux/*.go
%{gosrc}/system/*.go
%{gosrc}/user/*.go
%{gosrc}/utils/*.go
%{gosrc}/xattr/*.go


%changelog
* Sun Nov 23 2014 bcornec <bcornec> 1.2.0-6.mga5
+ Revision: 798391
- Avoids circular deps !
- revert to 1.2.0-5 version as the git suffix cannot be used for now due to a previous upload and I need to make progresses with this.
- Update to a git version of libcontainer to allow docker build. Still an issue with go build in this package

* Wed Nov 19 2014 bcornec <bcornec> 1.2.0-4.mga5
+ Revision: 797789
- Also include namespace/nsenter tools needed by latest docker-io

* Wed Oct 15 2014 umeabot <umeabot> 1.2.0-3.mga5
+ Revision: 743785
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.2.0-2.mga5
+ Revision: 679865
- Mageia 5 Mass Rebuild

* Mon Sep 01 2014 bcornec <bcornec> 1.2.0-1.mga5
+ Revision: 670250
- Update to upstream libcontainer 1.2.0

* Fri Jul 11 2014 bcornec <bcornec> 1.1.0-2.mga5
+ Revision: 651209
- Includes some missing subdirectories used by docker

* Fri Jul 11 2014 bcornec <bcornec> 1.1.0-1.mga5
+ Revision: 651201
- Import from upstream project
- Created package structure for golang-libcontainer.