]> git.pld-linux.org Git - packages/dnf-plugins-core.git/blame - dnf-plugins-core.spec
BR: gettext-tools
[packages/dnf-plugins-core.git] / dnf-plugins-core.spec
CommitLineData
39fa4e4b
JR
1#
2# Conditional build:
3%bcond_without yum_compatibility # Add yum plugins provides
4%bcond_without yum_utils # Build yum-utils replacement package dnf-utils
5#
6Summary: Core Plugins for DNF
7Name: dnf-plugins-core
38832d58
JP
8Version: 4.4.2
9Release: 1
39fa4e4b
JR
10License: GPL v2+
11Source0: https://github.com/rpm-software-management/dnf-plugins-core/archive/%{version}/%{name}-%{version}.tar.gz
38832d58 12# Source0-md5: afd6975140ff877f0e7a4da088fa4e2e
39fa4e4b
JR
13Patch0: install.patch
14Patch1: migrate3.patch
15URL: https://github.com/rpm-software-management/dnf-plugins-core
7194249c 16BuildRequires: cmake >= 2.4
3cba08d0 17BuildRequires: dnf >= 4.11.0
eafc1e3b 18BuildRequires: gettext-tools
38832d58 19BuildRequires: pkgconfig
39fa4e4b
JR
20BuildRequires: python3-dbus
21BuildRequires: python3-devel
a38cf33b 22BuildRequires: python3-modules
39fa4e4b 23BuildRequires: python3-nose
d0d08e98 24BuildRequires: rpmbuild(macros) >= 1.605
39fa4e4b 25BuildRequires: sphinx-pdg
38832d58 26BuildRequires: systemd-devel
3cba08d0 27Requires: dnf >= 4.11.0
39fa4e4b
JR
28Requires: python3-dateutil
29Requires: python3-dbus
30Requires: python3-hawkey >= 0.46.1
31%if %{with yum_compatibility}
32Provides: yum-plugin-auto-update-debug-info = %{version}-%{release}
33Provides: yum-plugin-changelog = %{version}-%{release}
34Provides: yum-plugin-copr = %{version}-%{release}
35%endif
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40Core Plugins for DNF. This package enhances DNF with builddep,
41config-manager, copr, debug, debuginfo-install, download,
42needs-restarting, groups-manager, repoclosure, repograph, repomanage,
43reposync, changelog and repodiff commands. Additionally provides
44generate_completion_cache passive plugin.
45
46%package -n dnf-utils
47Summary: Yum-utils CLI compatibility layer
48Requires: %{name} = %{version}-%{release}
49Provides: yum-utils = %{version}-%{release}
50
51%description -n dnf-utils
52As a Yum-utils CLI compatibility layer, supplies in CLI shims for
53debuginfo-install, repograph, package-cleanup, repoclosure,
54repomanage, repoquery, reposync, repotrack, repodiff, builddep,
55config-manager, debug, download and yum-groups-manager that use new
56implementations using DNF.
57
58%package -n dnf-plugin-leaves
59Summary: Leaves Plugin for DNF
60Requires: %{name} = %{version}-%{release}
61
62%description -n dnf-plugin-leaves
63Leaves Plugin for DNF. List all installed packages not required by any
64other installed package.
65
66%package -n dnf-plugin-local
67Summary: Local Plugin for DNF
68Requires: %{name} = %{version}-%{release}
69Requires: createrepo_c
70
71%description -n dnf-plugin-local
72Local Plugin for DNF. Automatically copy all downloaded packages to a
73repository on the local filesystem and generating repo metadata.
74
75%package -n dnf-plugin-migrate
76Summary: Migrate Plugin for DNF
77Requires: %{name} = %{version}-%{release}
78Requires: yum
79
80%description -n dnf-plugin-migrate
81Migrate Plugin for DNF. Migrates history, group and yumdb data from
82yum to dnf.
83
3cba08d0
JR
84%package -n dnf-plugin-modulesync
85Summary: Download module metadata and packages and create repository
86Requires: createrepo_c >= 0.17.4
e3772fb7 87Requires: %{name} = %{version}-%{release}
3cba08d0 88Provides: dnf-command(modulesync)
3cba08d0
JR
89
90%description -n dnf-plugin-modulesync
91Download module metadata from all enabled repositories, module
92artifacts and profiles of matching modules and create repository.
93
39fa4e4b
JR
94%package -n dnf-plugin-post-transaction-actions
95Summary: Post transaction actions Plugin for DNF
96Requires: %{name} = %{version}-%{release}
97
98%description -n dnf-plugin-post-transaction-actions
99Post transaction actions Plugin for DNF. Plugin runs actions (shell
100commands) after transaction is completed. Actions are defined in
101action files.
102
103%package -n dnf-plugin-show-leaves
104Summary: Show-leaves Plugin for DNF
105Requires: %{name} = %{version}-%{release}
106Requires: dnf-plugin-leaves = %{version}-%{release}
107
108%description -n dnf-plugin-show-leaves
109Show-leaves Plugin for DNF. List all installed packages that are no
110longer required by any other installed package after a transaction.
111
38832d58
JP
112%package -n dnf-plugin-system-upgrade
113Summary: System Upgrade Plugin for DNF
114Requires: %{name} = %{version}-%{release}
115
116%description -n dnf-plugin-system-upgrade
117System Upgrade Plugin for DNF.
118
39fa4e4b
JR
119%package -n dnf-plugin-versionlock
120Summary: Version Lock Plugin for DNF
121Requires: %{name} = %{version}-%{release}
122%if %{with yum_compatibility}
123Provides: yum-plugin-versionlock = %{version}-%{release}
124%endif
125
126%description -n dnf-plugin-versionlock
127Version lock plugin takes a set of name/versions for packages and
128excludes all other versions of those packages. This allows you to e.g.
129protect packages from being updated by newer versions.
130
131%prep
132%setup -q
133%patch0 -p1
134%patch1 -p1
135
136mkdir build
137
38832d58
JP
138%{__sed} -i -e s/dnf-3/dnf/ etc/systemd/dnf-system-upgrade.service
139
39fa4e4b
JR
140%build
141cd build
142%cmake ../ \
143 -DPYTHON_DESIRED:FILEPATH=%{__python3} \
144 -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir}
145
146%{__make}
147%{__make} doc-man
148
149%install
150rm -rf $RPM_BUILD_ROOT
151install -d $RPM_BUILD_ROOT%{_var}/cache/dnf
152
153%{__make} -C build install \
154 DESTDIR=$RPM_BUILD_ROOT
155
156:> $RPM_BUILD_ROOT%{_var}/cache/dnf/packages.db
157
158%if %{with yum_utils}
159install -d $RPM_BUILD_ROOT%{_bindir}
160for p in debuginfo-install needs-restarting find-repos-of-install repo-graph \
161 package-cleanup repoclosure repodiff repomanage repoquery \
162 reposync repotrack yum-builddep yum-config-manager yum-debug-dump \
163 yum-debug-restore yum-groups-manager yumdownloader; do
164 ln -sr $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils $RPM_BUILD_ROOT%{_bindir}/$p
165done
166# These commands don't have a dedicated man page, so let's just point them
167# to the utils page which contains their descriptions.
168for m in find-repos-of-install.1 repoquery.1 repotrack.1; do
169 echo ".so dnf-utils.1" > $RPM_BUILD_ROOT%{_mandir}/man1/$m
170done
171%{__mv} $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils-3 $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils
172
173%else
174
175for m in debuginfo-install needs-restarting repo-graph repoclosure repodiff \
176 repomanage reposync yum-builddep yum-config-manager \
177 yum-debug-dump yum-debug-restore yum-groups-manager \
178 yumdownloader package-cleanup dnf-utils yum-utils; do
179 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/${m}.1*
180done
181%{__rm} $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils-*
182%endif
183
184%if %{without yum_compatibility}
185%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/yum-changelog.1*
186%{__rm} $RPM_BUILD_ROOT%{_mandir}/man5/yum-versionlock.5*
187%{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/{yum-copr.8*,yum-versionlock.8*}
188%endif
189
190for d in $RPM_BUILD_ROOT%{py3_sitescriptdir}/{dnf-plugins,dnfpluginsextras}; do
191%py3_comp $d
192%py3_ocomp $d
193done
194
195%find_lang %{name}
196
197%clean
198rm -rf $RPM_BUILD_ROOT
199
200%files -f %{name}.lang
201%defattr(644,root,root,755)
202%doc AUTHORS README.rst
203%config(noreplace) %{_sysconfdir}/dnf/plugins/copr.conf
204%config(noreplace) %{_sysconfdir}/dnf/plugins/copr.d
205%config(noreplace) %{_sysconfdir}/dnf/plugins/debuginfo-install.conf
206%{py3_sitescriptdir}/dnf-plugins/builddep.py
207%{py3_sitescriptdir}/dnf-plugins/changelog.py
208%{py3_sitescriptdir}/dnf-plugins/config_manager.py
209%{py3_sitescriptdir}/dnf-plugins/copr.py
210%{py3_sitescriptdir}/dnf-plugins/debug.py
211%{py3_sitescriptdir}/dnf-plugins/debuginfo-install.py
212%{py3_sitescriptdir}/dnf-plugins/download.py
213%{py3_sitescriptdir}/dnf-plugins/generate_completion_cache.py
214%{py3_sitescriptdir}/dnf-plugins/groups_manager.py
215%{py3_sitescriptdir}/dnf-plugins/needs_restarting.py
216%{py3_sitescriptdir}/dnf-plugins/repoclosure.py
217%{py3_sitescriptdir}/dnf-plugins/repodiff.py
218%{py3_sitescriptdir}/dnf-plugins/repograph.py
219%{py3_sitescriptdir}/dnf-plugins/repomanage.py
220%{py3_sitescriptdir}/dnf-plugins/reposync.py
221%{py3_sitescriptdir}/dnf-plugins/__pycache__/builddep.*
222%{py3_sitescriptdir}/dnf-plugins/__pycache__/changelog.*
223%{py3_sitescriptdir}/dnf-plugins/__pycache__/config_manager.*
224%{py3_sitescriptdir}/dnf-plugins/__pycache__/copr.*
225%{py3_sitescriptdir}/dnf-plugins/__pycache__/debug.*
226%{py3_sitescriptdir}/dnf-plugins/__pycache__/debuginfo-install.*
227%{py3_sitescriptdir}/dnf-plugins/__pycache__/download.*
228%{py3_sitescriptdir}/dnf-plugins/__pycache__/generate_completion_cache.*
229%{py3_sitescriptdir}/dnf-plugins/__pycache__/groups_manager.*
230%{py3_sitescriptdir}/dnf-plugins/__pycache__/needs_restarting.*
231%{py3_sitescriptdir}/dnf-plugins/__pycache__/repoclosure.*
232%{py3_sitescriptdir}/dnf-plugins/__pycache__/repodiff.*
233%{py3_sitescriptdir}/dnf-plugins/__pycache__/repograph.*
234%{py3_sitescriptdir}/dnf-plugins/__pycache__/repomanage.*
235%{py3_sitescriptdir}/dnf-plugins/__pycache__/reposync.*
236%{py3_sitescriptdir}/dnfpluginscore/
237%{_mandir}/man8/dnf-builddep.8*
238%{_mandir}/man8/dnf-changelog.8*
239%{_mandir}/man8/dnf-config-manager.8*
240%{_mandir}/man8/dnf-copr.8*
241%{_mandir}/man8/dnf-debug.8*
242%{_mandir}/man8/dnf-debuginfo-install.8*
243%{_mandir}/man8/dnf-download.8*
244%{_mandir}/man8/dnf-generate_completion_cache.8*
245%{_mandir}/man8/dnf-groups-manager.8*
246%{_mandir}/man8/dnf-needs-restarting.8*
247%{_mandir}/man8/dnf-repoclosure.8*
248%{_mandir}/man8/dnf-repodiff.8*
249%{_mandir}/man8/dnf-repograph.8*
250%{_mandir}/man8/dnf-repomanage.8*
251%{_mandir}/man8/dnf-reposync.8*
252%if %{with yum_compatibility}
253%{_mandir}/man1/yum-changelog.1*
254%{_mandir}/man8/yum-copr.8*
255%endif
256%ghost %{_var}/cache/dnf/packages.db
257
258%if %{with yum_utils}
259%files -n dnf-utils
260%defattr(644,root,root,755)
261%attr(755,root,root) %{_bindir}/debuginfo-install
262%attr(755,root,root) %{_bindir}/needs-restarting
263%attr(755,root,root) %{_bindir}/find-repos-of-install
264%attr(755,root,root) %{_bindir}/package-cleanup
265%attr(755,root,root) %{_bindir}/repo-graph
266%attr(755,root,root) %{_bindir}/repoclosure
267%attr(755,root,root) %{_bindir}/repodiff
268%attr(755,root,root) %{_bindir}/repomanage
269%attr(755,root,root) %{_bindir}/repoquery
270%attr(755,root,root) %{_bindir}/reposync
271%attr(755,root,root) %{_bindir}/repotrack
272%attr(755,root,root) %{_bindir}/yum-builddep
273%attr(755,root,root) %{_bindir}/yum-config-manager
274%attr(755,root,root) %{_bindir}/yum-debug-dump
275%attr(755,root,root) %{_bindir}/yum-debug-restore
276%attr(755,root,root) %{_bindir}/yum-groups-manager
277%attr(755,root,root) %{_bindir}/yumdownloader
278%attr(755,root,root) %{_libexecdir}/dnf-utils
279%{_mandir}/man1/debuginfo-install.1*
280%{_mandir}/man1/needs-restarting.1*
281%{_mandir}/man1/repo-graph.1*
282%{_mandir}/man1/repoclosure.1*
283%{_mandir}/man1/repodiff.1*
284%{_mandir}/man1/repomanage.1*
285%{_mandir}/man1/reposync.1*
286%{_mandir}/man1/yum-builddep.1*
287%{_mandir}/man1/yum-config-manager.1*
288%{_mandir}/man1/yum-debug-dump.1*
289%{_mandir}/man1/yum-debug-restore.1*
290%{_mandir}/man1/yum-groups-manager.1*
291%{_mandir}/man1/yumdownloader.1*
292%{_mandir}/man1/package-cleanup.1*
293%{_mandir}/man1/dnf-utils.1*
294%{_mandir}/man1/yum-utils.1*
295%{_mandir}/man1/find-repos-of-install.1*
296%{_mandir}/man1/repoquery.1*
297%{_mandir}/man1/repotrack.1*
298%endif
299
300%files -n dnf-plugin-leaves
301%defattr(644,root,root,755)
302%{py3_sitescriptdir}/dnf-plugins/leaves.*
303%{py3_sitescriptdir}/dnf-plugins/__pycache__/leaves.*
304%{_mandir}/man8/dnf-leaves.8*
305
306%files -n dnf-plugin-local
307%defattr(644,root,root,755)
308%config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf
309%{py3_sitescriptdir}/dnf-plugins/local.*
310%{py3_sitescriptdir}/dnf-plugins/__pycache__/local.*
311%{_mandir}/man8/dnf-local.8*
312
313%files -n dnf-plugin-migrate
314%defattr(644,root,root,755)
315%{py3_sitescriptdir}/dnf-plugins/migrate.*
316%{py3_sitescriptdir}/dnf-plugins/__pycache__/migrate.*
317%{_mandir}/man8/dnf-migrate.8*
318
3cba08d0
JR
319%files -n dnf-plugin-modulesync
320%defattr(644,root,root,755)
321%{py3_sitescriptdir}/dnf-plugins/modulesync.*
322%{py3_sitescriptdir}/dnf-plugins/__pycache__/modulesync.*
323%{_mandir}/man8/dnf-modulesync.8*
324
39fa4e4b
JR
325%files -n dnf-plugin-post-transaction-actions
326%defattr(644,root,root,755)
327%config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.conf
328%config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.d
329%{py3_sitescriptdir}/dnf-plugins/post-transaction-actions.*
330%{py3_sitescriptdir}/dnf-plugins/__pycache__/post-transaction-actions.*
331%{_mandir}/man8/dnf-post-transaction-actions.8*
332
333%files -n dnf-plugin-show-leaves
334%defattr(644,root,root,755)
335%{py3_sitescriptdir}/dnf-plugins/show_leaves.*
336%{py3_sitescriptdir}/dnf-plugins/__pycache__/show_leaves.*
337%{_mandir}/man8/dnf-show-leaves.8*
338
38832d58
JP
339%files -n dnf-plugin-system-upgrade
340%defattr(644,root,root,755)
341%{py3_sitescriptdir}/dnf-plugins/system_upgrade.*
342%{py3_sitescriptdir}/dnf-plugins/__pycache__/system_upgrade.*
343%{systemdunitdir}/dnf-system-upgrade-cleanup.service
344%{systemdunitdir}/dnf-system-upgrade.service
345%{_mandir}/man8/dnf-system-upgrade.8*
346
39fa4e4b
JR
347%files -n dnf-plugin-versionlock
348%defattr(644,root,root,755)
349%config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.conf
350%config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.list
351%{py3_sitescriptdir}/dnf-plugins/versionlock.*
352%{py3_sitescriptdir}/dnf-plugins/__pycache__/versionlock.*
353%{_mandir}/man8/dnf-versionlock.8*
354%if %{with yum_compatibility}
355%{_mandir}/man5/yum-versionlock.conf.5*
356%{_mandir}/man8/yum-versionlock.8*
357%endif
This page took 0.360193 seconds and 4 git commands to generate.