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