]> git.pld-linux.org Git - packages/docker.git/blob - lxc-docker.spec
up to 0.6.2; all go deps are vendored
[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.2
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:  41df68b4b4f1e03ab1d0964f4b73f440
13 Source100:      https://raw.github.com/dotcloud/docker/v0.5.3/Makefile
14 # Source100-md5:        44cc86a37fc5dfe59596076d346da20d
15 Source6:        %{name}.init
16 URL:            http://github.com/dotcloud/docker
17 BuildRequires:  golang >= 1.1.2
18 BuildRequires:  rpmbuild(macros) >= 1.228
19 Requires(post,preun):   /sbin/chkconfig
20 Requires(postun):       /usr/sbin/groupdel
21 Requires(pre):  /usr/bin/getgid
22 Requires(pre):  /usr/sbin/groupadd
23 Requires:       iptables
24 Requires:       lxc
25 Requires:       rc-scripts >= 0.4.0.10
26 Requires:       tar
27 Requires:       uname(release) >= 3.8
28 Requires:       xz
29 Provides:       group(docker)
30 # only runs on x64 hosts for now:
31 # https://github.com/dotcloud/docker/issues/136
32 # https://github.com/dotcloud/docker/issues/611
33 ExclusiveArch:  %{x8664}
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         bash_compdir    %{_datadir}/bash-completion/completions
37
38 # binary stripped or something
39 %define         _enable_debug_packages 0
40
41 %description
42 Docker complements LXC with a high-level API which operates at the
43 process level. It runs unix processes with strong guarantees of
44 isolation and repeatability across servers.
45
46 Docker is a great building block for automating distributed systems:
47 large-scale web deployments, database clusters, continuous deployment
48 systems, private PaaS, service-oriented architectures, etc.
49
50 %package -n bash-completion-lxc-docker
51 Summary:        bash-completion for Docker
52 Summary(pl.UTF-8):      bashowe uzupełnianie nazw dla Dockera
53 Group:          Applications/Shells
54 Requires:       %{name}
55 Requires:       bash-completion >= 2.0
56 %if "%{_rpmversion}" >= "5"
57 BuildArch:      noarch
58 %endif
59
60 %description -n bash-completion-lxc-docker
61 This package provides bash-completion for Docker.
62
63 %description -n bash-completion-lxc-docker -l pl.UTF-8
64 Pakiet ten dostarcza bashowe uzupełnianie nazw dla Dockera.
65
66 %prep
67 %setup -q -n docker-%{version}
68 cp -p %{SOURCE100} .
69
70 %build
71 # avoid interfering with builder env
72 unset GIT_WORK_TREE
73 unset GIT_DIR
74 %{__make} VERBOSE=1
75
76 %if %{with tests}
77 %{__make} test
78 %endif
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/etc/rc.d/init.d,/var/lib/docker/{containers,graph,volumes}}
83 install -p bin/docker $RPM_BUILD_ROOT%{_bindir}/lxc-docker
84 install -p %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lxc-docker
85 ln -s lxc-docker $RPM_BUILD_ROOT%{_bindir}/docker
86 cp -p packaging/debian/lxc-docker.1 $RPM_BUILD_ROOT%{_mandir}/man1
87
88 # bash completion
89 install -d $RPM_BUILD_ROOT%{bash_compdir}
90 cp -p contrib/docker.bash $RPM_BUILD_ROOT%{bash_compdir}/lxc-docker
91 ln -s lxc-docker $RPM_BUILD_ROOT%{bash_compdir}/docker
92
93 %pre
94 %groupadd -g 296 docker
95
96 %post
97 /sbin/chkconfig --add %{name}
98 %service -n %{name} restart
99
100 %preun
101 if [ "$1" = "0" ]; then
102         %service -q %{name} stop
103         /sbin/chkconfig --del %{name}
104 fi
105
106 %postun
107 if [ "$1" = "0" ]; then
108         %groupremove docker
109 fi
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr(644,root,root,755)
116 %doc README.md CHANGELOG.md CONTRIBUTING.md FIXME LICENSE AUTHORS NOTICE MAINTAINERS
117 %attr(754,root,root) /etc/rc.d/init.d/lxc-docker
118 %attr(755,root,root) %{_bindir}/lxc-docker
119 %attr(755,root,root) %{_bindir}/docker
120 %{_mandir}/man1/lxc-docker.1*
121 %dir %attr(700,root,root) /var/lib/docker
122 %dir %attr(700,root,root) /var/lib/docker/containers
123 %dir %attr(700,root,root) /var/lib/docker/graph
124 %dir %attr(700,root,root) /var/lib/docker/volumes
125
126 %files -n bash-completion-lxc-docker
127 %defattr(644,root,root,755)
128 %{bash_compdir}/lxc-docker
129 %{bash_compdir}/docker
This page took 0.065598 seconds and 3 git commands to generate.