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