]> git.pld-linux.org Git - packages/libselinux.git/blame - libselinux.spec
- added ruby binding
[packages/libselinux.git] / libselinux.spec
CommitLineData
835f2e4f
JB
1#
2# Conditional build:
3231c037
JB
3%bcond_without python # Python binding
4%bcond_without ruby # Ruby binding
835f2e4f 5#
64ef7b6a 6%define sepol_ver 2.1.9
e87b3ac3 7#
adb66b1f 8Summary: SELinux library and simple utilities
4967c211 9Summary(pl.UTF-8): Biblioteka SELinux i proste narzędzia
adb66b1f 10Name: libselinux
64ef7b6a
AM
11Version: 2.1.13
12Release: 1
fefe9db1 13License: Public Domain
adb66b1f 14Group: Libraries
c11186ed 15#git clone http://oss.tresys.com/git/selinux.git/
64ef7b6a
AM
16Source0: http://userspace.selinuxproject.org/releases/20130423/%{name}-%{version}.tar.gz
17# Source0-md5: 32bf7b5182977a8a9248a1eeefe49a22
3157c0b5 18Patch0: %{name}-vcontext-selinux.patch
50fa2c36 19URL: http://userspace.selinuxproject.org/trac
ba4f2429
JB
20%ifarch ppc ppc64 sparc sparcv9 sparc64
21BuildRequires: gcc >= 5:3.4
22%else
23BuildRequires: gcc >= 5:3.2
24%endif
51212447 25BuildRequires: glibc-devel >= 6:2.3
e87b3ac3
AM
26BuildRequires: libsepol-devel >= %{sepol_ver}
27%{?with_python:BuildRequires: libsepol-static >= %{sepol_ver}}
3231c037
JB
28BuildRequires: pcre-devel
29BuildRequires: pkgconfig
835f2e4f
JB
30%{?with_python:BuildRequires: python-devel}
31%{?with_python:BuildRequires: rpm-pythonprov}
3231c037 32%{?with_ruby:BuildRequires: ruby-devel >= 1.9}
6b7a7bf6 33BuildRequires: sed >= 4.0
8d42c624 34%{?with_python:BuildRequires: swig-python}
3231c037 35%{?with_ruby:BuildRequires: swig-ruby}
87678bda 36Requires: glibc(tls)
e87b3ac3 37Requires: libsepol >= %{sepol_ver}
9b0e6c11 38Obsoletes: selinux-libs
af1b8555 39Conflicts: SysVinit < 2.86-4
801180f1 40ExcludeArch: i386
c017911b 41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
adb66b1f 42
43%description
6ed4fb38
AM
44Security-enhanced Linux is a patch of the Linux kernel and a number of
45utilities with enhanced security functionality designed to add
adb66b1f 46mandatory access controls to Linux. The Security-enhanced Linux kernel
47contains new architectural components originally developed to improve
48the security of the Flask operating system. These architectural
49components provide general support for the enforcement of many kinds
50of mandatory access control policies, including those based on the
51concepts of Type Enforcement, Role-based Access Control, and
52Multi-level Security.
53
54libselinux provides an API for SELinux applications to get and set
55process and file security contexts and to obtain security policy
56decisions. Required for any applications that use the SELinux API.
57
c75faa25
JR
58%description -l pl.UTF-8
59Security-enhanced Linux jest prototypem jądra Linuksa i wielu
60aplikacji użytkowych o funkcjach podwyższonego bezpieczeństwa.
61Zaprojektowany jest tak, aby w prosty sposób ukazać znaczenie
62obowiązkowej kontroli dostępu dla społeczności linuksowej. Ukazuje
63również jak taką kontrolę można dodać do istniejącego systemu typu
64Linux. Jądro SELinux zawiera nowe składniki architektury pierwotnie
65opracowane w celu ulepszenia bezpieczeństwa systemu operacyjnego
3f1ec040 66Flask. Te elementy zapewniają ogólne wsparcie we wdrażaniu wielu typów
6ed4fb38
AM
67polityk obowiązkowej kontroli dostępu, włączając te wzorowane na: Type
68Enforcement (TE), kontroli dostępu opartej na rolach (RBAC) i
69zabezpieczeniach wielopoziomowych.
06b84620 70
6ed4fb38
AM
71libselinux dostarcza API dla aplikacji SELinux aby mogły pobierać i
72ustawiać procesy i konteksty plików w celu korzystania z polityki
c75faa25
JR
73bezpieczeństwa. Biblioteka jest wymagana przez wszystkie aplikacje,
74które używają API SELinux.
adb66b1f 75
76%package devel
9f09f0e2 77Summary: Header files and devel documentation
4967c211 78Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programistyczna
9f09f0e2 79Group: Development/Libraries
5e241984 80Requires: %{name} = %{epoch}:%{version}-%{release}
e87b3ac3 81Requires: libsepol-devel >= %{sepol_ver}
9b0e6c11 82Obsoletes: selinux-libs-devel
adb66b1f 83
84%description devel
85Header files and devel documentation for SELinux libraries.
86
c75faa25
JR
87%description devel -l pl.UTF-8
88Pliki nagłówkowe i dokumentacja programistyczna bibliotek SELinux.
adb66b1f 89
90%package static
9f09f0e2 91Summary: Static SELinux library
4967c211 92Summary(pl.UTF-8): Biblioteki statyczne SELinux
9f09f0e2 93Group: Development/Libraries
5e241984 94Requires: %{name}-devel = %{epoch}:%{version}-%{release}
9b0e6c11 95Obsoletes: selinux-static
adb66b1f 96
97%description static
98SELinux static libraries.
99
c75faa25 100%description static -l pl.UTF-8
adb66b1f 101Biblioteki statyczne SELinux.
102
103%package utils
9f09f0e2 104Summary: SELinux utils
4967c211 105Summary(pl.UTF-8): Narzędzia SELinux
9f09f0e2 106Group: Applications/System
5e241984 107Requires: %{name} = %{epoch}:%{version}-%{release}
9b0e6c11 108Obsoletes: selinux-utils
adb66b1f 109
110%description utils
111SELinux utils.
112
c75faa25
JR
113%description utils -l pl.UTF-8
114Narzędzia SELinux.
adb66b1f 115
1531e56e
JB
116%package -n python-selinux
117Summary: Python binding for SELinux library
4967c211 118Summary(pl.UTF-8): Wiązania Pythona do biblioteki SELinux
1531e56e
JB
119Group: Libraries/Python
120Requires: %{name} = %{epoch}:%{version}-%{release}
121
122%description -n python-selinux
123Python binding for SELinux library.
124
c75faa25
JR
125%description -n python-selinux -l pl.UTF-8
126Wiązania Pythona do biblioteki SELinux.
1531e56e 127
3231c037
JB
128%package -n ruby-selinux
129Summary: Ruby binding for SELinux library
130Summary(pl.UTF-8): Wiązania języka Ruby do biblioteki SELinux
131Group: Development/Languages
132Requires: %{name} = %{epoch}:%{version}-%{release}
133
134%description -n ruby-selinux
135Ruby binding for SELinux library.
136
137%description -n ruby-selinux -l pl.UTF-8
138Wiązania języka Ruby do biblioteki SELinux.
139
adb66b1f 140%prep
141%setup -q
3157c0b5 142%patch0 -p1
adb66b1f 143
6b7a7bf6
JB
144# "-z defs" doesn't mix with --as-needed when some object needs symbols from
145# ld.so (because of __thread variable in this case)
146sed -i -e 's/-z,defs,//' src/Makefile
147
adb66b1f 148%build
3231c037 149%{__make} -j1 all %{?with_python:pywrap} %{?with_ruby:rubywrap} \
06b84620 150 CC="%{__cc}" \
6ed4fb38 151 CFLAGS="%{rpmcppflags} %{rpmcflags} -D_FILE_OFFSET_BITS=64" \
3231c037
JB
152 LDFLAGS="%{rpmldflags} -lpcre -lpthread" \
153 LIBDIR=%{_libdir} \
154 %{?with_ruby:RUBYINC="$(pkg-config --cflags ruby-1.9)"}
adb66b1f 155
156%install
157rm -rf $RPM_BUILD_ROOT
06b84620 158
3231c037 159%{__make} install %{?with_python:install-pywrap} %{?with_ruby:install-rubywrap} \
f9a14a1c
JK
160 LIBDIR="$RPM_BUILD_ROOT%{_libdir}" \
161 SHLIBDIR="$RPM_BUILD_ROOT/%{_lib}" \
3231c037
JB
162 DESTDIR="$RPM_BUILD_ROOT" \
163 RUBYINSTALL="$RPM_BUILD_ROOT%{ruby_vendorarchdir}"
adb66b1f 164
c017911b 165# make symlink across / absolute
4c5842ce 166ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libselinux.so.*) \
c017911b
JB
167 $RPM_BUILD_ROOT%{_libdir}/libselinux.so
168
adb66b1f 169%clean
170rm -rf $RPM_BUILD_ROOT
171
172%post -p /sbin/ldconfig
173%postun -p /sbin/ldconfig
174
175%files
176%defattr(644,root,root,755)
949e0ed7 177%doc ChangeLog LICENSE
c017911b 178%attr(755,root,root) /%{_lib}/libselinux.so.*
f63476a2
JB
179%{_mandir}/man5/booleans.5*
180%{_mandir}/man5/customizable_types.5*
181%{_mandir}/man5/default_contexts.5*
182%{_mandir}/man5/default_type.5*
183%{_mandir}/man5/failsafe_context.5*
64ef7b6a
AM
184%{_mandir}/man5/file_contexts.homedirs.5*
185%{_mandir}/man5/file_contexts.local.5
186%{_mandir}/man5/file_contexts.subs.5
187%{_mandir}/man5/file_contexts.subs_dist.5
f63476a2
JB
188%{_mandir}/man5/local.users.5*
189%{_mandir}/man5/removable_context.5*
190%{_mandir}/man5/secolor.conf.5*
191%{_mandir}/man5/securetty_types.5*
192%{_mandir}/man5/service_seusers.5*
193%{_mandir}/man5/seusers.5*
194%{_mandir}/man5/user_contexts.5*
195%{_mandir}/man5/virtual_domain_context.5*
196%{_mandir}/man5/virtual_image_context.5*
adb66b1f 197
198%files devel
199%defattr(644,root,root,755)
c017911b 200%attr(755,root,root) %{_libdir}/libselinux.so
3f14fe48 201%{_pkgconfigdir}/libselinux.pc
06b84620 202%{_includedir}/selinux
4063d94d 203%{_mandir}/man3/*.3*
f63476a2
JB
204%{_mandir}/man5/file_contexts.5*
205%{_mandir}/man5/media.5*
e18dd3a0 206%{_mandir}/man5/selabel_*.5*
f63476a2
JB
207%{_mandir}/man5/sepgsql_contexts.5*
208%{_mandir}/man5/x_contexts.5*
adb66b1f 209
210%files static
211%defattr(644,root,root,755)
212%{_libdir}/libselinux.a
213
214%files utils
215%defattr(644,root,root,755)
f63476a2
JB
216%attr(755,root,root) %{_sbindir}/avcstat
217%attr(755,root,root) %{_sbindir}/compute_*
218%attr(755,root,root) %{_sbindir}/getconlist
219%attr(755,root,root) %{_sbindir}/getdefaultcon
220%attr(755,root,root) %{_sbindir}/getenforce
221%attr(755,root,root) %{_sbindir}/getfilecon
222%attr(755,root,root) %{_sbindir}/getpidcon
223%attr(755,root,root) %{_sbindir}/getsebool
224%attr(755,root,root) %{_sbindir}/getseuser
225%attr(755,root,root) %{_sbindir}/matchpathcon
226%attr(755,root,root) %{_sbindir}/policyvers
227%attr(755,root,root) %{_sbindir}/selinux*
228%attr(755,root,root) %{_sbindir}/setenforce
64ef7b6a 229%attr(755,root,root) %{_sbindir}/sefcontext_compile
f63476a2
JB
230%attr(755,root,root) %{_sbindir}/setfilecon
231%attr(755,root,root) %{_sbindir}/togglesebool
f63476a2
JB
232%{_mandir}/man8/avcstat.8*
233%{_mandir}/man8/booleans.8*
234%{_mandir}/man8/getenforce.8*
235%{_mandir}/man8/getsebool.8*
236%{_mandir}/man8/matchpathcon.8*
237%{_mandir}/man8/selinux*.8*
238%{_mandir}/man8/setenforce.8*
239%{_mandir}/man8/togglesebool.8*
1531e56e 240
835f2e4f 241%if %{with python}
1531e56e
JB
242%files -n python-selinux
243%defattr(644,root,root,755)
f0f66b1d 244%dir %{py_sitedir}/selinux
245%attr(755,root,root) %{py_sitedir}/selinux/_selinux.so
246%attr(755,root,root) %{py_sitedir}/selinux/audit2why.so
247%{py_sitedir}/selinux/__init__.py
835f2e4f 248%endif
3231c037
JB
249
250%if %{with ruby}
251%files -n ruby-selinux
252%defattr(644,root,root,755)
253%attr(755,root,root) %{ruby_vendorarchdir}/selinux.so
254%endif
This page took 0.137506 seconds and 4 git commands to generate.