]> git.pld-linux.org Git - SPECS.git/blob - python-sepolgen.spec
SPECS updated Sun 1 Aug 15:50:02 CEST 2021
[SPECS.git] / python-sepolgen.spec
1 # NOTE: for versions >= 2.7 see selinux-python.spec
2 #
3 # Conditional build:
4 %bcond_without  python2 # Python 2 module
5 %bcond_without  python3 # Python 3 module
6
7 Summary:        sepolgen - Python 2 module for policy generation
8 Summary(pl.UTF-8):      Moduł Pythona 2 sepolgen do generowania polityki
9 Name:           python-sepolgen
10 Version:        2.6
11 Release:        1.1
12 License:        GPL v2
13 Group:          Development/Languages/Python
14 #Source0Download: https://github.com/SELinuxProject/selinux/wiki/Releases
15 Source0:        https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20161014/sepolgen-%{version}.tar.gz
16 # Source0-md5:  84faa46a0eb0b603e903efeed239c244
17 URL:            https://github.com/SELinuxProject/selinux/wiki
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python >= 2
22 BuildRequires:  python-modules >= 2
23 %endif
24 %if %{with python2}
25 BuildRequires:  python3 >= 1:3.2
26 BuildRequires:  python3-modules >= 1:3.2
27 %endif
28 Requires:       %{name}-common = %{version}-%{release}
29 Requires:       python-selinux >= 2.6
30 Suggests:       python-setools
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 sepolgen - Python module for policy generation.
36
37 %description -l pl.UTF-8
38 Moduł Pythona sepolgen do generowania polityki.
39
40 %package common
41 Summary:        Common files for sepolgen Python modules
42 Summary(pl.UTF-8):      Pliki wspólne dla modułów Pythona sepolgen
43 Group:          Development/Languages/Python
44
45 %description common
46 Common files for sepolgen Python modules.
47
48 %description common -l pl.UTF-8
49 Pliki wspólne dla modułów Pythona sepolgen.
50
51 %package -n python3-sepolgen
52 Summary:        sepolgen - Python 3 module for policy generation
53 Summary(pl.UTF-8):      Moduł Pythona 3 sepolgen do generowania polityki
54 Group:          Development/Languages/Python
55 Requires:       %{name}-common = %{version}-%{release}
56 Requires:       python3-selinux >= 2.6
57 # TODO: uncomment when setools supports python 3 (3.3.8 doesn't)
58 #Suggests:      python3-setools
59
60 %description -n python3-sepolgen
61 sepolgen - Python module for policy generation.
62
63 %description -n python3-sepolgen -l pl.UTF-8
64 Moduł Pythona sepolgen do generowania polityki.
65
66 %prep
67 %setup -q -n sepolgen-%{version}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71
72 %if %{with python2}
73 %{__make} install \
74         DESTDIR=$RPM_BUILD_ROOT \
75         PYTHON=%{__python} \
76         PYTHONLIBDIR=%{py_sitescriptdir}
77
78 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
79 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
80 %py_postclean
81 %endif
82
83 %if %{with python3}
84 %{__make} install \
85         DESTDIR=$RPM_BUILD_ROOT \
86         PYTHON=%{__python3} \
87         PYTHONLIBDIR=%{py3_sitescriptdir}
88
89 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
90 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
91 %endif
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %files
97 %defattr(644,root,root,755)
98 %dir %{py_sitescriptdir}/sepolgen
99 %{py_sitescriptdir}/sepolgen/*.py[co]
100
101 %files common
102 %defattr(644,root,root,755)
103 %doc ChangeLog
104 %dir /var/lib/sepolgen
105 /var/lib/sepolgen/perm_map
106
107 %files -n python3-sepolgen
108 %defattr(644,root,root,755)
109 %dir %{py3_sitescriptdir}/sepolgen
110 %{py3_sitescriptdir}/sepolgen/*.py
111 %{py3_sitescriptdir}/sepolgen/__pycache__
This page took 1.066153 seconds and 3 git commands to generate.