3 %bcond_without tests # build without tests
5 %define hawkey_ver 0.59.0
6 %define libcomps_ver 0.1.8
7 %define libmodulemd_ver 2.9.3
10 Summary: Package manager
11 Summary(pl.UTF-8): Zarządca pakietów
16 # GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING
17 License: GPL v2 (parts on GPL v2+ or GPL)
18 Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5: 21880d44905d6aa67ab6bee1e86380b3
21 URL: https://github.com/rpm-software-management/dnf
22 BuildRequires: bash-completion
23 BuildRequires: cmake >= 2.4
24 BuildRequires: gettext-tools
25 BuildRequires: python3
26 BuildRequires: python3-gpg
27 BuildRequires: python3-hawkey >= %{hawkey_ver}
28 BuildRequires: python3-libcomps >= %{libcomps_ver}
29 BuildRequires: python3-libdnf >= %{hawkey_ver}
30 BuildRequires: python3-modules
31 BuildRequires: python3-nose
32 BuildRequires: python3-rpm >= %{rpm_ver}
34 # BuildRequires: libmodulemd >= %{libmodulemd_ver}
35 BuildRequires: rpmbuild(macros) >= 1.647
36 BuildRequires: rpm-pythonprov
37 BuildRequires: sed >= 4.0
38 BuildRequires: sphinx-pdg
39 BuildRequires: systemd-devel
40 Requires(post,preun,postun): systemd-units >= 38
42 Requires: python3-hawkey >= %{hawkey_ver}
43 Requires: python3-libcomps >= %{libcomps_ver}
44 Requires: python3-libdnf >= %{hawkey_ver}
46 Requires: systemd-units >= 0.38
48 # Requires: libmodulemd >= %{libmodulemd_ver}
50 Recommends: python3-dbus
51 Recommends: python3-unbound
52 Recommends: rpm-plugin-systemd-inhibit
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 Utility that allows users to manage packages on their systems. It
58 supports RPMs, modules and comps groups & environments.
60 %description -l pl.UTF-8
61 Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie.
64 Summary: Common data and configuration files for DNF
65 Requires: libreport-filesystem
68 Common data and configuration files for DNF.
71 Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
72 Summary(pl.UTF-8): Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania
74 Requires(post): systemd
75 Requires(preun): systemd
76 Requires(postun): systemd
77 Requires: %{name} = %{version}-%{release}
79 %description automatic
80 Alternative CLI to "dnf upgrade" suitable for automatic, regular
83 %description automatic -l pl.UTF-8
84 Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do
85 automatycznego, regularnego wywoływania.
87 %package -n bash-completion-dnf
88 Summary: Bash completion for dnf command
89 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia dnf
90 Group: Applications/Shells
91 Requires: %{name} = %{version}-%{release}
92 Requires: bash-completion
94 %description -n bash-completion-dnf
95 Bash completion for dnf command.
97 %description -n bash-completion-dnf -l pl.UTF-8
98 Bashowe uzupełnianie parametrów dla polecenia dnf.
101 Summary: Package manager
102 Summary(pl.UTF-8): Zarządca pakietów
103 Requires: %{name} = %{version}-%{release}
105 Conflicts: yum < 3.4.3-505
108 Utility that allows users to manage packages on their systems. It
109 supports RPMs, modules and comps groups & environments.
111 %description -n yum -l pl.UTF-8
112 Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie.
122 -DPYTHON_DESIRED:FILEPATH=%{__python3} \
123 -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir} \
124 -DDNF_VERSION=%{version} \
125 -DSYSTEMD_DIR=%{systemdunitdir}
131 rm -rf $RPM_BUILD_ROOT
132 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/{vars,aliases.d,plugins,modules.d,modules.defaults.d},yum}
133 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/
134 install -d $RPM_BUILD_ROOT%{_var}/cache/dnf/
136 %{__make} -C build install \
137 DESTDIR=$RPM_BUILD_ROOT
139 touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log
141 %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-3 $RPM_BUILD_ROOT%{_bindir}/dnf
142 %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-automatic-3 $RPM_BUILD_ROOT%{_bindir}/dnf-automatic
144 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{%{name}-strict.conf,aliases.d/zypper.conf}
147 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/%{name}.conf,yum.conf}
148 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/plugins,yum/pluginconf.d}
149 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/protected.d,yum/protected.d}
150 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/vars,yum/vars}
151 ln -s dnf-3 $RPM_BUILD_ROOT%{_bindir}/yum
156 rm -rf $RPM_BUILD_ROOT
159 %systemd_post dnf-makecache.timer
162 %systemd_preun dnf-makecache.timer
168 %systemd_post dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer
171 %systemd_preun dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer
176 %files -f %{name}.lang
177 %defattr(644,root,root,755)
178 %doc AUTHORS PACKAGE-LICENSING README.rst
179 %attr(755,root,root) %{_bindir}/dnf
180 %dir %{_sysconfdir}/%{name}
181 %dir %{_sysconfdir}/%{name}/plugins
182 %dir %{_sysconfdir}/%{name}/protected.d
183 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
184 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
185 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
186 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
187 %{_mandir}/man5/dnf.conf.5*
188 %{_mandir}/man5/dnf-transaction-json.5*
189 %{_mandir}/man7/dnf.modularity.7*
190 %{_mandir}/man8/dnf.8*
191 %{_mandir}/man8/yum2dnf.8*
192 %{systemdunitdir}/dnf-makecache.service
193 %{systemdunitdir}/dnf-makecache.timer
194 %{systemdtmpfilesdir}/dnf.conf
195 %{py3_sitescriptdir}/dnf
196 %exclude %{py3_sitescriptdir}/dnf/automatic
198 %ghost %{_localstatedir}/log/%{name}.log
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_bindir}/dnf-automatic
203 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
204 %{_mandir}/man8/dnf-automatic.8*
205 %{systemdunitdir}/dnf-automatic-download.service
206 %{systemdunitdir}/dnf-automatic-download.timer
207 %{systemdunitdir}/dnf-automatic-install.service
208 %{systemdunitdir}/dnf-automatic-install.timer
209 %{systemdunitdir}/dnf-automatic-notifyonly.service
210 %{systemdunitdir}/dnf-automatic-notifyonly.timer
211 %{systemdunitdir}/dnf-automatic.service
212 %{systemdunitdir}/dnf-automatic.timer
213 %{py3_sitescriptdir}/dnf/automatic
215 %files -n bash-completion-dnf
216 %defattr(644,root,root,755)
217 /etc/bash_completion.d/dnf
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_bindir}/yum
222 %{_sysconfdir}/yum.conf
223 %{_sysconfdir}/yum/pluginconf.d
224 %{_sysconfdir}/yum/protected.d
225 %{_sysconfdir}/yum/vars
226 %{_mandir}/man8/yum.8*
227 %{_mandir}/man5/yum.conf.5.*
228 %{_mandir}/man8/yum-shell.8*
229 %{_mandir}/man1/yum-aliases.1*
230 %config(noreplace) %{_sysconfdir}/%{name}/protected.d/yum.conf