]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | # | |
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 | |
12 | Name: dnf | |
13 | Version: 4.6.1 | |
14 | Release: 5 | |
15 | Group: Base | |
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 | |
20 | Patch0: install.patch | |
21 | URL: https://github.com/rpm-software-management/dnf | |
22 | BuildRequires: bash-completion-devel | |
23 | BuildRequires: cmake >= 2.4 | |
24 | BuildRequires: gettext-tools | |
25 | BuildRequires: libmodulemd >= %{libmodulemd_ver} | |
26 | BuildRequires: python3 | |
27 | BuildRequires: python3-gpg | |
28 | BuildRequires: python3-hawkey >= %{hawkey_ver} | |
29 | BuildRequires: python3-libcomps >= %{libcomps_ver} | |
30 | BuildRequires: python3-libdnf >= %{hawkey_ver} | |
31 | BuildRequires: python3-modules | |
32 | BuildRequires: python3-nose | |
33 | BuildRequires: python3-rpm >= %{rpm_ver} | |
34 | BuildRequires: rpmbuild(macros) >= 1.647 | |
35 | BuildRequires: rpm-pythonprov | |
36 | BuildRequires: sed >= 4.0 | |
37 | BuildRequires: sphinx-pdg | |
38 | BuildRequires: systemd-devel | |
39 | Requires(post,preun,postun): systemd-units >= 38 | |
40 | Requires: libmodulemd >= %{libmodulemd_ver} | |
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 | |
46 | Requires: systemd-units >= 0.38 | |
47 | Recommends: deltarpm | |
48 | Recommends: python3-dbus | |
49 | Recommends: python3-unbound | |
50 | Recommends: rpm-plugin-systemd-inhibit | |
51 | BuildArch: noarch | |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
53 | ||
54 | %description | |
55 | Utility that allows users to manage packages on their systems. It | |
56 | supports RPMs, modules and comps groups & environments. | |
57 | ||
58 | %description -l pl.UTF-8 | |
59 | Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie. | |
60 | ||
61 | %package common | |
62 | Summary: Common data and configuration files for DNF | |
63 | Summary(pl.UTF-8): Wspólne dane i pliki konfiguracyjne dla DNF-a | |
64 | Group: Base | |
65 | Requires: libreport-filesystem | |
66 | ||
67 | %description common | |
68 | Common data and configuration files for DNF. | |
69 | ||
70 | %description common -l pl.UTF-8 | |
71 | Wspólne dane i pliki konfiguracyjne dla DNF-a. | |
72 | ||
73 | %package automatic | |
74 | Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution | |
75 | Summary(pl.UTF-8): Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania | |
76 | Group: Base | |
77 | Requires(post): systemd | |
78 | Requires(preun): systemd | |
79 | Requires(postun): systemd | |
80 | Requires: %{name} = %{version}-%{release} | |
81 | ||
82 | %description automatic | |
83 | Alternative CLI to "dnf upgrade" suitable for automatic, regular | |
84 | execution. | |
85 | ||
86 | %description automatic -l pl.UTF-8 | |
87 | Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do | |
88 | automatycznego, regularnego wywoływania. | |
89 | ||
90 | %package -n bash-completion-dnf | |
91 | Summary: Bash completion for dnf command | |
92 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia dnf | |
93 | Group: Applications/Shells | |
94 | Requires: %{name} = %{version}-%{release} | |
95 | Requires: bash-completion | |
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 | ||
103 | %package -n yum | |
104 | Summary: Yum compatibility layer for DNF | |
105 | Summary(pl.UTF-8): Warstwa zgodności z YUM-em dla DNF-a | |
106 | Group: Base | |
107 | Requires: %{name} = %{version}-%{release} | |
108 | Recommends: sqlite3 | |
109 | Conflicts: yum < 3.4.3-505 | |
110 | ||
111 | %description -n yum | |
112 | Yum compatibility layer for DNF. | |
113 | ||
114 | %description -n yum -l pl.UTF-8 | |
115 | Warstwa zgodności z YUM-em dla DNF-a. | |
116 | ||
117 | %prep | |
118 | %setup -q | |
119 | %patch0 -p1 | |
120 | ||
121 | %build | |
122 | install -d build | |
123 | cd build | |
124 | %cmake .. \ | |
125 | -DPYTHON_DESIRED:FILEPATH=%{__python3} \ | |
126 | -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir} \ | |
127 | -DDNF_VERSION=%{version} \ | |
128 | -DSYSTEMD_DIR=%{systemdunitdir} | |
129 | ||
130 | %{__make} | |
131 | %{__make} doc-man | |
132 | ||
133 | %install | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/{vars,aliases.d,plugins,modules.d,modules.defaults.d},yum} \ | |
136 | -d $RPM_BUILD_ROOT{%{_localstatedir}/log/,%{_var}/cache/dnf} \ | |
137 | -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf-plugins/__pycache__ | |
138 | ||
139 | %{__make} -C build install \ | |
140 | DESTDIR=$RPM_BUILD_ROOT | |
141 | ||
142 | touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log | |
143 | ||
144 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-3 $RPM_BUILD_ROOT%{_bindir}/dnf | |
145 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-automatic-3 $RPM_BUILD_ROOT%{_bindir}/dnf-automatic | |
146 | ||
147 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{%{name}-strict.conf,aliases.d/zypper.conf} | |
148 | ||
149 | # YUM compat layer | |
150 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/%{name}.conf,yum.conf} | |
151 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/plugins,yum/pluginconf.d} | |
152 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/protected.d,yum/protected.d} | |
153 | ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/vars,yum/vars} | |
154 | ln -s dnf $RPM_BUILD_ROOT%{_bindir}/yum | |
155 | ||
156 | %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf | |
157 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf | |
158 | ||
159 | %find_lang %{name} | |
160 | ||
161 | %clean | |
162 | rm -rf $RPM_BUILD_ROOT | |
163 | ||
164 | %post | |
165 | %systemd_post dnf-makecache.timer | |
166 | ||
167 | %preun | |
168 | %systemd_preun dnf-makecache.timer | |
169 | ||
170 | %postun | |
171 | %systemd_reload | |
172 | ||
173 | %post automatic | |
174 | %systemd_post dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer | |
175 | ||
176 | %preun automatic | |
177 | %systemd_preun dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer | |
178 | ||
179 | %postun automatic | |
180 | %systemd_reload | |
181 | ||
182 | %files -f %{name}.lang | |
183 | %defattr(644,root,root,755) | |
184 | %doc AUTHORS PACKAGE-LICENSING README.rst | |
185 | %attr(755,root,root) %{_bindir}/dnf | |
186 | %dir %{_sysconfdir}/%{name} | |
187 | %dir %{_sysconfdir}/%{name}/plugins | |
188 | %dir %{_sysconfdir}/%{name}/protected.d | |
189 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf | |
190 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf | |
191 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf | |
192 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} | |
193 | %{_mandir}/man5/dnf.conf.5* | |
194 | %{_mandir}/man5/dnf-transaction-json.5* | |
195 | %{_mandir}/man7/dnf.modularity.7* | |
196 | %{_mandir}/man8/dnf.8* | |
197 | %{_mandir}/man8/yum2dnf.8* | |
198 | %{systemdunitdir}/dnf-makecache.service | |
199 | %{systemdunitdir}/dnf-makecache.timer | |
200 | %{systemdtmpfilesdir}/dnf.conf | |
201 | %{py3_sitescriptdir}/dnf | |
202 | %{py3_sitescriptdir}/dnf-plugins | |
203 | %exclude %{py3_sitescriptdir}/dnf/automatic | |
204 | %dir %{_var}/cache/dnf | |
205 | %ghost %{_localstatedir}/log/%{name}.log | |
206 | ||
207 | %files automatic | |
208 | %defattr(644,root,root,755) | |
209 | %attr(755,root,root) %{_bindir}/dnf-automatic | |
210 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf | |
211 | %{_mandir}/man8/dnf-automatic.8* | |
212 | %{systemdunitdir}/dnf-automatic-download.service | |
213 | %{systemdunitdir}/dnf-automatic-download.timer | |
214 | %{systemdunitdir}/dnf-automatic-install.service | |
215 | %{systemdunitdir}/dnf-automatic-install.timer | |
216 | %{systemdunitdir}/dnf-automatic-notifyonly.service | |
217 | %{systemdunitdir}/dnf-automatic-notifyonly.timer | |
218 | %{systemdunitdir}/dnf-automatic.service | |
219 | %{systemdunitdir}/dnf-automatic.timer | |
220 | %{py3_sitescriptdir}/dnf/automatic | |
221 | ||
222 | %files -n bash-completion-dnf | |
223 | %defattr(644,root,root,755) | |
224 | %{bash_compdir}/dnf | |
225 | ||
226 | %files -n yum | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_bindir}/yum | |
229 | %{_sysconfdir}/yum.conf | |
230 | %dir %{_sysconfdir}/yum | |
231 | %{_sysconfdir}/yum/pluginconf.d | |
232 | %{_sysconfdir}/yum/protected.d | |
233 | %{_sysconfdir}/yum/vars | |
234 | %{_mandir}/man1/yum-aliases.1* | |
235 | %{_mandir}/man5/yum.conf.5.* | |
236 | %{_mandir}/man8/yum.8* | |
237 | %{_mandir}/man8/yum-shell.8* | |
238 | %config(noreplace) %{_sysconfdir}/%{name}/protected.d/yum.conf |