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