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