]> git.pld-linux.org Git - packages/setools.git/blob - setools.spec
a9c58814efc88a098e5daf00c36d95e2b400ad32
[packages/setools.git] / setools.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # Python 2.x modules
4 %bcond_without  python3 # Python 3.x modules
5 #
6 Summary:        Policy analysis tools for SELinux
7 Summary(pl.UTF-8):      Narzędzia do analizy polityk SELinuksa
8 Name:           setools
9 Version:        4.1.1
10 Release:        1
11 License:        GPL v2+ (tools), LGPL v2.1+ (libraries)
12 Group:          Applications/System
13 #Source0Download: https://github.com/TresysTechnology/setools/releases
14 Source0:        https://github.com/TresysTechnology/setools/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  54cf5c0ca2aa4ef7c6ac153981af34cd
16 # https://github.com/TresysTechnology/setools/issues/174
17 # https://github.com/bigon/setools/commit/e41adf01647c695b80b112b337e76021bb9f30c3.patch
18 Patch0:         %{name}-format-truncation.patch
19 URL:            https://github.com/TresysTechnology/setools4/wiki
20 BuildRequires:  bison
21 BuildRequires:  flex
22 BuildRequires:  libsepol-devel >= 2.7
23 BuildRequires:  libsepol-static >= 2.7
24 %if %{with python2}
25 BuildRequires:  python-devel >= 1:2.7
26 BuildRequires:  python-setuptools
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel >= 1:3.3
30 BuildRequires:  python3-setuptools
31 %endif
32 BuildRequires:  rpmbuild(macros) >= 1.714
33 BuildRequires:  swig-python >= 2.0.12
34 Suggests:       policy-sources
35 %if %{with python2}
36 Requires:       python-setools = %{version}-%{release}
37 %else
38 Requires:       python3-setools = %{version}-%{release}
39 %endif
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 SETools is a collection of graphical tools, command-line tools, and
44 libraries designed to facilitate SELinux policy analysis.
45
46 The base package includes the following console tools:
47 - seaudit-report: audit log analysis tool
48 - sechecker: SELinux policy checking tool
49 - secmds command line tools: seinfo, sesearch, findcon, replcon, and
50   indexcon
51 - sediff: semantic policy difference tool
52
53 %description -l pl.UTF-8
54 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
55 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
56
57 Pakiet podstawowy zawiera narzędzia terminalowe:
58 - seaudit-report - narzędzie do analizy logu audytowego
59 - sechecker - narzędzie do sprawdzania polityk SELinuksa
60 - narzędzia linii poleceń secmds: seinfo, sesearch, findcon, replcon
61   oraz indexcon
62 - sediff - narzędzie do znajdywania różnic semantycznych polityk
63
64 %package gui
65 Summary: Policy analysis graphical tools for SELinux
66 Summary(pl.UTF-8):      Graficzne narzędzia do analizy polityk SELinuksa
67 License:        GPL v2+
68 Group:          Applications/System
69 Requires:       %{name} = %{version}-%{release}
70 %if %{with python2}
71 Requires:       python-setoolsgui = %{version}-%{release}
72 %else
73 Requires:       python3-setoolsgui = %{version}-%{release}
74 %endif
75
76 %description gui
77 SETools is a collection of graphical tools, command-line tools, and
78 libraries designed to facilitate SELinux policy analysis.
79
80 This package includes the following graphical tools:
81 - apol: policy analysis tool
82
83 %description gui -l pl.UTF-8
84 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
85 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
86
87 Ten pakiet zawiera narzędzia graficzne:
88 - apol - narzędzie do analizy polityk
89
90 %package -n python-setools
91 Summary:        Python 2 bindings for SELinux policy analysis libraries
92 Summary(pl.UTF-8):      Wiązania Pythona 2 do bibliotek analizy polityk SELinuksa
93 License:        LGPL v2.1+ (core modules), GPL v2+ (seinfo and sesearch)
94 Group:          Libraries/Python
95 Requires:       python-enum34
96 Requires:       python-modules >= 1:2.7
97 Requires:       python-networkx >= 1.8
98 Suggests:       python-selinux
99
100 %description -n python-setools
101 SETools is a collection of graphical tools, command-line tools, and
102 libraries designed to facilitate SELinux policy analysis.
103
104 This package includes Python bindings for SELinux policy analysis
105 libraries.
106
107 %description -n python-setools -l pl.UTF-8
108 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
109 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
110
111 Ten pakiet zawiera wiązania Pythona do bibliotek analizy polityk
112 SELinuksa.
113
114 %package -n python-setoolsgui
115 Summary:        SETools GUI modules for Python 2
116 Summary(pl.UTF-8):      Moduły graficznego interfejsu użytkownika SETools dla Pythona 2
117 Group:          Libraries/Python
118 Requires:       python-setools = %{version}-%{release}
119 Requires:       python-PyQt5 >= 5
120
121 %description -n python-setoolsgui
122 SETools GUI modules for Python 2.
123
124 %description -n python-setoolsgui -l pl.UTF-8
125 Moduły graficznego interfejsu użytkownika SETools dla Pythona 2.
126
127 %package -n python3-setools
128 Summary:        Python 3 bindings for SELinux policy analysis libraries
129 Summary(pl.UTF-8):      Wiązania Pythona 3 do bibliotek analizy polityk SELinuksa
130 Group:          Libraries/Python
131 %if "%{py3_ver}" < "3.4"
132 Requires:       python3-enum34
133 %endif
134 Requires:       python3-modules >= 1:3.3
135 Requires:       python3-networkx >= 1.8
136 Suggests:       python3-selinux
137
138 %description -n python3-setools
139 SETools is a collection of graphical tools, command-line tools, and
140 libraries designed to facilitate SELinux policy analysis.
141
142 This package includes Python bindings for SELinux policy analysis
143 libraries.
144
145 %description -n python3-setools -l pl.UTF-8
146 SETools to zbiór narzędzi graficznych, narzędzi linii poleceń oraz
147 bibliotek mających na celu ułatwienie analizy polityk SELinuksa.
148
149 Ten pakiet zawiera wiązania Pythona do bibliotek analizy polityk
150 SELinuksa.
151
152 %package -n python3-setoolsgui
153 Summary:        SETools GUI modules for Python 3
154 Summary(pl.UTF-8):      Moduły graficznego interfejsu użytkownika SETools dla Pythona 3
155 Group:          Libraries/Python
156 Requires:       python3-setools = %{version}-%{release}
157 Requires:       python3-PyQt5 >= 5
158
159 %description -n python3-setoolsgui
160 SETools GUI modules for Python 3.
161
162 %description -n python3-setoolsgui -l pl.UTF-8
163 Moduły graficznego interfejsu użytkownika SETools dla Pythona 3.
164
165 %prep
166 %setup -q
167 %patch0 -p1
168
169 %build
170 export SEPOL=%{_libdir}/libsepol.a
171
172 %if %{with python2}
173 %py_build
174 %endif
175
176 %if %{with python3}
177 %py3_build
178 %endif
179
180 %install
181 rm -rf $RPM_BUILD_ROOT
182
183 export SEPOL=%{_libdir}/libsepol.a
184
185 %if %{with python3}
186 %py3_install
187 %endif
188
189 %if %{with python2}
190 %py_install
191
192 %py_postclean
193 %endif
194
195 %clean
196 rm -rf $RPM_BUILD_ROOT
197
198 %files
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/sediff
201 %attr(755,root,root) %{_bindir}/sedta
202 %attr(755,root,root) %{_bindir}/seinfo
203 %attr(755,root,root) %{_bindir}/seinfoflow
204 %attr(755,root,root) %{_bindir}/sesearch
205 %{_mandir}/man1/sediff.1*
206 %{_mandir}/man1/sedta.1*
207 %{_mandir}/man1/seinfo.1*
208 %{_mandir}/man1/seinfoflow.1*
209 %{_mandir}/man1/sesearch.1*
210
211 %files gui
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_bindir}/apol
214 %{_mandir}/man1/apol.1*
215
216 %if %{with python2}
217 %files -n python-setools
218 %defattr(644,root,root,755)
219 %doc COPYING ChangeLog KNOWN-BUGS README.md
220 %dir %{py_sitedir}/setools
221 %{py_sitedir}/setools/diff
222 %dir %{py_sitedir}/setools/policyrep
223 %attr(755,root,root) %{py_sitedir}/setools/policyrep/_qpol.so
224 %{py_sitedir}/setools/policyrep/*.py[co]
225 %{py_sitedir}/setools/*.py[co]
226 %{py_sitedir}/setools/perm_map
227 %{py_sitedir}/setools-%{version}-py*.egg-info
228
229 %files -n python-setoolsgui
230 %defattr(644,root,root,755)
231 %{py_sitedir}/setoolsgui
232 %endif
233
234 %if %{with python3}
235 %files -n python3-setools
236 %defattr(644,root,root,755)
237 %doc COPYING ChangeLog KNOWN-BUGS README.md
238 %dir %{py3_sitedir}/setools
239 %{py3_sitedir}/setools/diff
240 %dir %{py3_sitedir}/setools/policyrep
241 %attr(755,root,root) %{py3_sitedir}/setools/policyrep/_qpol.cpython-*.so
242 %{py3_sitedir}/setools/policyrep/*.py
243 %{py3_sitedir}/setools/policyrep/__pycache__
244 %{py3_sitedir}/setools/*.py
245 %{py3_sitedir}/setools/perm_map
246 %{py3_sitedir}/setools/__pycache__
247 %{py3_sitedir}/setools-%{version}-py*.egg-info
248
249 %files -n python3-setoolsgui
250 %defattr(644,root,root,755)
251 %{py3_sitedir}/setoolsgui
252 %endif
This page took 0.083271 seconds and 2 git commands to generate.