]>
Commit | Line | Data |
---|---|---|
f637201a ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | # | |
88a32d38 | 5 | %define hawkey_ver 0.67.0 |
9fd94ada JR |
6 | %define libcomps_ver 0.1.8 |
7 | %define libmodulemd_ver 2.9.3 | |
8 | %define rpm_ver 4.14.0 | |
9 | ||
10 | %define _enable_debug_packages 0 | |
1abae8cd JR |
11 | |
12 | Summary: Package manager | |
13 | Summary(pl.UTF-8): Zarządca pakietów | |
feb41732 | 14 | Name: dnf |
33f9733e | 15 | Version: 4.19.0 |
001a72bb | 16 | Release: 1 |
feb41732 | 17 | Group: Base |
a1a5f7dd JB |
18 | # GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING |
19 | License: GPL v2 (parts on GPL v2+ or GPL) | |
1abae8cd | 20 | Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz |
33f9733e | 21 | # Source0-md5: 21a1eaaa8a4ab1b222460983125c141b |
85a72ee1 JR |
22 | Source1: pld.repo |
23 | Source2: pld-archive.repo | |
24 | Source3: pld-debuginfo.repo | |
25 | Source4: pld-multilib.repo | |
1abae8cd | 26 | Patch0: install.patch |
85a72ee1 | 27 | Patch1: repos.d.patch |
5467f6f6 | 28 | Patch2: uname-cpuinfo-deps.patch |
70e5df64 | 29 | URL: https://github.com/rpm-software-management/dnf |
5aa69e21 | 30 | BuildRequires: bash-completion-devel |
a1a5f7dd | 31 | BuildRequires: cmake >= 2.4 |
cebdb6a6 | 32 | BuildRequires: gettext-tools |
14ed53ae | 33 | BuildRequires: libmodulemd >= %{libmodulemd_ver} |
1abae8cd JR |
34 | BuildRequires: python3 |
35 | BuildRequires: python3-gpg | |
36 | BuildRequires: python3-hawkey >= %{hawkey_ver} | |
37 | BuildRequires: python3-libcomps >= %{libcomps_ver} | |
38 | BuildRequires: python3-libdnf >= %{hawkey_ver} | |
39 | BuildRequires: python3-modules | |
40 | BuildRequires: python3-nose | |
41 | BuildRequires: python3-rpm >= %{rpm_ver} | |
8d645f54 | 42 | BuildRequires: rpm-build >= 4.6 |
feb41732 | 43 | BuildRequires: rpmbuild(macros) >= 1.647 |
1abae8cd | 44 | BuildRequires: rpm-pythonprov |
feb41732 ER |
45 | BuildRequires: sed >= 4.0 |
46 | BuildRequires: sphinx-pdg | |
47 | BuildRequires: systemd-devel | |
48 | Requires(post,preun,postun): systemd-units >= 38 | |
14ed53ae | 49 | Requires: libmodulemd >= %{libmodulemd_ver} |
1abae8cd JR |
50 | Requires: python3-gpg |
51 | Requires: python3-hawkey >= %{hawkey_ver} | |
52 | Requires: python3-libcomps >= %{libcomps_ver} | |
53 | Requires: python3-libdnf >= %{hawkey_ver} | |
28de7959 | 54 | Requires: python3-modules |
1abae8cd | 55 | Requires: python3-rpm |
feb41732 | 56 | Requires: systemd-units >= 0.38 |
1abae8cd JR |
57 | Recommends: deltarpm |
58 | Recommends: python3-dbus | |
59 | Recommends: python3-unbound | |
60 | Recommends: rpm-plugin-systemd-inhibit | |
feb41732 ER |
61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
62 | ||
63 | %description | |
1abae8cd JR |
64 | Utility that allows users to manage packages on their systems. It |
65 | supports RPMs, modules and comps groups & environments. | |
feb41732 | 66 | |
d3326039 | 67 | %description -l pl.UTF-8 |
1abae8cd JR |
68 | Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie. |
69 | ||
70e5df64 ER |
70 | %package automatic |
71 | Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution | |
d3326039 | 72 | Summary(pl.UTF-8): Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania |
70e5df64 | 73 | Group: Base |
70e5df64 ER |
74 | Requires(post): systemd |
75 | Requires(preun): systemd | |
76 | Requires(postun): systemd | |
d3326039 | 77 | Requires: %{name} = %{version}-%{release} |
c4dd43df | 78 | Requires: python3-modules |
9fd94ada | 79 | BuildArch: noarch |
70e5df64 ER |
80 | |
81 | %description automatic | |
82 | Alternative CLI to "dnf upgrade" suitable for automatic, regular | |
83 | execution. | |
84 | ||
d3326039 JB |
85 | %description automatic -l pl.UTF-8 |
86 | Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do | |
87 | automatycznego, regularnego wywoływania. | |
88 | ||
a1a5f7dd JB |
89 | %package -n bash-completion-dnf |
90 | Summary: Bash completion for dnf command | |
91 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia dnf | |
92 | Group: Applications/Shells | |
93 | Requires: %{name} = %{version}-%{release} | |
94 | Requires: bash-completion | |
9fd94ada | 95 | BuildArch: noarch |
a1a5f7dd JB |
96 | |
97 | %description -n bash-completion-dnf | |
98 | Bash completion for dnf command. | |
99 | ||
100 | %description -n bash-completion-dnf -l pl.UTF-8 | |
101 | Bashowe uzupełnianie parametrów dla polecenia dnf. | |
102 | ||
1abae8cd | 103 | %package -n yum |
3658ab37 JB |
104 | Summary: Yum compatibility layer for DNF |
105 | Summary(pl.UTF-8): Warstwa zgodności z YUM-em dla DNF-a | |
14ed53ae | 106 | Group: Base |
a1a5f7dd | 107 | Requires: %{name} = %{version}-%{release} |
1abae8cd JR |
108 | Recommends: sqlite3 |
109 | Conflicts: yum < 3.4.3-505 | |
9fd94ada | 110 | BuildArch: noarch |
a1a5f7dd | 111 | |
1abae8cd | 112 | %description -n yum |
3658ab37 | 113 | Yum compatibility layer for DNF. |
a1a5f7dd | 114 | |
1abae8cd | 115 | %description -n yum -l pl.UTF-8 |
3658ab37 | 116 | Warstwa zgodności z YUM-em dla DNF-a. |
a1a5f7dd | 117 | |
feb41732 | 118 | %prep |
1abae8cd | 119 | %setup -q |
38fbb761 | 120 | %patch0 -p1 |
85a72ee1 | 121 | %patch1 -p1 |
5467f6f6 | 122 | %patch2 -p1 |
feb41732 | 123 | |
feb41732 | 124 | %build |
1abae8cd JR |
125 | install -d build |
126 | cd build | |
a1a5f7dd | 127 | %cmake .. \ |
1abae8cd JR |
128 | -DPYTHON_DESIRED:FILEPATH=%{__python3} \ |
129 | -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir} \ | |
130 | -DDNF_VERSION=%{version} \ | |
a1a5f7dd | 131 | -DSYSTEMD_DIR=%{systemdunitdir} |
feb41732 ER |
132 | |
133 | %{__make} | |
134 | %{__make} doc-man | |
135 | ||
feb41732 ER |
136 | %install |
137 | rm -rf $RPM_BUILD_ROOT | |
85a72ee1 | 138 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{yum,%{name}/{vars,aliases.d,plugins,modules.d,modules.defaults.d,repos.d}} \ |
747eb767 | 139 | -d $RPM_BUILD_ROOT{%{_localstatedir}/log/,%{_var}/cache/dnf} \ |
748413d4 | 140 | -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf-plugins/__pycache__ |
a1a5f7dd | 141 | |
1abae8cd | 142 | %{__make} -C build install \ |
feb41732 ER |
143 | DESTDIR=$RPM_BUILD_ROOT |
144 | ||
1abae8cd | 145 | touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log |
feb41732 | 146 | |
1abae8cd JR |
147 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-3 $RPM_BUILD_ROOT%{_bindir}/dnf |
148 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-automatic-3 $RPM_BUILD_ROOT%{_bindir}/dnf-automatic | |
feb41732 | 149 | |
1abae8cd | 150 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{%{name}-strict.conf,aliases.d/zypper.conf} |
a1a5f7dd | 151 | |
1be86d14 JP |
152 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/zh_Hans |
153 | ||
1abae8cd JR |
154 | # YUM compat layer |
155 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/%{name}.conf,yum.conf} | |
156 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/plugins,yum/pluginconf.d} | |
157 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/protected.d,yum/protected.d} | |
85a72ee1 | 158 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/repos.d,yum/repos.d} |
1abae8cd | 159 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/vars,yum/vars} |
3658ab37 | 160 | ln -s dnf $RPM_BUILD_ROOT%{_bindir}/yum |
a1a5f7dd | 161 | |
85a72ee1 JR |
162 | %ifarch i686 ppc sparc alpha athlon aarch64 %{arm} |
163 | %define ftp_arch %{_target_cpu} | |
164 | %endif | |
165 | %ifarch pentium2 pentium3 pentium4 | |
166 | %define ftp_arch i686 | |
167 | %endif | |
168 | %ifarch %{x8664} | |
169 | %define ftp_arch x86_64 | |
170 | %define ftp_alt_arch i686 | |
171 | %define ftp_alt2_arch x32 | |
172 | %endif | |
173 | %ifarch x32 | |
174 | %define ftp_arch x32 | |
175 | %define ftp_alt_arch x86_64 | |
176 | %define ftp_alt2_arch i686 | |
177 | %endif | |
178 | ||
179 | %define pld_repo %{SOURCE1} | |
180 | %define pld_archive_repo %{SOURCE2} | |
181 | %define pld_debuginfo_repo %{SOURCE3} | |
182 | ||
183 | %ifarch %{x8664} x32 | |
184 | %define pld_multilib_repo %{SOURCE4} | |
185 | %define pld_multilib2_repo %{SOURCE4} | |
186 | %endif | |
187 | ||
188 | %{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.repo | |
189 | ||
190 | %if 0%{?pld_multilib_repo:1} | |
191 | %{__sed} 's|%%ARCH%%|%{ftp_alt_arch}|g' < %{pld_multilib_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.repo | |
192 | %endif | |
193 | ||
194 | %if 0%{?pld_multilib2_repo:1} | |
195 | %{__sed} 's|%%ARCH%%|%{ftp_alt2_arch}|g' < %{pld_multilib_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt2_arch}.repo | |
196 | %endif | |
197 | ||
198 | %if 0%{?pld_debuginfo_repo:1} | |
199 | %{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_debuginfo_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-debuginfo.repo | |
200 | %endif | |
201 | ||
202 | %if 0%{?pld_archive_repo:1} | |
203 | %{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_archive_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-archive.repo | |
204 | %endif | |
205 | ||
748413d4 JR |
206 | %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf |
207 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf | |
208 | ||
1abae8cd | 209 | %find_lang %{name} |
feb41732 ER |
210 | |
211 | %clean | |
212 | rm -rf $RPM_BUILD_ROOT | |
213 | ||
214 | %post | |
215 | %systemd_post dnf-makecache.timer | |
216 | ||
217 | %preun | |
218 | %systemd_preun dnf-makecache.timer | |
219 | ||
220 | %postun | |
221 | %systemd_reload | |
222 | ||
70e5df64 | 223 | %post automatic |
1abae8cd | 224 | %systemd_post dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer |
70e5df64 ER |
225 | |
226 | %preun automatic | |
1abae8cd | 227 | %systemd_preun dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer |
70e5df64 ER |
228 | |
229 | %postun automatic | |
230 | %systemd_reload | |
231 | ||
feb41732 ER |
232 | %files -f %{name}.lang |
233 | %defattr(644,root,root,755) | |
a1a5f7dd | 234 | %doc AUTHORS PACKAGE-LICENSING README.rst |
feb41732 ER |
235 | %attr(755,root,root) %{_bindir}/dnf |
236 | %dir %{_sysconfdir}/%{name} | |
70e5df64 ER |
237 | %dir %{_sysconfdir}/%{name}/plugins |
238 | %dir %{_sysconfdir}/%{name}/protected.d | |
85a72ee1 | 239 | %dir %{_sysconfdir}/%{name}/repos.d |
feb41732 | 240 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf |
85a72ee1 | 241 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/repos.d/*.repo |
feb41732 ER |
242 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf |
243 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} | |
1abae8cd JR |
244 | %{_mandir}/man5/dnf.conf.5* |
245 | %{_mandir}/man5/dnf-transaction-json.5* | |
246 | %{_mandir}/man7/dnf.modularity.7* | |
feb41732 | 247 | %{_mandir}/man8/dnf.8* |
1abae8cd | 248 | %{_mandir}/man8/yum2dnf.8* |
feb41732 ER |
249 | %{systemdunitdir}/dnf-makecache.service |
250 | %{systemdunitdir}/dnf-makecache.timer | |
1abae8cd JR |
251 | %{systemdtmpfilesdir}/dnf.conf |
252 | %{py3_sitescriptdir}/dnf | |
001a72bb | 253 | %{py3_sitescriptdir}/dnf-%{version}.dist-info |
748413d4 | 254 | %{py3_sitescriptdir}/dnf-plugins |
1abae8cd | 255 | %exclude %{py3_sitescriptdir}/dnf/automatic |
747eb767 | 256 | %dir %{_var}/cache/dnf |
feb41732 | 257 | %ghost %{_localstatedir}/log/%{name}.log |
70e5df64 ER |
258 | |
259 | %files automatic | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{_bindir}/dnf-automatic | |
262 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf | |
1abae8cd JR |
263 | %{_mandir}/man8/dnf-automatic.8* |
264 | %{systemdunitdir}/dnf-automatic-download.service | |
265 | %{systemdunitdir}/dnf-automatic-download.timer | |
266 | %{systemdunitdir}/dnf-automatic-install.service | |
267 | %{systemdunitdir}/dnf-automatic-install.timer | |
268 | %{systemdunitdir}/dnf-automatic-notifyonly.service | |
269 | %{systemdunitdir}/dnf-automatic-notifyonly.timer | |
70e5df64 ER |
270 | %{systemdunitdir}/dnf-automatic.service |
271 | %{systemdunitdir}/dnf-automatic.timer | |
1abae8cd | 272 | %{py3_sitescriptdir}/dnf/automatic |
a1a5f7dd JB |
273 | |
274 | %files -n bash-completion-dnf | |
275 | %defattr(644,root,root,755) | |
5aa69e21 | 276 | %{bash_compdir}/dnf |
a1a5f7dd | 277 | |
1abae8cd | 278 | %files -n yum |
a1a5f7dd | 279 | %defattr(644,root,root,755) |
1abae8cd JR |
280 | %attr(755,root,root) %{_bindir}/yum |
281 | %{_sysconfdir}/yum.conf | |
3524bf68 | 282 | %dir %{_sysconfdir}/yum |
1abae8cd JR |
283 | %{_sysconfdir}/yum/pluginconf.d |
284 | %{_sysconfdir}/yum/protected.d | |
85a72ee1 | 285 | %{_sysconfdir}/yum/repos.d |
1abae8cd | 286 | %{_sysconfdir}/yum/vars |
e2633179 | 287 | %{_mandir}/man1/yum-aliases.1* |
1abae8cd | 288 | %{_mandir}/man5/yum.conf.5.* |
e2633179 | 289 | %{_mandir}/man8/yum.8* |
1abae8cd | 290 | %{_mandir}/man8/yum-shell.8* |
1abae8cd | 291 | %config(noreplace) %{_sysconfdir}/%{name}/protected.d/yum.conf |