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