]> git.pld-linux.org Git - packages/dnf.git/blame - dnf.spec
up to 4.19.0
[packages/dnf.git] / dnf.spec
CommitLineData
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
12Summary: Package manager
13Summary(pl.UTF-8): Zarządca pakietów
feb41732 14Name: dnf
33f9733e 15Version: 4.19.0
001a72bb 16Release: 1
feb41732 17Group: Base
a1a5f7dd
JB
18# GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING
19License: GPL v2 (parts on GPL v2+ or GPL)
1abae8cd 20Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz
33f9733e 21# Source0-md5: 21a1eaaa8a4ab1b222460983125c141b
85a72ee1
JR
22Source1: pld.repo
23Source2: pld-archive.repo
24Source3: pld-debuginfo.repo
25Source4: pld-multilib.repo
1abae8cd 26Patch0: install.patch
85a72ee1 27Patch1: repos.d.patch
5467f6f6 28Patch2: uname-cpuinfo-deps.patch
70e5df64 29URL: https://github.com/rpm-software-management/dnf
5aa69e21 30BuildRequires: bash-completion-devel
a1a5f7dd 31BuildRequires: cmake >= 2.4
cebdb6a6 32BuildRequires: gettext-tools
14ed53ae 33BuildRequires: libmodulemd >= %{libmodulemd_ver}
1abae8cd
JR
34BuildRequires: python3
35BuildRequires: python3-gpg
36BuildRequires: python3-hawkey >= %{hawkey_ver}
37BuildRequires: python3-libcomps >= %{libcomps_ver}
38BuildRequires: python3-libdnf >= %{hawkey_ver}
39BuildRequires: python3-modules
40BuildRequires: python3-nose
41BuildRequires: python3-rpm >= %{rpm_ver}
8d645f54 42BuildRequires: rpm-build >= 4.6
feb41732 43BuildRequires: rpmbuild(macros) >= 1.647
1abae8cd 44BuildRequires: rpm-pythonprov
feb41732
ER
45BuildRequires: sed >= 4.0
46BuildRequires: sphinx-pdg
47BuildRequires: systemd-devel
48Requires(post,preun,postun): systemd-units >= 38
14ed53ae 49Requires: libmodulemd >= %{libmodulemd_ver}
1abae8cd
JR
50Requires: python3-gpg
51Requires: python3-hawkey >= %{hawkey_ver}
52Requires: python3-libcomps >= %{libcomps_ver}
53Requires: python3-libdnf >= %{hawkey_ver}
28de7959 54Requires: python3-modules
1abae8cd 55Requires: python3-rpm
feb41732 56Requires: systemd-units >= 0.38
1abae8cd
JR
57Recommends: deltarpm
58Recommends: python3-dbus
59Recommends: python3-unbound
60Recommends: rpm-plugin-systemd-inhibit
feb41732
ER
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63%description
1abae8cd
JR
64Utility that allows users to manage packages on their systems. It
65supports RPMs, modules and comps groups & environments.
feb41732 66
d3326039 67%description -l pl.UTF-8
1abae8cd
JR
68Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie.
69
70e5df64
ER
70%package automatic
71Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
d3326039 72Summary(pl.UTF-8): Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania
70e5df64 73Group: Base
70e5df64
ER
74Requires(post): systemd
75Requires(preun): systemd
76Requires(postun): systemd
d3326039 77Requires: %{name} = %{version}-%{release}
c4dd43df 78Requires: python3-modules
9fd94ada 79BuildArch: noarch
70e5df64
ER
80
81%description automatic
82Alternative CLI to "dnf upgrade" suitable for automatic, regular
83execution.
84
d3326039
JB
85%description automatic -l pl.UTF-8
86Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do
87automatycznego, regularnego wywoływania.
88
a1a5f7dd
JB
89%package -n bash-completion-dnf
90Summary: Bash completion for dnf command
91Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia dnf
92Group: Applications/Shells
93Requires: %{name} = %{version}-%{release}
94Requires: bash-completion
9fd94ada 95BuildArch: noarch
a1a5f7dd
JB
96
97%description -n bash-completion-dnf
98Bash completion for dnf command.
99
100%description -n bash-completion-dnf -l pl.UTF-8
101Bashowe uzupełnianie parametrów dla polecenia dnf.
102
1abae8cd 103%package -n yum
3658ab37
JB
104Summary: Yum compatibility layer for DNF
105Summary(pl.UTF-8): Warstwa zgodności z YUM-em dla DNF-a
14ed53ae 106Group: Base
a1a5f7dd 107Requires: %{name} = %{version}-%{release}
1abae8cd
JR
108Recommends: sqlite3
109Conflicts: yum < 3.4.3-505
9fd94ada 110BuildArch: noarch
a1a5f7dd 111
1abae8cd 112%description -n yum
3658ab37 113Yum compatibility layer for DNF.
a1a5f7dd 114
1abae8cd 115%description -n yum -l pl.UTF-8
3658ab37 116Warstwa 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
125install -d build
126cd 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
137rm -rf $RPM_BUILD_ROOT
85a72ee1 138install -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 145touch $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
155ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/%{name}.conf,yum.conf}
156ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/plugins,yum/pluginconf.d}
157ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/protected.d,yum/protected.d}
85a72ee1 158ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/repos.d,yum/repos.d}
1abae8cd 159ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/vars,yum/vars}
3658ab37 160ln -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
212rm -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
This page took 0.364752 seconds and 4 git commands to generate.