docker/docker.spec

106 lines
3.1 KiB
RPMSpec

%define groupid 65440
%define userid 65440
Name: docker
Version: 1.9.1
Release: 1mamba
Summary: An open-source application container engine
Group: Applications/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.docker.com/
## GITSOURCE https://github.com/docker/docker.git v1.9.1
Source: https://github.com/docker/docker.git/v%{version}/docker-%{version}.tar.bz2
Patch0: docker-1.9.1-build-missing-flags.patch
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libdevmapper-devel
BuildRequires: libgcc
BuildRequires: libgo-devel
BuildRequires: libsystemd-devel
## AUTOBUILDREQ-END
BuildRequires: go-md2man
%systemd_requires
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
An open-source application container engine.
%debug_package
%prep
%setup -q
%patch0 -p1
%build
export AUTO_GOPATH=1
export DOCKER_GITCOMMIT=1
hack/make.sh dynbinary
# man pages
man/md2man-all.sh
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -D -m755 bundles/%{version}/dynbinary/docker-%{version} %{buildroot}%{_bindir}/docker
install -D -m755 bundles/%{version}/dynbinary/dockerinit-%{version} %{buildroot}%{_libdir}/docker/dockerinit
# completion
install -D -m644 contrib/completion/bash/docker %{buildroot}%{_datadir}/bash-completion/completions/docker
install -D -m644 contrib/completion/zsh/_docker %{buildroot}%{_datadir}/zsh/site-functions/_docker
install -D -m644 contrib/completion/fish/docker.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/docker.fish
# systemd
install -D -m644 contrib/init/systemd/docker.service %{buildroot}%{_unitdir}/docker.service
install -D -m644 contrib/init/systemd/docker.socket %{buildroot}%{_unitdir}/docker.socket
#install -D -m644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# vim syntax
install -D -m644 contrib/syntax/vim/syntax/dockerfile.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/dockerfile.vim
install -D -m644 contrib/syntax/vim/ftdetect/dockerfile.vim %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/dockerfile.vim
# man
install -d -m755 %{buildroot}%{_mandir}
cp -a man/man* %{buildroot}%{_mandir}/
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
if [ $1 -ge 1 ]; then
/usr/sbin/groupadd docker -g %{groupid} &>/dev/null
fi
:
%post
%systemd_post %{name}
:
%preun
%systemd_preun %{name}
:
%postun
%systemd_postun %{name}
if [ $1 -eq 0 ]; then
groupdel docker || true
fi
%files
%defattr(-,root,root)
%{_bindir}/docker
%{_unitdir}/docker.service
%{_unitdir}/docker.socket
%{_libdir}/docker/dockerinit
%{_datadir}/bash-completion/completions/docker
%{_datadir}/fish/vendor_completions.d/docker.fish
%{_mandir}/man1/docker*.1*
%{_mandir}/man5/Dockerfile.5*
%{_mandir}/man8/docker-daemon.8*
%{_datadir}/vim/vimfiles/ftdetect/dockerfile.vim
%{_datadir}/vim/vimfiles/syntax/dockerfile.vim
%{_datadir}/zsh/site-functions/_docker
%doc AUTHORS LICENSE
%changelog
* Fri Jan 01 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.1-1mamba
- package created using the webbuild interface