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