]> git.pld-linux.org Git - packages/docker.git/blob - lxc-docker.spec
update runtime deps from docs
[packages/docker.git] / lxc-docker.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 Summary:        Docker: the Linux container engine
6 Name:           lxc-docker
7 Version:        0.6.4
8 Release:        1
9 License:        Apache v2.0
10 Group:          Applications/System
11 Source0:        https://github.com/dotcloud/docker/archive/v%{version}/docker-%{version}.tar.gz
12 # Source0-md5:  c70bb4f56ef1fee069964a5f8c7c26f9
13 Source6:        %{name}.init
14 URL:            http://github.com/dotcloud/docker
15 BuildRequires:  golang >= 1.1.2
16 BuildRequires:  rpmbuild(macros) >= 1.228
17 Requires(post,preun):   /sbin/chkconfig
18 Requires(postun):       /usr/sbin/groupdel
19 Requires(pre):  /usr/bin/getgid
20 Requires(pre):  /usr/sbin/groupadd
21 Requires:       iproute2 >= 3.5
22 Requires:       iptables
23 Requires:       lxc >= 0.8
24 Requires:       rc-scripts >= 0.4.0.10
25 Requires:       tar >= 1:1.26
26 Requires:       uname(release) >= 3.8
27 Requires:       xz
28 Suggests:       git-core >= 1.7
29 Suggests:       libcgroup
30 Suggests:       xz >= 1:4.9
31 Provides:       group(docker)
32 # only runs on x64 hosts for now:
33 # https://github.com/dotcloud/docker/issues/136
34 # https://github.com/dotcloud/docker/issues/611
35 ExclusiveArch:  %{x8664}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         bash_compdir    %{_datadir}/bash-completion/completions
39 %define         _vimdatadir             %{_datadir}/vim
40
41 # binary stripped or something
42 %define         _enable_debug_packages 0
43
44 %description
45 Docker complements LXC with a high-level API which operates at the
46 process level. It runs unix processes with strong guarantees of
47 isolation and repeatability across servers.
48
49 Docker is a great building block for automating distributed systems:
50 large-scale web deployments, database clusters, continuous deployment
51 systems, private PaaS, service-oriented architectures, etc.
52
53 %package -n bash-completion-%{name}
54 Summary:        bash-completion for Docker
55 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla Dockera
56 Group:          Applications/Shells
57 Requires:       %{name}
58 Requires:       bash-completion >= 2.0
59 %if "%{_rpmversion}" >= "5"
60 BuildArch:      noarch
61 %endif
62
63 %description -n bash-completion-lxc-docker
64 This package provides bash-completion for Docker.
65
66 %description -n bash-completion-lxc-docker -l pl.UTF-8
67 Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera.
68
69 %package -n vim-syntax-%{name}
70 Summary:        Vim syntax: Docker
71 Group:          Applications/Editors/Vim
72 Requires:       %{name} = %{version}-%{release}
73 Requires:       vim-rt >= 4:7.2.170
74 %if "%{_rpmversion}" >= "5"
75 BuildArch:      noarch
76 %endif
77
78 %description -n vim-syntax-%{name}
79 This plugin provides syntax highlighting in Dockerfile.
80
81 %prep
82 %setup -q -n docker-%{version}
83
84 install -d vendor/src/github.com/dotcloud
85 ln -s $(pwd) vendor/src/github.com/dotcloud/docker
86
87 %build
88 export GOPATH=$(pwd)/vendor
89 install -d build
90 cd build
91 VERSION=%{version}
92 GITCOMMIT=pld-%{release} # use RPM_PACKAGE_RELEASE for this
93 # Use these flags when compiling the tests and final binary
94 # without '-d', as that fails now
95 LDFLAGS="-X main.GITCOMMIT $GITCOMMIT -X main.VERSION $VERSION -w"
96 go build -v -ldflags "$LDFLAGS" -a github.com/dotcloud/docker/docker
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/etc/rc.d/init.d,/var/lib/docker/{containers,graph,volumes}}
101 install -p build/docker $RPM_BUILD_ROOT%{_bindir}/lxc-docker
102 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc-docker
103 ln -s lxc-docker $RPM_BUILD_ROOT%{_bindir}/docker
104 #cp -p packaging/debian/lxc-docker.1 $RPM_BUILD_ROOT%{_mandir}/man1
105
106 # bash completion
107 install -d $RPM_BUILD_ROOT%{bash_compdir}
108 cp -p contrib/completion/bash/docker $RPM_BUILD_ROOT%{bash_compdir}/lxc-docker
109 ln -s lxc-docker $RPM_BUILD_ROOT%{bash_compdir}/docker
110
111 # vim syntax
112 install -d $RPM_BUILD_ROOT%{_vimdatadir}
113 cp -a contrib/vim-syntax/* $RPM_BUILD_ROOT%{_vimdatadir}
114 %{__rm} $RPM_BUILD_ROOT%{_vimdatadir}/{LICENSE,README.md}
115
116 %pre
117 %groupadd -g 296 docker
118
119 %post
120 /sbin/chkconfig --add %{name}
121 %service -n %{name} restart
122
123 %preun
124 if [ "$1" = "0" ]; then
125         %service -q %{name} stop
126         /sbin/chkconfig --del %{name}
127 fi
128
129 %postun
130 if [ "$1" = "0" ]; then
131         %groupremove docker
132 fi
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137 %files
138 %defattr(644,root,root,755)
139 %doc README.md CHANGELOG.md CONTRIBUTING.md FIXME LICENSE AUTHORS NOTICE MAINTAINERS
140 %attr(754,root,root) /etc/rc.d/init.d/lxc-docker
141 %attr(755,root,root) %{_bindir}/lxc-docker
142 %attr(755,root,root) %{_bindir}/docker
143 #%{_mandir}/man1/lxc-docker.1*
144 %dir %attr(700,root,root) /var/lib/docker
145 %dir %attr(700,root,root) /var/lib/docker/containers
146 %dir %attr(700,root,root) /var/lib/docker/graph
147 %dir %attr(700,root,root) /var/lib/docker/volumes
148
149 %files -n bash-completion-%{name}
150 %defattr(644,root,root,755)
151 %{bash_compdir}/lxc-docker
152 %{bash_compdir}/docker
153
154 %files -n vim-syntax-%{name}
155 %defattr(644,root,root,755)
156 %doc contrib/vim-syntax/{README.md,LICENSE}
157 %{_vimdatadir}/doc/dockerfile.txt
158 %{_vimdatadir}/ftdetect/dockerfile.vim
159 %{_vimdatadir}/syntax/dockerfile.vim
This page took 0.05388 seconds and 4 git commands to generate.