Debian Codegraph @

cpuset.spec

raw
1 #
2 # spec file for package cpuset
3 #
4 # Copyright (c) 2021 SUSE LLC
5 # Copyright (c) 2008-2011 Novell, Inc. Waltham, MA, USA
6 #
7 # All modifications and additions to the file contributed by third parties
8 # remain the property of their copyright owners, unless otherwise agreed
9 # upon. The license for this file, and modifications and additions to the
10 # file, is the same license as for the pristine package itself (unless the
11 # license for the pristine package is not an Open Source License, in which
12 # case the license is the MIT License). An "Open Source License" is a
13 # license that conforms to the Open Source Definition (Version 1.9)
14 # published by the Open Source Initiative.
15
16 # Please submit bugfixes or comments via https://bugs.opensuse.org/
17 #
18
19
20 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
21 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
22 %else
23 BuildArch: noarch
24 %endif
25 Name: cpuset
26 Version: 1.6.1
27 Release: 0
28 Summary: Cpuset manipulation tool
29 License: GPL-2.0-only
30 Group: System/Management
31 URL: https://github.com/SUSE/cpuset
32 Source: https://github.com/SUSE/cpuset/archive/refs/tags/v%{version}.tar.gz
33 BuildRequires: python3-setuptools
34
35 %description
36 Cpuset is a Python application for using the cpuset facilities in
37 the Linux kernel. The actual included command is called cset
38 and allows manipulation of cpusets on the system, and provides higher
39 level functions such as implementation and control of a basic CPU
40 shielding setup.
41
42 %prep
43 %setup -q
44 %autopatch -p1
45
46 %build
47 python3 setup.py build
48 #make doc ->not yet, asciidoc is missing...
49
50 %install
51 # Install binaries, but do not install docs via setup.py
52 python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-data=/eraseme
53 rm -rf %{buildroot}/eraseme
54
55 # Install documentation
56 mkdir -p %{buildroot}/%{_mandir}/man1
57 mkdir -p %{buildroot}/%{_defaultdocdir}/%{name}/html
58
59 install -m 0444 doc/*.1 %{buildroot}/%{_mandir}/man1
60
61 install -m 0444 NEWS README AUTHORS cset.init.d doc/*.txt %{buildroot}/%{_defaultdocdir}/%{name}
62 install -m 0444 doc/*.html %{buildroot}/%{_defaultdocdir}/%{name}/html/
63
64 %files
65 %license COPYING
66 %doc %{_docdir}/%{name}
67 %{_bindir}/cset
68 %{python3_sitelib}/*
69 %{_mandir}/man1/*
70
71 %changelog