2 # - make -DSYSTEMD_DIR actually to work: https://github.com/rpm-software-management/dnf/pull/213
5 %bcond_without tests # build without tests
6 %bcond_without python2 # CPython 2.x version
7 %bcond_with python3 # CPython 3.x version (dependencies not met currently)
10 %define hawkey_ver 0.5.2
11 %define librepo_ver 1.7.5
12 %define libcomps_ver 0.1.6
15 Summary: Package manager forked from Yum, using libsolv as a dependency resolver
16 Summary(pl.UTF-8): Zarządca pakietów wywodzący się z Yuma, wykorzystujący libsolv do rozwiązywania zależności
21 # GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING
22 License: GPL v2 (parts on GPL v2+ or GPL)
23 #Source0: http://rpm-software-management.fedorapeople.org/%{name}-%{gitrev}.tar.xz
24 Source0: http://pkgs.fedoraproject.org/repo/pkgs/dnf/%{name}-%{gitrev}.tar.xz/82ff495e445ddc56e70dc91750a421ac/dnf-%{gitrev}.tar.xz
25 # Source0-md5: 82ff495e445ddc56e70dc91750a421ac
27 URL: https://github.com/rpm-software-management/dnf
28 BuildRequires: cmake >= 2.4
29 BuildRequires: gettext-tools
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.647
32 BuildRequires: sed >= 4.0
33 BuildRequires: sphinx-pdg
34 BuildRequires: systemd-devel
36 BuildRequires: python >= 2
38 #BuildRequires: python-bugzilla
39 BuildRequires: python-hawkey >= %{hawkey_ver}
40 BuildRequires: python-hawkey-test >= %{hawkey_ver}
41 BuildRequires: python-iniparse
42 BuildRequires: python-libcomps >= %{libcomps_ver}
43 BuildRequires: python-librepo >= %{librepo_ver}
44 BuildRequires: python-pygpgme
45 BuildRequires: python-rpm >= %{rpm_ver}
46 BuildRequires: python-nose
47 BuildRequires: python-pyliblzma
51 BuildRequires: python3 >= 1:3.3
53 Requires(post,preun,postun): systemd-units >= 38
55 Requires: python-hawkey >= %{hawkey_ver}
56 Requires: python-iniparse
57 Requires: python-libcomps >= %{libcomps_ver}
58 Requires: python-librepo >= %{librepo_ver}
59 Requires: python-pygpgme
60 Requires: python-rpm >= %{rpm_ver}
61 #Requires: rpm-plugin-systemd-inhibit
62 Requires: systemd-units >= 0.38
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 Package manager forked from Yum, using libsolv as a dependency
70 %description -l pl.UTF-8
71 Zarządca pakietów wywodzący się z Yuma, wykorzystujący libsolv do
72 rozwiązywania zależności.
75 Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
76 Summary(pl.UTF-8): Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania
78 Requires(post): systemd
79 Requires(preun): systemd
80 Requires(postun): systemd
81 Requires: %{name} = %{version}-%{release}
83 %description automatic
84 Alternative CLI to "dnf upgrade" suitable for automatic, regular
87 %description automatic -l pl.UTF-8
88 Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do
89 automatycznego, regularnego wywoływania.
91 %package -n bash-completion-dnf
92 Summary: Bash completion for dnf command
93 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia dnf
94 Group: Applications/Shells
95 Requires: %{name} = %{version}-%{release}
96 Requires: bash-completion
98 %description -n bash-completion-dnf
99 Bash completion for dnf command.
101 %description -n bash-completion-dnf -l pl.UTF-8
102 Bashowe uzupełnianie parametrów dla polecenia dnf.
104 %package -n python3-dnf
105 Summary: Python 3 version of dnf package manager
106 Summary(pl.UTF-8): Wersja zarządcy pakietów dnf dla Pythona 3
107 Group: Libraries/Python
108 # for common files (make -common?)
109 Requires: %{name} = %{version}-%{release}
111 Requires: python3-hawkey >= %{hawkey_ver}
112 # XXX: missing in PLD
113 #Requires: python3-iniparse
114 Requires: python3-libcomps >= %{libcomps_ver}
115 # XXX: missing in PLD
116 #Requires: python3-librepo >= %{librepo_ver}
117 Requires: python3-pygpgme
118 # XXX: missing in PLD (is it possible with rpm5?)
119 #Requires: python3-rpm >= %{rpm_ver}
121 %description -n python3-dnf
122 Python 3 version of dnf package manager.
124 %description -n python3-dnf -l pl.UTF-8
125 Wersja zarządcy pakietów dnf dla Pythona 3.
131 # the -D doesn't work
132 %{__sed} -i -e '/SYSTEMD_DIR/ s#/usr/lib/systemd/system#%{systemdunitdir}#' CMakeLists.txt
139 -DCMAKE_CXX_COMPILER="%{__cc}" \
140 -DCMAKE_CXX_COMPILER_WORKS=1 \
142 -DSYSTEMD_DIR=%{systemdunitdir}
148 %{__make} test ARGS="-V"
158 -DCMAKE_CXX_COMPILER="%{__cc}" \
159 -DCMAKE_CXX_COMPILER_WORKS=1 \
161 -DPYTHON_EXECUTABLE=%{__python3} \
162 -DSYSTEMD_DIR=%{systemdunitdir}
170 rm -rf $RPM_BUILD_ROOT
173 %{__make} -C build-py2 install \
174 DESTDIR=$RPM_BUILD_ROOT
176 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
177 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
182 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}/plugins,%{py_sitescriptdir}/dnf-plugins,%{_localstatedir}/log}
183 touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}{,-rpm,-plugin}.log
187 %{__make} -C build-py3 install \
188 DESTDIR=$RPM_BUILD_ROOT
190 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
191 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
193 %{__rm} $RPM_BUILD_ROOT%{_bindir}/dnf-3
197 rm -rf $RPM_BUILD_ROOT
200 %systemd_post dnf-makecache.timer
203 %systemd_preun dnf-makecache.timer
209 %systemd_post dnf-automatic.timer
212 %systemd_preun dnf-automatic.timer
218 %files -f %{name}.lang
219 %defattr(644,root,root,755)
220 %doc AUTHORS PACKAGE-LICENSING README.rst
221 %attr(755,root,root) %{_bindir}/dnf
222 %dir %{_sysconfdir}/%{name}
223 %dir %{_sysconfdir}/%{name}/plugins
224 %dir %{_sysconfdir}/%{name}/protected.d
225 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
226 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
227 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
228 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
229 %{_mandir}/man8/dnf.8*
230 %{_mandir}/man8/dnf.conf.8*
231 %{systemdunitdir}/dnf-makecache.service
232 %{systemdunitdir}/dnf-makecache.timer
233 %{py_sitescriptdir}/dnf
234 %exclude %{py_sitescriptdir}/dnf/automatic
236 %ghost %{_localstatedir}/log/%{name}.log
237 %ghost %{_localstatedir}/log/%{name}-rpm.log
238 %ghost %{_localstatedir}/log/%{name}-plugin.log
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_bindir}/dnf-automatic
243 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
244 %{_mandir}/man8/dnf.automatic.8*
245 %{systemdunitdir}/dnf-automatic.service
246 %{systemdunitdir}/dnf-automatic.timer
247 %{py_sitescriptdir}/dnf/automatic
250 %files -n bash-completion-dnf
251 %defattr(644,root,root,755)
252 /etc/bash_completion.d/dnf-completion.bash
255 %files -n python3-dnf
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_bindir}/dnf-3
258 %{py3_sitescriptdir}/dnf