]> git.pld-linux.org Git - packages/podman.git/blob - podman.spec
375e4592c3b8435343bd66632835e9a79b6bb6a6
[packages/podman.git] / podman.spec
1 Summary:        A tool for managing OCI containers and pods
2 Name:           podman
3 Version:        4.0.2
4 Release:        1
5 License:        Apache v2.0
6 Group:          Applications/System
7 #Source0Download: https://github.com/containers/podman/releases
8 Source0:        https://github.com/containers/podman/archive/v%{version}/%{name}-%{version}.tar.gz
9 # Source0-md5:  b7da206ae75cb19de9af4d6ac7452f50
10 Source1:        policy.json
11 Source2:        registries.conf
12 URL:            https://github.com/containers/podman
13 BuildRequires:  device-mapper-devel
14 BuildRequires:  go-md2man
15 BuildRequires:  golang
16 BuildRequires:  golang-varlink
17 BuildRequires:  gpgme-devel
18 BuildRequires:  libseccomp-devel
19 BuildRequires:  pkgconfig
20 BuildRequires:  rpm-build >= 4.6
21 BuildRequires:  rpmbuild(macros) >= 2.009
22 BuildRequires:  systemd-devel
23 Requires:       conmon
24 Requires:       containernetworking-plugins
25 Requires:       crun
26 Suggests:       slirp4netns
27 Suggests:       uidmap
28 ExclusiveArch:  %go_arches
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define         _enable_debug_packages 0
32
33 %description
34 Podman (the POD MANager) is a tool for managing containers and images,
35 volumes mounted into those containers, and pods made from groups of
36 containers. Podman is based on libpod, a library for container
37 lifecycle management that is also contained in this repository. The
38 libpod library provides APIs for managing containers, pods, container
39 images, and volumes.
40
41 %package -n bash-completion-podman
42 Summary:        bash-completion for podman
43 Group:          Applications/Shells
44 Requires:       %{name} = %{version}-%{release}
45 Requires:       bash-completion >= 2.0
46 BuildArch:      noarch
47
48 %description -n bash-completion-podman
49 This package provides bash-completion for podman.
50
51 %package -n fish-completion-podman
52 Summary:        Fish completion for podman command
53 Group:          Applications/Shells
54 Requires:       %{name} = %{version}-%{release}
55 Requires:       fish
56 BuildArch:      noarch
57
58 %description -n fish-completion-podman
59 Fish completion for podman command.
60
61 %package -n zsh-completion-podman
62 Summary:        Zsh completion for podman command
63 Group:          Applications/Shells
64 Requires:       %{name} = %{version}-%{release}
65 Requires:       zsh
66 BuildArch:      noarch
67
68 %description -n zsh-completion-podman
69 Zsh completion for podman command.
70
71 %prep
72 %setup -q
73
74 %build
75 %{__make} \
76         GO=/usr/bin/go \
77         GOCMD="CGO_ENABLED=1 %__go" \
78         GOPATH=$(pwd)/.gopath \
79         PREFIX="%{_prefix}" \
80         BINDIR="%{_bindir}" \
81         LIBEXECDIR="%{_libexecdir}" \
82         MANDIR="%{_mandir}" \
83         SHAREDIR_CONTAINERS="%{_datadir}/containers" \
84         ETCDIR="%{_sysconfdir}" \
85         TMPFILESDIR="%{systemdtmpfilesdir}" \
86         SYSTEMDDIR="%{systemdunitdir}" \
87         USERSYSTEMDDIR="%{systemduserunitdir}" \
88         PYTHON="%{__python3}"
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/containers,%{bash_compdir},%{fish_compdir},%{zsh_compdir},%{_sharedstatedir}/containers}
94
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT \
97         PREFIX="%{_prefix}" \
98         BINDIR="%{_bindir}" \
99         LIBEXECDIR="%{_libexecdir}" \
100         MANDIR="%{_mandir}" \
101         SHAREDIR_CONTAINERS="%{_datadir}/containers" \
102         ETCDIR="%{_sysconfdir}" \
103         TMPFILESDIR="%{systemdtmpfilesdir}" \
104         SYSTEMDDIR="%{systemdunitdir}" \
105         USERSYSTEMDDIR="%{systemduserunitdir}" \
106         PYTHON="%{__python3}"
107
108 cp -p %{SOURCE1} %{SOURCE2} \
109         vendor/github.com/containers/common/pkg/config/containers.conf \
110         $RPM_BUILD_ROOT%{_sysconfdir}/containers
111
112 %{__sed} -e 's|/var/lib/containers|%{_sharedstatedir}/containers|g' \
113         vendor/github.com/containers/storage/storage.conf \
114         > $RPM_BUILD_ROOT%{_sysconfdir}/containers/storage.conf
115
116 $RPM_BUILD_ROOT%{_bindir}/podman completion -f $RPM_BUILD_ROOT%{bash_compdir}/podman bash
117 $RPM_BUILD_ROOT%{_bindir}/podman completion -f $RPM_BUILD_ROOT%{fish_compdir}/podman.fish fish
118 $RPM_BUILD_ROOT%{_bindir}/podman completion -f $RPM_BUILD_ROOT%{zsh_compdir}/_podman zsh
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %post
124 %systemd_post podman.service podman.socket
125
126 %preun
127 %systemd_preun podman.service podman.socket
128
129 %postun
130 %systemd_reload
131
132 %files
133 %defattr(644,root,root,755)
134 %doc README.md
135 %dir %{_sysconfdir}/containers
136 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/containers.conf
137 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/policy.json
138 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/registries.conf
139 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/storage.conf
140 %attr(755,root,root) %{_bindir}/podman
141 %attr(755,root,root) %{_bindir}/podman-remote
142 %dir %{_libexecdir}/podman
143 %attr(755,root,root) %{_libexecdir}/podman/rootlessport
144 %{systemdunitdir}/podman.service
145 %{systemdunitdir}/podman.socket
146 %{systemdunitdir}/podman-auto-update.service
147 %{systemdunitdir}/podman-auto-update.timer
148 %{systemdunitdir}/podman-restart.service
149 %{systemduserunitdir}/podman.service
150 %{systemduserunitdir}/podman.socket
151 %{systemduserunitdir}/podman-auto-update.service
152 %{systemduserunitdir}/podman-auto-update.timer
153 %{systemduserunitdir}/podman-restart.service
154 %{_mandir}/man1/podman*.1*
155 %{_mandir}/man5/oci-hooks.5*
156 /usr/lib/tmpfiles.d/podman.conf
157 %dir %{_sharedstatedir}/containers
158
159 %files -n bash-completion-podman
160 %defattr(644,root,root,755)
161 %{bash_compdir}/podman
162
163 %files -n fish-completion-%{name}
164 %defattr(644,root,root,755)
165 %{fish_compdir}/podman.fish
166
167 %files -n zsh-completion-%{name}
168 %defattr(644,root,root,755)
169 %{zsh_compdir}/_podman
This page took 0.099037 seconds and 2 git commands to generate.