]> git.pld-linux.org Git - packages/dnf.git/blame - dnf.spec
- up to 4.12.0
[packages/dnf.git] / dnf.spec
CommitLineData
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
10Summary: Package manager
11Summary(pl.UTF-8): Zarządca pakietów
feb41732 12Name: dnf
6afe0962
JR
13Version: 4.12.0
14Release: 0.1
feb41732 15Group: Base
a1a5f7dd
JB
16# GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING
17License: GPL v2 (parts on GPL v2+ or GPL)
1abae8cd 18Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz
6afe0962 19# Source0-md5: 0e0242e443f87290efd16226b056f18c
85a72ee1
JR
20Source1: pld.repo
21Source2: pld-archive.repo
22Source3: pld-debuginfo.repo
23Source4: pld-multilib.repo
1abae8cd 24Patch0: install.patch
85a72ee1 25Patch1: repos.d.patch
70e5df64 26URL: https://github.com/rpm-software-management/dnf
5aa69e21 27BuildRequires: bash-completion-devel
a1a5f7dd 28BuildRequires: cmake >= 2.4
cebdb6a6 29BuildRequires: gettext-tools
14ed53ae 30BuildRequires: libmodulemd >= %{libmodulemd_ver}
1abae8cd
JR
31BuildRequires: python3
32BuildRequires: python3-gpg
33BuildRequires: python3-hawkey >= %{hawkey_ver}
34BuildRequires: python3-libcomps >= %{libcomps_ver}
35BuildRequires: python3-libdnf >= %{hawkey_ver}
36BuildRequires: python3-modules
37BuildRequires: python3-nose
38BuildRequires: python3-rpm >= %{rpm_ver}
feb41732 39BuildRequires: rpmbuild(macros) >= 1.647
1abae8cd 40BuildRequires: rpm-pythonprov
feb41732
ER
41BuildRequires: sed >= 4.0
42BuildRequires: sphinx-pdg
43BuildRequires: systemd-devel
44Requires(post,preun,postun): systemd-units >= 38
14ed53ae 45Requires: libmodulemd >= %{libmodulemd_ver}
1abae8cd
JR
46Requires: python3-gpg
47Requires: python3-hawkey >= %{hawkey_ver}
48Requires: python3-libcomps >= %{libcomps_ver}
49Requires: python3-libdnf >= %{hawkey_ver}
50Requires: python3-rpm
feb41732 51Requires: systemd-units >= 0.38
1abae8cd
JR
52Recommends: deltarpm
53Recommends: python3-dbus
54Recommends: python3-unbound
55Recommends: rpm-plugin-systemd-inhibit
feb41732
ER
56BuildArch: noarch
57BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59%description
1abae8cd
JR
60Utility that allows users to manage packages on their systems. It
61supports RPMs, modules and comps groups & environments.
feb41732 62
d3326039 63%description -l pl.UTF-8
1abae8cd
JR
64Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie.
65
66%package common
67Summary: Common data and configuration files for DNF
c04001b4 68Summary(pl.UTF-8): Wspólne dane i pliki konfiguracyjne dla DNF-a
14ed53ae 69Group: Base
1abae8cd
JR
70Requires: libreport-filesystem
71
72%description common
73Common data and configuration files for DNF.
d3326039 74
c04001b4
JB
75%description common -l pl.UTF-8
76Wspólne dane i pliki konfiguracyjne dla DNF-a.
77
70e5df64
ER
78%package automatic
79Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
d3326039 80Summary(pl.UTF-8): Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania
70e5df64 81Group: Base
70e5df64
ER
82Requires(post): systemd
83Requires(preun): systemd
84Requires(postun): systemd
d3326039 85Requires: %{name} = %{version}-%{release}
70e5df64
ER
86
87%description automatic
88Alternative CLI to "dnf upgrade" suitable for automatic, regular
89execution.
90
d3326039
JB
91%description automatic -l pl.UTF-8
92Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do
93automatycznego, regularnego wywoływania.
94
a1a5f7dd
JB
95%package -n bash-completion-dnf
96Summary: Bash completion for dnf command
97Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia dnf
98Group: Applications/Shells
99Requires: %{name} = %{version}-%{release}
100Requires: bash-completion
101
102%description -n bash-completion-dnf
103Bash completion for dnf command.
104
105%description -n bash-completion-dnf -l pl.UTF-8
106Bashowe uzupełnianie parametrów dla polecenia dnf.
107
1abae8cd 108%package -n yum
3658ab37
JB
109Summary: Yum compatibility layer for DNF
110Summary(pl.UTF-8): Warstwa zgodności z YUM-em dla DNF-a
14ed53ae 111Group: Base
a1a5f7dd 112Requires: %{name} = %{version}-%{release}
1abae8cd
JR
113Recommends: sqlite3
114Conflicts: yum < 3.4.3-505
a1a5f7dd 115
1abae8cd 116%description -n yum
3658ab37 117Yum compatibility layer for DNF.
a1a5f7dd 118
1abae8cd 119%description -n yum -l pl.UTF-8
3658ab37 120Warstwa zgodności z YUM-em dla DNF-a.
a1a5f7dd 121
feb41732 122%prep
1abae8cd 123%setup -q
38fbb761 124%patch0 -p1
85a72ee1 125%patch1 -p1
feb41732 126
feb41732 127%build
1abae8cd
JR
128install -d build
129cd build
a1a5f7dd 130%cmake .. \
1abae8cd
JR
131 -DPYTHON_DESIRED:FILEPATH=%{__python3} \
132 -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir} \
133 -DDNF_VERSION=%{version} \
a1a5f7dd 134 -DSYSTEMD_DIR=%{systemdunitdir}
feb41732
ER
135
136%{__make}
137%{__make} doc-man
138
feb41732
ER
139%install
140rm -rf $RPM_BUILD_ROOT
85a72ee1 141install -d $RPM_BUILD_ROOT%{_sysconfdir}/{yum,%{name}/{vars,aliases.d,plugins,modules.d,modules.defaults.d,repos.d}} \
747eb767 142 -d $RPM_BUILD_ROOT{%{_localstatedir}/log/,%{_var}/cache/dnf} \
748413d4 143 -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf-plugins/__pycache__
a1a5f7dd 144
1abae8cd 145%{__make} -C build install \
feb41732
ER
146 DESTDIR=$RPM_BUILD_ROOT
147
1abae8cd 148touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log
feb41732 149
1abae8cd
JR
150%{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-3 $RPM_BUILD_ROOT%{_bindir}/dnf
151%{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-automatic-3 $RPM_BUILD_ROOT%{_bindir}/dnf-automatic
feb41732 152
1abae8cd 153%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{%{name}-strict.conf,aliases.d/zypper.conf}
a1a5f7dd 154
1abae8cd
JR
155# YUM compat layer
156ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/%{name}.conf,yum.conf}
157ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/plugins,yum/pluginconf.d}
158ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/protected.d,yum/protected.d}
85a72ee1 159ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/repos.d,yum/repos.d}
1abae8cd 160ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/vars,yum/vars}
3658ab37 161ln -s dnf $RPM_BUILD_ROOT%{_bindir}/yum
a1a5f7dd 162
85a72ee1
JR
163%ifarch i686 ppc sparc alpha athlon aarch64 %{arm}
164 %define ftp_arch %{_target_cpu}
165%endif
166%ifarch pentium2 pentium3 pentium4
167 %define ftp_arch i686
168%endif
169%ifarch %{x8664}
170 %define ftp_arch x86_64
171 %define ftp_alt_arch i686
172 %define ftp_alt2_arch x32
173%endif
174%ifarch x32
175 %define ftp_arch x32
176 %define ftp_alt_arch x86_64
177 %define ftp_alt2_arch i686
178%endif
179
180%define pld_repo %{SOURCE1}
181%define pld_archive_repo %{SOURCE2}
182%define pld_debuginfo_repo %{SOURCE3}
183
184%ifarch %{x8664} x32
185 %define pld_multilib_repo %{SOURCE4}
186 %define pld_multilib2_repo %{SOURCE4}
187%endif
188
189%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.repo
190
191%if 0%{?pld_multilib_repo:1}
192 %{__sed} 's|%%ARCH%%|%{ftp_alt_arch}|g' < %{pld_multilib_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.repo
193%endif
194
195%if 0%{?pld_multilib2_repo:1}
196 %{__sed} 's|%%ARCH%%|%{ftp_alt2_arch}|g' < %{pld_multilib_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt2_arch}.repo
197%endif
198
199%if 0%{?pld_debuginfo_repo:1}
200%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_debuginfo_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-debuginfo.repo
201%endif
202
203%if 0%{?pld_archive_repo:1}
204%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_archive_repo} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-archive.repo
205%endif
206
748413d4
JR
207%py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf
208%py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf
209
1abae8cd 210%find_lang %{name}
feb41732
ER
211
212%clean
213rm -rf $RPM_BUILD_ROOT
214
215%post
216%systemd_post dnf-makecache.timer
217
218%preun
219%systemd_preun dnf-makecache.timer
220
221%postun
222%systemd_reload
223
70e5df64 224%post automatic
1abae8cd 225%systemd_post dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer
70e5df64
ER
226
227%preun automatic
1abae8cd 228%systemd_preun dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer
70e5df64
ER
229
230%postun automatic
231%systemd_reload
232
feb41732
ER
233%files -f %{name}.lang
234%defattr(644,root,root,755)
a1a5f7dd 235%doc AUTHORS PACKAGE-LICENSING README.rst
feb41732
ER
236%attr(755,root,root) %{_bindir}/dnf
237%dir %{_sysconfdir}/%{name}
70e5df64
ER
238%dir %{_sysconfdir}/%{name}/plugins
239%dir %{_sysconfdir}/%{name}/protected.d
85a72ee1 240%dir %{_sysconfdir}/%{name}/repos.d
feb41732 241%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
70e5df64 242%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
85a72ee1 243%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/repos.d/*.repo
feb41732
ER
244%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
245%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
1abae8cd
JR
246%{_mandir}/man5/dnf.conf.5*
247%{_mandir}/man5/dnf-transaction-json.5*
248%{_mandir}/man7/dnf.modularity.7*
feb41732 249%{_mandir}/man8/dnf.8*
1abae8cd 250%{_mandir}/man8/yum2dnf.8*
feb41732
ER
251%{systemdunitdir}/dnf-makecache.service
252%{systemdunitdir}/dnf-makecache.timer
1abae8cd
JR
253%{systemdtmpfilesdir}/dnf.conf
254%{py3_sitescriptdir}/dnf
748413d4 255%{py3_sitescriptdir}/dnf-plugins
1abae8cd 256%exclude %{py3_sitescriptdir}/dnf/automatic
747eb767 257%dir %{_var}/cache/dnf
feb41732 258%ghost %{_localstatedir}/log/%{name}.log
70e5df64
ER
259
260%files automatic
261%defattr(644,root,root,755)
262%attr(755,root,root) %{_bindir}/dnf-automatic
263%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
1abae8cd
JR
264%{_mandir}/man8/dnf-automatic.8*
265%{systemdunitdir}/dnf-automatic-download.service
266%{systemdunitdir}/dnf-automatic-download.timer
267%{systemdunitdir}/dnf-automatic-install.service
268%{systemdunitdir}/dnf-automatic-install.timer
269%{systemdunitdir}/dnf-automatic-notifyonly.service
270%{systemdunitdir}/dnf-automatic-notifyonly.timer
70e5df64
ER
271%{systemdunitdir}/dnf-automatic.service
272%{systemdunitdir}/dnf-automatic.timer
1abae8cd 273%{py3_sitescriptdir}/dnf/automatic
a1a5f7dd
JB
274
275%files -n bash-completion-dnf
276%defattr(644,root,root,755)
5aa69e21 277%{bash_compdir}/dnf
a1a5f7dd 278
1abae8cd 279%files -n yum
a1a5f7dd 280%defattr(644,root,root,755)
1abae8cd
JR
281%attr(755,root,root) %{_bindir}/yum
282%{_sysconfdir}/yum.conf
3524bf68 283%dir %{_sysconfdir}/yum
1abae8cd
JR
284%{_sysconfdir}/yum/pluginconf.d
285%{_sysconfdir}/yum/protected.d
85a72ee1 286%{_sysconfdir}/yum/repos.d
1abae8cd 287%{_sysconfdir}/yum/vars
e2633179 288%{_mandir}/man1/yum-aliases.1*
1abae8cd 289%{_mandir}/man5/yum.conf.5.*
e2633179 290%{_mandir}/man8/yum.8*
1abae8cd 291%{_mandir}/man8/yum-shell.8*
1abae8cd 292%config(noreplace) %{_sysconfdir}/%{name}/protected.d/yum.conf
This page took 0.195845 seconds and 4 git commands to generate.