]> git.pld-linux.org Git - packages/dnf.git/blame - dnf.spec
- partial update to 2.7.5; saving work
[packages/dnf.git] / dnf.spec
CommitLineData
d3326039 1# TODO
390ec9a3 2# - finish, update dependencies, add missing modules to PLD
d3326039 3# - make -DSYSTEMD_DIR actually to work: https://github.com/rpm-software-management/dnf/pull/213
f637201a
ER
4#
5# Conditional build:
6%bcond_without tests # build without tests
a1a5f7dd
JB
7%bcond_without python2 # CPython 2.x version
8%bcond_with python3 # CPython 3.x version (dependencies not met currently)
f637201a 9#
390ec9a3
JB
10%define hawkey_ver 0.11.1
11%define librepo_ver 1.8.1
12%define libcomps_ver 0.1.8
13#define libmodulemd_ver 1.4.0
14#define smartcols_ver 0.3.0
d3326039 15%define rpm_ver 5.4.0
70e5df64 16
feb41732 17Summary: Package manager forked from Yum, using libsolv as a dependency resolver
d3326039 18Summary(pl.UTF-8): Zarządca pakietów wywodzący się z Yuma, wykorzystujący libsolv do rozwiązywania zależności
feb41732 19Name: dnf
390ec9a3
JB
20Version: 2.7.5
21%define subver modularity-6
22Release: 0.1
feb41732 23Group: Base
a1a5f7dd
JB
24# GPL v2+ with GPL v2 and GPL parts; for a breakdown of the licensing, see PACKAGE-LICENSING
25License: GPL v2 (parts on GPL v2+ or GPL)
390ec9a3
JB
26#Source0Download: https://github.com/rpm-software-management/dnf/releases
27Source0: https://github.com/rpm-software-management/dnf/archive/%{version}-%{subver}/%{name}-%{version}-%{subver}.tar.gz
28# Source0-md5: 9f29c69ba7826c9cdacc7d3b811dc163
38fbb761 29Patch0: rpm5.patch
390ec9a3 30Patch1: %{name}-python.patch
70e5df64 31URL: https://github.com/rpm-software-management/dnf
a1a5f7dd 32BuildRequires: cmake >= 2.4
cebdb6a6 33BuildRequires: gettext-tools
cebdb6a6 34BuildRequires: rpm-pythonprov
390ec9a3 35BuildRequires: rpmbuild(macros) >= 1.714
feb41732
ER
36BuildRequires: sed >= 4.0
37BuildRequires: sphinx-pdg
38BuildRequires: systemd-devel
a1a5f7dd
JB
39%if %{with python2}
40BuildRequires: python >= 2
f637201a 41%if %{with tests}
a1a5f7dd 42#BuildRequires: python-bugzilla
390ec9a3 43BuildRequires: python-gpg
a1a5f7dd 44BuildRequires: python-hawkey >= %{hawkey_ver}
d3326039 45BuildRequires: python-hawkey-test >= %{hawkey_ver}
a1a5f7dd
JB
46BuildRequires: python-iniparse
47BuildRequires: python-libcomps >= %{libcomps_ver}
48BuildRequires: python-librepo >= %{librepo_ver}
a1a5f7dd 49BuildRequires: python-nose
f637201a 50BuildRequires: python-pyliblzma
390ec9a3 51BuildRequires: python-rpm >= %{rpm_ver}
f637201a 52%endif
a1a5f7dd
JB
53%endif
54%if %{with python3}
55BuildRequires: python3 >= 1:3.3
56%endif
feb41732
ER
57Requires(post,preun,postun): systemd-units >= 38
58Requires: deltarpm
d3326039 59Requires: python-hawkey >= %{hawkey_ver}
feb41732 60Requires: python-iniparse
d3326039
JB
61Requires: python-libcomps >= %{libcomps_ver}
62Requires: python-librepo >= %{librepo_ver}
390ec9a3
JB
63Requires: python-gpg
64Requires: python-pyliblzma
d3326039 65Requires: python-rpm >= %{rpm_ver}
70e5df64 66#Requires: rpm-plugin-systemd-inhibit
feb41732
ER
67Requires: systemd-units >= 0.38
68BuildArch: noarch
69BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71%description
72Package manager forked from Yum, using libsolv as a dependency
73resolver.
74
d3326039
JB
75%description -l pl.UTF-8
76Zarządca pakietów wywodzący się z Yuma, wykorzystujący libsolv do
77rozwiązywania zależności.
78
70e5df64
ER
79%package automatic
80Summary: Alternative CLI to "dnf upgrade" suitable for automatic, regular execution
d3326039 81Summary(pl.UTF-8): Alternatywny interfejs do "dnf upgrade" nadający się do automatycznego wywoływania
70e5df64 82Group: Base
390ec9a3 83Requires(post,preun,postun): systemd
d3326039 84Requires: %{name} = %{version}-%{release}
70e5df64
ER
85
86%description automatic
87Alternative CLI to "dnf upgrade" suitable for automatic, regular
88execution.
89
d3326039
JB
90%description automatic -l pl.UTF-8
91Alternatywny interfejs linii poleceń do "dnf upgrade", nadający się do
92automatycznego, regularnego wywoływania.
93
a1a5f7dd
JB
94%package -n bash-completion-dnf
95Summary: Bash completion for dnf command
96Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia dnf
97Group: Applications/Shells
98Requires: %{name} = %{version}-%{release}
390ec9a3 99Requires: bash-completion >= 2.0
a1a5f7dd
JB
100
101%description -n bash-completion-dnf
102Bash completion for dnf command.
103
104%description -n bash-completion-dnf -l pl.UTF-8
105Bashowe uzupełnianie parametrów dla polecenia dnf.
106
107%package -n python3-dnf
108Summary: Python 3 version of dnf package manager
109Summary(pl.UTF-8): Wersja zarządcy pakietów dnf dla Pythona 3
110Group: Libraries/Python
111# for common files (make -common?)
112Requires: %{name} = %{version}-%{release}
113Requires: deltarpm
390ec9a3 114Requires: python3-gpg
a1a5f7dd
JB
115Requires: python3-hawkey >= %{hawkey_ver}
116# XXX: missing in PLD
117#Requires: python3-iniparse
118Requires: python3-libcomps >= %{libcomps_ver}
390ec9a3
JB
119Requires: python3-librepo >= %{librepo_ver}
120#Requires: python3-pyliblzma
a1a5f7dd
JB
121# XXX: missing in PLD (is it possible with rpm5?)
122#Requires: python3-rpm >= %{rpm_ver}
123
124%description -n python3-dnf
125Python 3 version of dnf package manager.
126
127%description -n python3-dnf -l pl.UTF-8
128Wersja zarządcy pakietów dnf dla Pythona 3.
129
feb41732 130%prep
390ec9a3 131%setup -q -n %{name}-%{version}-%{subver}
38fbb761 132%patch0 -p1
390ec9a3 133%patch1 -p1
feb41732
ER
134
135# the -D doesn't work
136%{__sed} -i -e '/SYSTEMD_DIR/ s#/usr/lib/systemd/system#%{systemdunitdir}#' CMakeLists.txt
137
138%build
a1a5f7dd
JB
139%if %{with python2}
140install -d build-py2
141cd build-py2
142%cmake .. \
390ec9a3 143 -DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
a1a5f7dd
JB
144 -DCMAKE_CXX_COMPILER="%{__cc}" \
145 -DCMAKE_CXX_COMPILER_WORKS=1 \
70e5df64 146 -DPYTHON_DESIRED=2 \
a1a5f7dd 147 -DSYSTEMD_DIR=%{systemdunitdir}
feb41732
ER
148
149%{__make}
150%{__make} doc-man
151
152%if %{with tests}
d3326039 153%{__make} test ARGS="-V"
feb41732
ER
154%endif
155
a1a5f7dd
JB
156cd ..
157%endif
158
159%if %{with python3}
160install -d build-py3
161cd build-py3
162%cmake .. \
390ec9a3 163 -DBASH_COMPLETION_COMPLETIONSDIR=%{bash_compdir} \
a1a5f7dd
JB
164 -DCMAKE_CXX_COMPILER="%{__cc}" \
165 -DCMAKE_CXX_COMPILER_WORKS=1 \
166 -DPYTHON_DESIRED=3 \
167 -DPYTHON_EXECUTABLE=%{__python3} \
168 -DSYSTEMD_DIR=%{systemdunitdir}
169
170%{__make}
171%{__make} doc-man
172cd ..
173%endif
174
feb41732
ER
175%install
176rm -rf $RPM_BUILD_ROOT
a1a5f7dd
JB
177
178%if %{with python2}
179%{__make} -C build-py2 install \
feb41732
ER
180 DESTDIR=$RPM_BUILD_ROOT
181
182%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
183%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
184%py_postclean
185
feb41732
ER
186%find_lang %{name}
187
70e5df64
ER
188install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}/plugins,%{py_sitescriptdir}/dnf-plugins,%{_localstatedir}/log}
189touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}{,-rpm,-plugin}.log
a1a5f7dd
JB
190%endif
191
192%if %{with python3}
193%{__make} -C build-py3 install \
194 DESTDIR=$RPM_BUILD_ROOT
195
196%py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
197%py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
a1a5f7dd 198%endif
feb41732
ER
199
200%clean
201rm -rf $RPM_BUILD_ROOT
202
203%post
204%systemd_post dnf-makecache.timer
205
206%preun
207%systemd_preun dnf-makecache.timer
208
209%postun
210%systemd_reload
211
70e5df64
ER
212%post automatic
213%systemd_post dnf-automatic.timer
214
215%preun automatic
216%systemd_preun dnf-automatic.timer
217
218%postun automatic
219%systemd_reload
220
a1a5f7dd 221%if %{with python2}
feb41732
ER
222%files -f %{name}.lang
223%defattr(644,root,root,755)
a1a5f7dd 224%doc AUTHORS PACKAGE-LICENSING README.rst
390ec9a3 225%attr(755,root,root) %{_bindir}/dnf-2
feb41732 226%dir %{_sysconfdir}/%{name}
70e5df64
ER
227%dir %{_sysconfdir}/%{name}/plugins
228%dir %{_sysconfdir}/%{name}/protected.d
feb41732 229%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
70e5df64 230%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
feb41732
ER
231%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
232%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
390ec9a3
JB
233%{_mandir}/man5/dnf.conf.5*
234%{_mandir}/man5/yum.conf.5*
feb41732 235%{_mandir}/man8/dnf.8*
390ec9a3
JB
236%{_mandir}/man8/yum.8*
237%{_mandir}/man8/yum2dnf.8*
feb41732
ER
238%{systemdunitdir}/dnf-makecache.service
239%{systemdunitdir}/dnf-makecache.timer
390ec9a3 240%{systemdtmpfilesdir}/dnf.conf
feb41732 241%{py_sitescriptdir}/dnf
70e5df64 242%exclude %{py_sitescriptdir}/dnf/automatic
feb41732
ER
243
244%ghost %{_localstatedir}/log/%{name}.log
70e5df64
ER
245%ghost %{_localstatedir}/log/%{name}-rpm.log
246%ghost %{_localstatedir}/log/%{name}-plugin.log
70e5df64
ER
247
248%files automatic
249%defattr(644,root,root,755)
390ec9a3 250%attr(755,root,root) %{_bindir}/dnf-automatic-2
70e5df64
ER
251%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
252%{_mandir}/man8/dnf.automatic.8*
253%{systemdunitdir}/dnf-automatic.service
254%{systemdunitdir}/dnf-automatic.timer
390ec9a3
JB
255%{systemdunitdir}/dnf-automatic-download.service
256%{systemdunitdir}/dnf-automatic-download.timer
257%{systemdunitdir}/dnf-automatic-install.service
258%{systemdunitdir}/dnf-automatic-install.timer
259%{systemdunitdir}/dnf-automatic-notifyonly.service
260%{systemdunitdir}/dnf-automatic-notifyonly.timer
70e5df64 261%{py_sitescriptdir}/dnf/automatic
a1a5f7dd
JB
262%endif
263
264%files -n bash-completion-dnf
265%defattr(644,root,root,755)
390ec9a3 266%{bash_compdir}/dnf
a1a5f7dd
JB
267
268%if %{with python3}
269%files -n python3-dnf
270%defattr(644,root,root,755)
271%attr(755,root,root) %{_bindir}/dnf-3
272%{py3_sitescriptdir}/dnf
273%endif
This page took 0.08321 seconds and 4 git commands to generate.