]>
Commit | Line | Data |
---|---|---|
f637201a ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | # | |
1abae8cd JR |
5 | %define hawkey_ver 0.59.0 |
6 | %define libcomps_ver 0.1.8 | |
7 | %define libmodulemd_ver 2.9.3 | |
8 | %define rpm_ver 4.14.0 | |
9 | ||
10 | Summary: Package manager | |
11 | Summary(pl.UTF-8): Zarządca pakietów | |
feb41732 | 12 | Name: dnf |
1abae8cd JR |
13 | Version: 4.6.1 |
14 | Release: 0.1 | |
feb41732 | 15 | Group: Base |
a1a5f7dd JB |
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) | |
1abae8cd JR |
18 | Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz |
19 | # Source0-md5: 21880d44905d6aa67ab6bee1e86380b3 | |
20 | Patch0: install.patch | |
70e5df64 | 21 | URL: https://github.com/rpm-software-management/dnf |
1abae8cd | 22 | BuildRequires: bash-completion |
a1a5f7dd | 23 | BuildRequires: cmake >= 2.4 |
cebdb6a6 | 24 | BuildRequires: gettext-tools |
1abae8cd JR |
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} | |
33 | # XXX: missing in PLD | |
34 | # BuildRequires: libmodulemd >= %{libmodulemd_ver} | |
feb41732 | 35 | BuildRequires: rpmbuild(macros) >= 1.647 |
1abae8cd | 36 | BuildRequires: rpm-pythonprov |
feb41732 ER |
37 | BuildRequires: sed >= 4.0 |
38 | BuildRequires: sphinx-pdg | |
39 | BuildRequires: systemd-devel | |
40 | Requires(post,preun,postun): systemd-units >= 38 | |
1abae8cd JR |
41 | Requires: python3-gpg |
42 | Requires: python3-hawkey >= %{hawkey_ver} | |
43 | Requires: python3-libcomps >= %{libcomps_ver} | |
44 | Requires: python3-libdnf >= %{hawkey_ver} | |
45 | Requires: python3-rpm | |
feb41732 | 46 | Requires: systemd-units >= 0.38 |
1abae8cd JR |
47 | # XXX: missing in PLD |
48 | # Requires: libmodulemd >= %{libmodulemd_ver} | |
49 | Recommends: deltarpm | |
50 | Recommends: python3-dbus | |
51 | Recommends: python3-unbound | |
52 | Recommends: rpm-plugin-systemd-inhibit | |
feb41732 ER |
53 | BuildArch: noarch |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
55 | ||
56 | %description | |
1abae8cd JR |
57 | Utility that allows users to manage packages on their systems. It |
58 | supports RPMs, modules and comps groups & environments. | |
feb41732 | 59 | |
d3326039 | 60 | %description -l pl.UTF-8 |
1abae8cd JR |
61 | Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie. |
62 | ||
63 | %package common | |
64 | Summary: Common data and configuration files for DNF | |
65 | Requires: libreport-filesystem | |
66 | ||
67 | %description common | |
68 | Common data and configuration files for DNF. | |
d3326039 | 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} |
70e5df64 ER |
78 | |
79 | %description automatic | |
80 | Alternative CLI to "dnf upgrade" suitable for automatic, regular | |
81 | execution. | |
82 | ||
d3326039 JB |
83 | %description automatic -l pl.UTF-8 |
84 | Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do | |
85 | automatycznego, regularnego wywoływania. | |
86 | ||
a1a5f7dd JB |
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 | |
93 | ||
94 | %description -n bash-completion-dnf | |
95 | Bash completion for dnf command. | |
96 | ||
97 | %description -n bash-completion-dnf -l pl.UTF-8 | |
98 | Bashowe uzupełnianie parametrów dla polecenia dnf. | |
99 | ||
1abae8cd JR |
100 | %package -n yum |
101 | Summary: Package manager | |
102 | Summary(pl.UTF-8): Zarządca pakietów | |
a1a5f7dd | 103 | Requires: %{name} = %{version}-%{release} |
1abae8cd JR |
104 | Recommends: sqlite3 |
105 | Conflicts: yum < 3.4.3-505 | |
a1a5f7dd | 106 | |
1abae8cd JR |
107 | %description -n yum |
108 | Utility that allows users to manage packages on their systems. It | |
109 | supports RPMs, modules and comps groups & environments. | |
a1a5f7dd | 110 | |
1abae8cd JR |
111 | %description -n yum -l pl.UTF-8 |
112 | Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie. | |
a1a5f7dd | 113 | |
feb41732 | 114 | %prep |
1abae8cd | 115 | %setup -q |
38fbb761 | 116 | %patch0 -p1 |
feb41732 | 117 | |
feb41732 | 118 | %build |
1abae8cd JR |
119 | install -d build |
120 | cd build | |
a1a5f7dd | 121 | %cmake .. \ |
1abae8cd JR |
122 | -DPYTHON_DESIRED:FILEPATH=%{__python3} \ |
123 | -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir} \ | |
124 | -DDNF_VERSION=%{version} \ | |
a1a5f7dd | 125 | -DSYSTEMD_DIR=%{systemdunitdir} |
feb41732 ER |
126 | |
127 | %{__make} | |
128 | %{__make} doc-man | |
129 | ||
feb41732 ER |
130 | %install |
131 | rm -rf $RPM_BUILD_ROOT | |
1abae8cd JR |
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/ | |
a1a5f7dd | 135 | |
1abae8cd | 136 | %{__make} -C build install \ |
feb41732 ER |
137 | DESTDIR=$RPM_BUILD_ROOT |
138 | ||
1abae8cd | 139 | touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log |
feb41732 | 140 | |
1abae8cd JR |
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 | |
feb41732 | 143 | |
1abae8cd | 144 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{%{name}-strict.conf,aliases.d/zypper.conf} |
a1a5f7dd | 145 | |
1abae8cd JR |
146 | # YUM compat layer |
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 | |
a1a5f7dd | 152 | |
1abae8cd | 153 | %find_lang %{name} |
feb41732 ER |
154 | |
155 | %clean | |
156 | rm -rf $RPM_BUILD_ROOT | |
157 | ||
158 | %post | |
159 | %systemd_post dnf-makecache.timer | |
160 | ||
161 | %preun | |
162 | %systemd_preun dnf-makecache.timer | |
163 | ||
164 | %postun | |
165 | %systemd_reload | |
166 | ||
70e5df64 | 167 | %post automatic |
1abae8cd | 168 | %systemd_post dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer |
70e5df64 ER |
169 | |
170 | %preun automatic | |
1abae8cd | 171 | %systemd_preun dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer |
70e5df64 ER |
172 | |
173 | %postun automatic | |
174 | %systemd_reload | |
175 | ||
feb41732 ER |
176 | %files -f %{name}.lang |
177 | %defattr(644,root,root,755) | |
a1a5f7dd | 178 | %doc AUTHORS PACKAGE-LICENSING README.rst |
feb41732 ER |
179 | %attr(755,root,root) %{_bindir}/dnf |
180 | %dir %{_sysconfdir}/%{name} | |
70e5df64 ER |
181 | %dir %{_sysconfdir}/%{name}/plugins |
182 | %dir %{_sysconfdir}/%{name}/protected.d | |
feb41732 | 183 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf |
70e5df64 | 184 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf |
feb41732 ER |
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} | |
1abae8cd JR |
187 | %{_mandir}/man5/dnf.conf.5* |
188 | %{_mandir}/man5/dnf-transaction-json.5* | |
189 | %{_mandir}/man7/dnf.modularity.7* | |
feb41732 | 190 | %{_mandir}/man8/dnf.8* |
1abae8cd | 191 | %{_mandir}/man8/yum2dnf.8* |
feb41732 ER |
192 | %{systemdunitdir}/dnf-makecache.service |
193 | %{systemdunitdir}/dnf-makecache.timer | |
1abae8cd JR |
194 | %{systemdtmpfilesdir}/dnf.conf |
195 | %{py3_sitescriptdir}/dnf | |
196 | %exclude %{py3_sitescriptdir}/dnf/automatic | |
feb41732 ER |
197 | |
198 | %ghost %{_localstatedir}/log/%{name}.log | |
70e5df64 ER |
199 | |
200 | %files automatic | |
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 | |
1abae8cd JR |
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 | |
70e5df64 ER |
211 | %{systemdunitdir}/dnf-automatic.service |
212 | %{systemdunitdir}/dnf-automatic.timer | |
1abae8cd | 213 | %{py3_sitescriptdir}/dnf/automatic |
a1a5f7dd JB |
214 | |
215 | %files -n bash-completion-dnf | |
216 | %defattr(644,root,root,755) | |
1abae8cd | 217 | /etc/bash_completion.d/dnf |
a1a5f7dd | 218 | |
1abae8cd | 219 | %files -n yum |
a1a5f7dd | 220 | %defattr(644,root,root,755) |
1abae8cd JR |
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 |