]> git.pld-linux.org Git - packages/dnf.git/blob - dnf.spec
- release 4 (by relup.sh)
[packages/dnf.git] / dnf.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4 #
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 Summary:        Package manager
11 Summary(pl.UTF-8):      Zarządca pakietów
12 Name:           dnf
13 Version:        4.6.1
14 Release:        4
15 Group:          Base
16 # GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING
17 License:        GPL v2 (parts on GPL v2+ or GPL)
18 Source0:        https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  21880d44905d6aa67ab6bee1e86380b3
20 Patch0:         install.patch
21 URL:            https://github.com/rpm-software-management/dnf
22 BuildRequires:  bash-completion-devel
23 BuildRequires:  cmake >= 2.4
24 BuildRequires:  gettext-tools
25 BuildRequires:  python3
26 BuildRequires:  python3-gpg
27 BuildRequires:  python3-hawkey >= %{hawkey_ver}
28 BuildRequires:  python3-libcomps >= %{libcomps_ver}
29 BuildRequires:  python3-libdnf >= %{hawkey_ver}
30 BuildRequires:  python3-modules
31 BuildRequires:  python3-nose
32 BuildRequires:  python3-rpm >= %{rpm_ver}
33 BuildRequires:  libmodulemd >= %{libmodulemd_ver}
34 BuildRequires:  rpmbuild(macros) >= 1.647
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  sed >= 4.0
37 BuildRequires:  sphinx-pdg
38 BuildRequires:  systemd-devel
39 Requires(post,preun,postun):    systemd-units >= 38
40 Requires:       python3-gpg
41 Requires:       python3-hawkey >= %{hawkey_ver}
42 Requires:       python3-libcomps >= %{libcomps_ver}
43 Requires:       python3-libdnf >= %{hawkey_ver}
44 Requires:       python3-rpm
45 Requires:       systemd-units >= 0.38
46 Requires:       libmodulemd >= %{libmodulemd_ver}
47 Recommends:     deltarpm
48 Recommends:     python3-dbus
49 Recommends:     python3-unbound
50 Recommends:     rpm-plugin-systemd-inhibit
51 BuildArch:      noarch
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 Utility that allows users to manage packages on their systems. It
56 supports RPMs, modules and comps groups & environments.
57
58 %description -l pl.UTF-8
59 Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie.
60
61 %package common
62 Summary:        Common data and configuration files for DNF
63 Requires:       libreport-filesystem
64
65 %description common
66 Common data and configuration files for DNF.
67
68 %package automatic
69 Summary:        Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
70 Summary(pl.UTF-8):      Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania
71 Group:          Base
72 Requires(post): systemd
73 Requires(preun):        systemd
74 Requires(postun):       systemd
75 Requires:       %{name} = %{version}-%{release}
76
77 %description automatic
78 Alternative CLI to "dnf upgrade" suitable for automatic, regular
79 execution.
80
81 %description automatic -l pl.UTF-8
82 Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do
83 automatycznego, regularnego wywoływania.
84
85 %package -n bash-completion-dnf
86 Summary:        Bash completion for dnf command
87 Summary(pl.UTF-8):      Bashowe uzupełnianie parametrów dla polecenia dnf
88 Group:          Applications/Shells
89 Requires:       %{name} = %{version}-%{release}
90 Requires:       bash-completion
91
92 %description -n bash-completion-dnf
93 Bash completion for dnf command.
94
95 %description -n bash-completion-dnf -l pl.UTF-8
96 Bashowe uzupełnianie parametrów dla polecenia dnf.
97
98 %package -n yum
99 Summary:        Package manager
100 Summary(pl.UTF-8):      Zarządca pakietów
101 Requires:       %{name} = %{version}-%{release}
102 Recommends:     sqlite3
103 Conflicts:      yum < 3.4.3-505
104
105 %description -n yum
106 Utility that allows users to manage packages on their systems. It
107 supports RPMs, modules and comps groups & environments.
108
109 %description -n yum -l pl.UTF-8
110 Marzędzie umożliwiające użytkownikom zarządzanie pakietami w systemie.
111
112 %prep
113 %setup -q
114 %patch0 -p1
115
116 %build
117 install -d build
118 cd build
119 %cmake .. \
120         -DPYTHON_DESIRED:FILEPATH=%{__python3} \
121         -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir} \
122         -DDNF_VERSION=%{version} \
123         -DSYSTEMD_DIR=%{systemdunitdir}
124
125 %{__make}
126 %{__make} doc-man
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/{vars,aliases.d,plugins,modules.d,modules.defaults.d},yum} \
131         -d $RPM_BUILD_ROOT{%{_localstatedir}/log/,%{_var}/cache/dnf/} \
132         -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf-plugins/__pycache__
133
134 %{__make} -C build install \
135         DESTDIR=$RPM_BUILD_ROOT
136
137 touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}.log
138
139 %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-3 $RPM_BUILD_ROOT%{_bindir}/dnf
140 %{__mv} $RPM_BUILD_ROOT%{_bindir}/dnf-automatic-3 $RPM_BUILD_ROOT%{_bindir}/dnf-automatic
141
142 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{%{name}-strict.conf,aliases.d/zypper.conf}
143
144 # YUM compat layer
145 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/%{name}.conf,yum.conf}
146 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/plugins,yum/pluginconf.d}
147 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/protected.d,yum/protected.d}
148 ln -sr $RPM_BUILD_ROOT%{_sysconfdir}/{%{name}/vars,yum/vars}
149 ln -s dnf-3 $RPM_BUILD_ROOT%{_bindir}/yum
150
151 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf
152 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/dnf
153
154 %find_lang %{name}
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %post
160 %systemd_post dnf-makecache.timer
161
162 %preun
163 %systemd_preun dnf-makecache.timer
164
165 %postun
166 %systemd_reload
167
168 %post automatic
169 %systemd_post dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer
170
171 %preun automatic
172 %systemd_preun dnf-automatic.timer dnf-automatic-download.timer dnf-automatic-install.timer dnf-automatic-notifyonly.timer
173
174 %postun automatic
175 %systemd_reload
176
177 %files -f %{name}.lang
178 %defattr(644,root,root,755)
179 %doc AUTHORS PACKAGE-LICENSING README.rst
180 %attr(755,root,root) %{_bindir}/dnf
181 %dir %{_sysconfdir}/%{name}
182 %dir %{_sysconfdir}/%{name}/plugins
183 %dir %{_sysconfdir}/%{name}/protected.d
184 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
185 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
186 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
187 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
188 %{_mandir}/man5/dnf.conf.5*
189 %{_mandir}/man5/dnf-transaction-json.5*
190 %{_mandir}/man7/dnf.modularity.7*
191 %{_mandir}/man8/dnf.8*
192 %{_mandir}/man8/yum2dnf.8*
193 %{systemdunitdir}/dnf-makecache.service
194 %{systemdunitdir}/dnf-makecache.timer
195 %{systemdtmpfilesdir}/dnf.conf
196 %{py3_sitescriptdir}/dnf
197 %{py3_sitescriptdir}/dnf-plugins
198 %exclude %{py3_sitescriptdir}/dnf/automatic
199
200 %ghost %{_localstatedir}/log/%{name}.log
201
202 %files automatic
203 %defattr(644,root,root,755)
204 %attr(755,root,root) %{_bindir}/dnf-automatic
205 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
206 %{_mandir}/man8/dnf-automatic.8*
207 %{systemdunitdir}/dnf-automatic-download.service
208 %{systemdunitdir}/dnf-automatic-download.timer
209 %{systemdunitdir}/dnf-automatic-install.service
210 %{systemdunitdir}/dnf-automatic-install.timer
211 %{systemdunitdir}/dnf-automatic-notifyonly.service
212 %{systemdunitdir}/dnf-automatic-notifyonly.timer
213 %{systemdunitdir}/dnf-automatic.service
214 %{systemdunitdir}/dnf-automatic.timer
215 %{py3_sitescriptdir}/dnf/automatic
216
217 %files -n bash-completion-dnf
218 %defattr(644,root,root,755)
219 %{bash_compdir}/dnf
220
221 %files -n yum
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_bindir}/yum
224 %{_sysconfdir}/yum.conf
225 %dir %{_sysconfdir}/yum
226 %{_sysconfdir}/yum/pluginconf.d
227 %{_sysconfdir}/yum/protected.d
228 %{_sysconfdir}/yum/vars
229 %{_mandir}/man8/yum.8*
230 %{_mandir}/man5/yum.conf.5.*
231 %{_mandir}/man8/yum-shell.8*
232 %{_mandir}/man1/yum-aliases.1*
233 %config(noreplace) %{_sysconfdir}/%{name}/protected.d/yum.conf
This page took 0.072306 seconds and 4 git commands to generate.