SHA256
3
0
forked from pool/libsepol

Accepting request 408676 from home:pluskalm:branches:security:SELinux

- Cleanup spec file with spec-cleaner
- Make spec file a bit more easy
- Ship new supbackage (-tools)

OBS-URL: https://build.opensuse.org/request/show/408676
OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsepol?expand=0&rev=56
This commit is contained in:
Johannes Segitz 2016-07-15 12:59:30 +00:00 committed by Git OBS Bridge
parent e8f8aa2672
commit fb01341895
2 changed files with 40 additions and 22 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jul 14 14:38:09 UTC 2016 - mpluskal@suse.com
- Cleanup spec file with spec-cleaner
- Make spec file a bit more easy
- Ship new supbackage (-tools)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 14 14:21:46 UTC 2016 - jsegitz@novell.com Thu Jul 14 14:21:46 UTC 2016 - jsegitz@novell.com

View File

@ -19,15 +19,15 @@
Name: libsepol Name: libsepol
Version: 2.5 Version: 2.5
Release: 0 Release: 0
Url: http://www.nsa.gov/selinux/
Summary: SELinux binary policy manipulation library Summary: SELinux binary policy manipulation library
License: LGPL-2.1+ License: LGPL-2.1+
Group: System/Libraries Group: System/Libraries
Url: http://www.nsa.gov/selinux/
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/%{name}-%{version}.tar.gz Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/%{name}-%{version}.tar.gz
Source2: baselibs.conf Source2: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: flex BuildRequires: flex
BuildRequires: pkg-config BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
Security-enhanced Linux is a feature of the Linux(R) kernel and a Security-enhanced Linux is a feature of the Linux(R) kernel and a
@ -46,7 +46,26 @@ tools, as well as by programs like load_policy that need to perform
specific transformations on binary policies such as customizing policy specific transformations on binary policies such as customizing policy
boolean settings. boolean settings.
%package utils
Summary: SELinux binary policy manipulation tools
Group: System/Base
%description utils
Security-enhanced Linux is a feature of the Linux(R) kernel and a
number of utilities with enhanced security functionality designed to
add mandatory access controls to Linux. The Security-enhanced Linux
kernel contains new architectural components originally developed to
improve the security of the Flask operating system. These architectural
components provide general support for the enforcement of many kinds of
mandatory access control policies, including those based on the
concepts of Type Enforcement(R), Role-based Access Control, and
Multi-level Security.
libsepol provides an API for the manipulation of SELinux binary
policies. It is used by checkpolicy (the policy compiler) and similar
tools, as well as by programs like load_policy that need to perform
specific transformations on binary policies such as customizing policy
boolean settings.
%package -n libsepol1 %package -n libsepol1
Summary: SELinux binary policy manipulation library Summary: SELinux binary policy manipulation library
@ -69,22 +88,18 @@ tools, as well as by programs like load_policy that need to perform
specific transformations on binary policies such as customizing policy specific transformations on binary policies such as customizing policy
boolean settings. boolean settings.
%package devel %package devel
Summary: Development Include Files and Libraries for SELinux policy manipulation Summary: Development Include Files and Libraries for SELinux policy manipulation
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: glibc-devel Requires: glibc-devel
Requires: libsepol1 = %{version} Requires: libsepol1 = %{version}
Requires: pkg-config Requires: pkgconfig
%description devel %description devel
The libsepol-devel package contains the libraries and header The libsepol-devel package contains the libraries and header
files needed for developing applications that manipulate binary files needed for developing applications that manipulate binary
policies. policies.
%package devel-static %package devel-static
Summary: Development Include Files and Libraries for SELinux policy manipulation Summary: Development Include Files and Libraries for SELinux policy manipulation
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
@ -95,30 +110,26 @@ The libsepol-devel-static package contains the static libraries
needed for developing applications that manipulate binary needed for developing applications that manipulate binary
policies. policies.
%prep %prep
%setup -q %setup -q
%build %build
make %{?_smp_mflags} CC="%{__cc}" CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS)" export CFLAGS="%{optflags}"
make %{?_smp_mflags}
%install %install
mkdir -p $RPM_BUILD_ROOT/%{_lib} make DESTDIR=%{buildroot} LIBDIR="%{buildroot}%{_libdir}" SHLIBDIR="%{buildroot}/%{_lib}" install
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man{3,8}
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="$RPM_BUILD_ROOT%{_libdir}" SHLIBDIR="$RPM_BUILD_ROOT/%{_lib}" install
rm -f $RPM_BUILD_ROOT%{_bindir}/genpolbools
rm -f $RPM_BUILD_ROOT%{_bindir}/genpolusers
rm -f $RPM_BUILD_ROOT%{_bindir}/chkcon
rm -rf $RPM_BUILD_ROOT%{_mandir}/man8
%post -n libsepol1 -p /sbin/ldconfig %post -n libsepol1 -p /sbin/ldconfig
%postun -n libsepol1 -p /sbin/ldconfig %postun -n libsepol1 -p /sbin/ldconfig
%files utils
%defattr(-,root,root)
%{_bindir}/chkcon
%{_mandir}/man8/chkcon.8%{ext_man}
%{_mandir}/man8/genpolbools.8%{ext_man}
%{_mandir}/man8/genpolusers.8%{ext_man}
%files -n libsepol1 %files -n libsepol1
%defattr(-,root,root) %defattr(-,root,root)
/%{_lib}/libsepol.so.* /%{_lib}/libsepol.so.*