]> git.pld-linux.org Git - packages/dnf.git/blob - dnf.spec
- pl, unified
[packages/dnf.git] / dnf.spec
1 # TODO
2 # - bash-completion subpackage
3 # - make -DSYSTEMD_DIR actually to work: https://github.com/rpm-software-management/dnf/pull/213
4 #
5 # Conditional build:
6 %bcond_without  tests           # build without tests
7 #
8 %define gitrev  a7e0aa1
9 %define hawkey_ver      0.5.2
10 %define librepo_ver     1.7.5
11 %define libcomps_ver    0.1.6
12 %define rpm_ver         5.4.0
13
14 Summary:        Package manager forked from Yum, using libsolv as a dependency resolver
15 Summary(pl.UTF-8):      Zarządca pakietów wywodzący się z Yuma, wykorzystujący libsolv do rozwiązywania zależności
16 Name:           dnf
17 Version:        0.6.3
18 Release:        0.5
19 Group:          Base
20 # For a breakdown of the licensing, see PACKAGE-LICENSING
21 License:        GPL v2+ and GPL v2 and GPL
22 #Source0:       http://rpm-software-management.fedorapeople.org/%{name}-%{gitrev}.tar.xz
23 Source0:        http://pkgs.fedoraproject.org/repo/pkgs/dnf/%{name}-%{gitrev}.tar.xz/82ff495e445ddc56e70dc91750a421ac/dnf-%{gitrev}.tar.xz
24 # Source0-md5:  82ff495e445ddc56e70dc91750a421ac
25 Patch0:         rpm5.patch
26 URL:            https://github.com/rpm-software-management/dnf
27 BuildRequires:  cmake
28 BuildRequires:  gettext
29 BuildRequires:  gettext-tools
30 BuildRequires:  python
31 BuildRequires:  python-Sphinx
32 #BuildRequires: python-bugzilla
33 BuildRequires:  python-hawkey >= %{hawkey_ver}
34 BuildRequires:  python-iniparse
35 BuildRequires:  python-libcomps >= %{libcomps_ver}
36 BuildRequires:  python-librepo >= %{librepo_ver}
37 BuildRequires:  python-nose
38 BuildRequires:  python-pygpgme
39 BuildRequires:  python-rpm >= %{rpm_ver}
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.647
42 BuildRequires:  sed >= 4.0
43 BuildRequires:  sphinx-pdg
44 BuildRequires:  systemd-devel
45 %if %{with tests}
46 BuildRequires:  python-hawkey-test >= %{hawkey_ver}
47 BuildRequires:  python-pyliblzma
48 %endif
49 Requires(post,preun,postun):    systemd-units >= 38
50 Requires:       deltarpm
51 Requires:       python-hawkey >= %{hawkey_ver}
52 Requires:       python-iniparse
53 Requires:       python-libcomps >= %{libcomps_ver}
54 Requires:       python-librepo >= %{librepo_ver}
55 Requires:       python-pygpgme
56 Requires:       python-rpm >= %{rpm_ver}
57 #Requires:      rpm-plugin-systemd-inhibit
58 Requires:       systemd-units >= 0.38
59 BuildArch:      noarch
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
63 Package manager forked from Yum, using libsolv as a dependency
64 resolver.
65
66 %description -l pl.UTF-8
67 Zarządca pakietów wywodzący się z Yuma, wykorzystujący libsolv do
68 rozwiązywania zależności.
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 %prep
88 %setup -q -n %{name}
89 %patch0 -p1
90
91 # the -D doesn't work
92 %{__sed} -i -e '/SYSTEMD_DIR/ s#/usr/lib/systemd/system#%{systemdunitdir}#' CMakeLists.txt
93
94 %build
95 %cmake \
96         -DCMAKE_CXX_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER="%{__cc}" \
97         -DPYTHON_DESIRED=2 \
98         -DSYSTEMD_DIR=%{systemdunitdir} \
99         .
100
101 %{__make}
102 %{__make} doc-man
103
104 %if %{with tests}
105 %{__make} test ARGS="-V"
106 %endif
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 %{__make} install \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
114 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
115 %py_postclean
116
117 %find_lang %{name}
118
119 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}/plugins,%{py_sitescriptdir}/dnf-plugins,%{_localstatedir}/log}
120 touch $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}{,-rpm,-plugin}.log
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post
126 %systemd_post dnf-makecache.timer
127
128 %preun
129 %systemd_preun dnf-makecache.timer
130
131 %postun
132 %systemd_reload
133
134 %post automatic
135 %systemd_post dnf-automatic.timer
136
137 %preun automatic
138 %systemd_preun dnf-automatic.timer
139
140 %postun automatic
141 %systemd_reload
142
143 %files -f %{name}.lang
144 %defattr(644,root,root,755)
145 %doc AUTHORS README.rst COPYING PACKAGE-LICENSING
146 %attr(755,root,root) %{_bindir}/dnf
147 %dir %{_sysconfdir}/%{name}
148 %dir %{_sysconfdir}/%{name}/plugins
149 %dir %{_sysconfdir}/%{name}/protected.d
150 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/dnf.conf
151 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/protected.d/dnf.conf
152 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/libreport/events.d/collect_dnf.conf
153 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
154 %{_mandir}/man8/dnf.8*
155 %{_mandir}/man8/dnf.conf.8*
156 %{systemdunitdir}/dnf-makecache.service
157 %{systemdunitdir}/dnf-makecache.timer
158 %{py_sitescriptdir}/dnf
159 %exclude %{py_sitescriptdir}/dnf/automatic
160
161 %ghost %{_localstatedir}/log/%{name}.log
162 %ghost %{_localstatedir}/log/%{name}-rpm.log
163 %ghost %{_localstatedir}/log/%{name}-plugin.log
164 /etc/bash_completion.d/dnf-completion.bash
165
166 %files automatic
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_bindir}/dnf-automatic
169 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/automatic.conf
170 %{_mandir}/man8/dnf.automatic.8*
171 %{systemdunitdir}/dnf-automatic.service
172 %{systemdunitdir}/dnf-automatic.timer
173 %{py_sitescriptdir}/dnf/automatic
This page took 0.180418 seconds and 3 git commands to generate.