]>
Commit | Line | Data |
---|---|---|
feb41732 ER |
1 | # TODO |
2 | # - bash-completion subpackage | |
3 | # - make -DSYSTEMD_DIR actually to work | |
70e5df64 ER |
4 | %define gitrev a7e0aa1 |
5 | %define hawkey_version 0.5.2 | |
6 | %define librepo_version 1.7.5 | |
feb41732 | 7 | %define libcomps_version 0.1.6 |
70e5df64 ER |
8 | %define rpm_version 5.4.0 |
9 | ||
feb41732 ER |
10 | Summary: Package manager forked from Yum, using libsolv as a dependency resolver |
11 | Name: dnf | |
70e5df64 | 12 | Version: 0.6.3 |
38fbb761 | 13 | Release: 0.5 |
feb41732 ER |
14 | Group: Base |
15 | # For a breakdown of the licensing, see PACKAGE-LICENSING | |
38fbb761 | 16 | License: GPL v2+ and GPL v2 and GPL |
70e5df64 ER |
17 | #Source0: http://rpm-software-management.fedorapeople.org/%{name}-%{gitrev}.tar.xz |
18 | Source0: http://pkgs.fedoraproject.org/repo/pkgs/dnf/%{name}-%{gitrev}.tar.xz/82ff495e445ddc56e70dc91750a421ac/dnf-%{gitrev}.tar.xz | |
19 | # Source0-md5: 82ff495e445ddc56e70dc91750a421ac | |
38fbb761 | 20 | Patch0: rpm5.patch |
70e5df64 | 21 | URL: https://github.com/rpm-software-management/dnf |
feb41732 ER |
22 | BuildRequires: cmake |
23 | BuildRequires: gettext | |
24 | BuildRequires: python | |
25 | BuildRequires: python-Sphinx | |
26 | #BuildRequires: python-bugzilla | |
27 | BuildRequires: python-hawkey >= %{hawkey_version} | |
28 | BuildRequires: python-iniparse | |
29 | BuildRequires: python-libcomps >= %{libcomps_version} | |
30 | BuildRequires: python-librepo >= %{librepo_version} | |
31 | BuildRequires: python-nose | |
70e5df64 ER |
32 | BuildRequires: python-pygpgme |
33 | BuildRequires: python-rpm >= %{rpm_version} | |
feb41732 ER |
34 | BuildRequires: rpmbuild(macros) >= 1.647 |
35 | BuildRequires: sed >= 4.0 | |
36 | BuildRequires: sphinx-pdg | |
37 | BuildRequires: systemd-devel | |
38 | Requires(post,preun,postun): systemd-units >= 38 | |
39 | Requires: deltarpm | |
40 | Requires: python-hawkey >= %{hawkey_version} | |
41 | Requires: python-iniparse | |
42 | Requires: python-libcomps >= %{libcomps_version} | |
43 | Requires: python-librepo >= %{librepo_version} | |
70e5df64 ER |
44 | Requires: python-pygpgme |
45 | Requires: python-rpm >= %{rpm_version} | |
46 | #Requires: rpm-plugin-systemd-inhibit | |
feb41732 ER |
47 | Requires: systemd-units >= 0.38 |
48 | BuildArch: noarch | |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
50 | ||
51 | %description | |
52 | Package manager forked from Yum, using libsolv as a dependency | |
53 | resolver. | |
54 | ||
70e5df64 ER |
55 | %package automatic |
56 | Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution | |
57 | Group: Base | |
58 | Requires: %{name} = %{version}-%{release} | |
59 | Requires(post): systemd | |
60 | Requires(preun): systemd | |
61 | Requires(postun): systemd | |
62 | ||
63 | %description automatic | |
64 | Alternative CLI to "dnf upgrade" suitable for automatic, regular | |
65 | execution. | |
66 | ||
feb41732 ER |
67 | %prep |
68 | %setup -q -n %{name} | |
38fbb761 | 69 | %patch0 -p1 |
feb41732 ER |
70 | |
71 | # the -D doesn't work | |
72 | %{__sed} -i -e '/SYSTEMD_DIR/ s#/usr/lib/systemd/system#%{systemdunitdir}#' CMakeLists.txt | |
73 | ||
74 | %build | |
75 | %cmake \ | |
70e5df64 | 76 | -DPYTHON_DESIRED=2 \ |
feb41732 ER |
77 | -DSYSTEMD_DIR=%{systemdunitdir} \ |
78 | . | |
79 | ||
80 | %{__make} | |
81 | %{__make} doc-man | |
82 | ||
83 | %if %{with tests} | |
84 | %{__make} ARGS="-V" test | |
85 | %endif | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | %{__make} install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT | |
91 | ||
92 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
93 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
94 | %py_postclean | |
95 | ||
feb41732 ER |
96 | %find_lang %{name} |
97 | ||
70e5df64 ER |
98 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}/plugins,%{py_sitescriptdir}/dnf-plugins,%{_localstatedir}/log} |
99 | touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}{,-rpm,-plugin}.log | |
feb41732 ER |
100 | |
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post | |
105 | %systemd_post dnf-makecache.timer | |
106 | ||
107 | %preun | |
108 | %systemd_preun dnf-makecache.timer | |
109 | ||
110 | %postun | |
111 | %systemd_reload | |
112 | ||
70e5df64 ER |
113 | %post automatic |
114 | %systemd_post dnf-automatic.timer | |
115 | ||
116 | %preun automatic | |
117 | %systemd_preun dnf-automatic.timer | |
118 | ||
119 | %postun automatic | |
120 | %systemd_reload | |
121 | ||
feb41732 ER |
122 | %files -f %{name}.lang |
123 | %defattr(644,root,root,755) | |
124 | %doc AUTHORS README.rst COPYING PACKAGE-LICENSING | |
125 | %attr(755,root,root) %{_bindir}/dnf | |
126 | %dir %{_sysconfdir}/%{name} | |
70e5df64 ER |
127 | %dir %{_sysconfdir}/%{name}/plugins |
128 | %dir %{_sysconfdir}/%{name}/protected.d | |
feb41732 | 129 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf |
70e5df64 | 130 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf |
feb41732 ER |
131 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf |
132 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} | |
133 | %{_mandir}/man8/dnf.8* | |
134 | %{_mandir}/man8/dnf.conf.8* | |
135 | %{systemdunitdir}/dnf-makecache.service | |
136 | %{systemdunitdir}/dnf-makecache.timer | |
137 | %{py_sitescriptdir}/dnf | |
70e5df64 | 138 | %exclude %{py_sitescriptdir}/dnf/automatic |
feb41732 ER |
139 | |
140 | %ghost %{_localstatedir}/log/%{name}.log | |
70e5df64 ER |
141 | %ghost %{_localstatedir}/log/%{name}-rpm.log |
142 | %ghost %{_localstatedir}/log/%{name}-plugin.log | |
feb41732 | 143 | /etc/bash_completion.d/dnf-completion.bash |
70e5df64 ER |
144 | |
145 | %files automatic | |
146 | %defattr(644,root,root,755) | |
147 | %attr(755,root,root) %{_bindir}/dnf-automatic | |
148 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf | |
149 | %{_mandir}/man8/dnf.automatic.8* | |
150 | %{systemdunitdir}/dnf-automatic.service | |
151 | %{systemdunitdir}/dnf-automatic.timer | |
152 | %{py_sitescriptdir}/dnf/automatic |