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