3 %bcond_without tests # build without tests
6 # - bash-completion subpackage
7 # - make -DSYSTEMD_DIR actually to work: https://github.com/rpm-software-management/dnf/pull/213
9 %define hawkey_version 0.5.2
10 %define librepo_version 1.7.5
11 %define libcomps_version 0.1.6
12 %define rpm_version 5.4.0
14 Summary: Package manager forked from Yum, using libsolv as a dependency resolver
19 # For a breakdown of the licensing, see PACKAGE-LICENSING
20 License: GPL v2+ and GPL v2 and GPL
21 #Source0: http://rpm-software-management.fedorapeople.org/%{name}-%{gitrev}.tar.xz
22 Source0: http://pkgs.fedoraproject.org/repo/pkgs/dnf/%{name}-%{gitrev}.tar.xz/82ff495e445ddc56e70dc91750a421ac/dnf-%{gitrev}.tar.xz
23 # Source0-md5: 82ff495e445ddc56e70dc91750a421ac
25 URL: https://github.com/rpm-software-management/dnf
27 BuildRequires: gettext
28 BuildRequires: gettext-tools
30 BuildRequires: python-Sphinx
31 #BuildRequires: python-bugzilla
32 BuildRequires: python-hawkey >= %{hawkey_version}
33 BuildRequires: python-iniparse
34 BuildRequires: python-libcomps >= %{libcomps_version}
35 BuildRequires: python-librepo >= %{librepo_version}
36 BuildRequires: python-nose
37 BuildRequires: python-pygpgme
38 BuildRequires: python-rpm >= %{rpm_version}
39 BuildRequires: rpm-pythonprov
40 BuildRequires: rpmbuild(macros) >= 1.647
41 BuildRequires: sed >= 4.0
42 BuildRequires: sphinx-pdg
43 BuildRequires: systemd-devel
45 BuildRequires: hawkey-devel >= %{hawkey_version}
46 BuildRequires: python-pyliblzma
48 Requires(post,preun,postun): systemd-units >= 38
50 Requires: python-hawkey >= %{hawkey_version}
51 Requires: python-iniparse
52 Requires: python-libcomps >= %{libcomps_version}
53 Requires: python-librepo >= %{librepo_version}
54 Requires: python-pygpgme
55 Requires: python-rpm >= %{rpm_version}
56 #Requires: rpm-plugin-systemd-inhibit
57 Requires: systemd-units >= 0.38
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Package manager forked from Yum, using libsolv as a dependency
66 Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
68 Requires: %{name} = %{version}-%{release}
69 Requires(post): systemd
70 Requires(preun): systemd
71 Requires(postun): systemd
73 %description automatic
74 Alternative CLI to "dnf upgrade" suitable for automatic, regular
82 %{__sed} -i -e '/SYSTEMD_DIR/ s#/usr/lib/systemd/system#%{systemdunitdir}#' CMakeLists.txt
86 -DCMAKE_CXX_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER="%{__cc}" \
88 -DSYSTEMD_DIR=%{systemdunitdir} \
95 %{__make} ARGS="-V" test
99 rm -rf $RPM_BUILD_ROOT
101 DESTDIR=$RPM_BUILD_ROOT
103 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
104 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
109 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}/plugins,%{py_sitescriptdir}/dnf-plugins,%{_localstatedir}/log}
110 touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}{,-rpm,-plugin}.log
113 rm -rf $RPM_BUILD_ROOT
116 %systemd_post dnf-makecache.timer
119 %systemd_preun dnf-makecache.timer
125 %systemd_post dnf-automatic.timer
128 %systemd_preun dnf-automatic.timer
133 %files -f %{name}.lang
134 %defattr(644,root,root,755)
135 %doc AUTHORS README.rst COPYING PACKAGE-LICENSING
136 %attr(755,root,root) %{_bindir}/dnf
137 %dir %{_sysconfdir}/%{name}
138 %dir %{_sysconfdir}/%{name}/plugins
139 %dir %{_sysconfdir}/%{name}/protected.d
140 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
141 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
142 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
143 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
144 %{_mandir}/man8/dnf.8*
145 %{_mandir}/man8/dnf.conf.8*
146 %{systemdunitdir}/dnf-makecache.service
147 %{systemdunitdir}/dnf-makecache.timer
148 %{py_sitescriptdir}/dnf
149 %exclude %{py_sitescriptdir}/dnf/automatic
151 %ghost %{_localstatedir}/log/%{name}.log
152 %ghost %{_localstatedir}/log/%{name}-rpm.log
153 %ghost %{_localstatedir}/log/%{name}-plugin.log
154 /etc/bash_completion.d/dnf-completion.bash
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_bindir}/dnf-automatic
159 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
160 %{_mandir}/man8/dnf.automatic.8*
161 %{systemdunitdir}/dnf-automatic.service
162 %{systemdunitdir}/dnf-automatic.timer
163 %{py_sitescriptdir}/dnf/automatic